* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --marine-auth-bg-url: url("/icon/authbg1.png?v=1");
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  color: #333;
  background-color: #f5f5f5;
}

/* LOGIN PAGE */
#loginView {
  background: linear-gradient(135deg, #66e1ea 0%, #233792 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#loginView.hidden {
  display: none;
}

.login-container {
  background: transparent;
  padding: 3rem 2rem;
  max-width: 400px;
  text-align: center;
  animation: slideIn 0.5s ease-out;
}

.logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.3rem;
  overflow: visible;
  background: transparent;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: rgb(24, 255, 243);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  font-size: 0.95rem;
  margin-bottom: 3rem;
  letter-spacing: 0.3px;
}

#loginBtn {
  width: 100%;
  padding: 1.1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

#loginBtn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

#loginBtn:active {
  transform: translateY(0);
}

#status {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  min-height: 1.5rem;
  animation: fadeIn 0.3s ease;
}

/* ACCESS DENIED PAGE */
#accessDeniedView {
  background: linear-gradient(135deg, #f11111 0%, #680e0e 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#accessDeniedView.hidden {
  display: none;
}

.access-denied-container {
  text-align: center;
  color: white;
  max-width: 500px;
}

.access-denied-container svg {
  width: 80px;
  height: 80px;
  margin-bottom: 2rem;
  stroke: white;
}

.access-denied-container h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.access-denied-container p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.access-denied-container a {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.access-denied-container a:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

/* MARINE TOOLKIT AUTH PAGE */
#marineToolkitAuthView {
  background-image:
    linear-gradient(rgba(12, 11, 11, 0.55), rgba(7, 7, 7, 0.85)),
    var(--marine-auth-bg-url);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#marineToolkitAuthView.hidden {
  display: none;
}

#marineToolkitAuthView .container {
  background: #111111;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2.5rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
  position: relative;
}

.marine-home-link {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8ec3ff;
  border: 1px solid rgba(142, 195, 255, 0.35);
  background: rgba(142, 195, 255, 0.09);
  text-decoration: none;
  transition: all 0.2s ease;
}

.marine-home-link:hover {
  background: rgba(142, 195, 255, 0.18);
  color: #d5eaff;
}

#marineToolkitAuthView .logo {
  width: 72px;
  height: 72px;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
}

#marineToolkitAuthView h1 {
  color: #f2f2f2;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
  font-weight: 700;
}

#marineToolkitAuthView .subtitle {
  color: #bdbdbd;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 400;
}

.status-message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  display: none;
}

#marineToolkitAuthView .button.primary {
  background: linear-gradient(135deg, #3f8cff 0%, #7a52ff 100%);
  border: none;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 12px 26px rgba(79, 122, 255, 0.35);
}

#marineToolkitAuthView .button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(79, 122, 255, 0.45);
}

#marineToolkitAuthView .button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #cfcfcf;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.status-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.status-message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
  display: block;
}

.button {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.button.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  margin-right: 0.5rem;
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.button.secondary {
  background: #f0f0f0;
  color: #333;
  margin-left: 0.5rem;
}

.button.secondary:hover {
  background: #e0e0e0;
}

.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.info-box {
  background: #5c5d5e;
  border-left: 4px solid #5754f3;
  padding: 1rem;
  border-radius: 4px;
  text-align: left;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #ffffff;
}

.info-box strong {
  color: #ffffff;
  display: block;
  margin-bottom: 0.5rem;
}

.user-info {
  background: #4f4f50;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  text-align: left;
}

.user-info p {
  margin: 0.5rem 0;
  color: #ffffff;
}

.user-info strong {
  color: #45c0f1;
}

.loading {
  display: none;
}

.loading.active {
  display: block;
}

.success-icon {
  font-size: 3rem;
  color: #42e769;
  margin-bottom: 0.5rem;
}

.error-icon {
  font-size: 3rem;
  color: #fd182f;
  margin-bottom: 0.5rem;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* DASHBOARD PAGE */
#dashboardView {
  display: flex;
  min-height: 100vh;
  height: 100vh;
  flex-direction: column;
}

#dashboardView.hidden {
  display: none;
}

/* Global Header */
.header {
  background: #080808;
  border-bottom: 1px solid #2e2d2d;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  width: 40px;
  height: 40px;
  overflow: visible;
  background: transparent;
}

.header-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Profile Dropdown */
.profile-dropdown {
  position: relative;
  cursor: pointer;
}

.header-text {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  user-select: none;
}

.header-text:hover {
  background: rgba(255, 255, 255, 0.1);
}

.permissions-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #2e2d2d;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.5rem;
  min-width: 280px;
  max-width: 350px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 200;
}

.profile-dropdown:hover .permissions-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown:hover .user-display {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.permissions-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  display: block;
}

.permissions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.permission-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  background: rgba(102, 126, 234, 0.15);
  color: #667eea;
  border: 1px solid rgba(102, 126, 234, 0.3);
  transition: all 0.2s ease;
}

.permission-chip:hover {
  background: rgba(102, 126, 234, 0.25);
  border-color: rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
}

/* Color variants for different permission types */
.permission-chip.admin {
  background: rgba(231, 60, 60, 0.15);
  color: #e73c4a;
  border-color: rgba(231, 76, 60, 0.3);
}

.permission-chip.admin:hover {
  background: rgba(231, 60, 60, 0.25);
  border-color: rgba(231, 76, 60, 0.5);
}

.permission-chip.logs {
  background: rgba(52, 168, 224, 0.15);
  color: #34a8e0;
  border-color: rgba(52, 168, 224, 0.3);
}

.permission-chip.logs:hover {
  background: rgba(52, 168, 224, 0.25);
  border-color: rgba(52, 168, 224, 0.5);
}

.permission-chip.member {
  background: rgba(52, 224, 81, 0.15);
  color: #34e051;
  border-color: rgba(91, 255, 165, 0.3);
}

.permission-chip.member:hover {
  background: rgba(52, 224, 104, 0.25);
  border-color: rgba(52, 224, 109, 0.5);
}

.permission-chip svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.header-btn {
  padding: 0.55rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: #7c1e1e;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  font-weight: 500;
  color: #e6e6e6;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-btn.primary {
  background: linear-gradient(135deg, #fd3d3d 0%, #cc0c0c 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 225, 234, 0.25);
}

.header-btn.primary:hover {
  box-shadow: 0 6px 20px rgba(244, 254, 255, 0.35);
  transform: translateY(-2px);
}

.header-text {
  font-size: 0.9rem;
  color: #ffffff;
  font-weight: 500;
}

/* Main Content Area */
.dashboard-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #0a0a0a 0%, #121111 100%);
  border-right: 1px solid #242323;
  display: flex;
  flex-direction: column;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
  height: 100%;
  min-height: 0;
}

.sidebar-content {
  padding: 1.25rem 0.75rem 0.5rem;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.sidebar-footer {
  padding: 1rem 0.9rem;
  border-top: 1px solid #242323;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #0d0c0c;
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
}

.user-display {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f0f0f0;
  font-size: 0.9rem;
  font-weight: 600;
}

.user-display-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.user-display-name {
  color: #f0f0f0;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-display-username {
  color: #9a9a9a;
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer .permissions-menu {
  left: 0;
  right: auto;
  bottom: 100%;
  top: auto;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.sidebar-footer .header-btn.primary {
  width: 100%;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.sidebar-category {
  margin-bottom: 0.35rem;
}

.sidebar-category-header {
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a7a5a5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.sidebar-category-header span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sidebar-category-header span::before {
  font-size: 1rem;
}

.sidebar-category-header:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e0dede;
}

.category-arrow {
  transition: transform 0.2s ease;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.category-arrow.rotated {
  transform: rotate(-90deg);
}

.sidebar-pages {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  padding: 0.2rem 0 0.5rem;
}

.sidebar-pages.collapsed {
  max-height: 0;
  opacity: 0;
}

.sidebar-page {
  padding: 0.65rem 0.75rem 0.65rem 2.2rem;
  cursor: pointer;
  font-size: 0.92rem;
  color: #c6c4c4;
  transition: all 0.2s ease;
  user-select: none;
  border-radius: 8px;
  margin: 0.1rem 0.25rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-page .page-icon {
  font-size: 1rem;
  min-width: 1.2rem;
  text-align: center;
}

.sidebar-page .page-name {
  flex: 1;
}

.sidebar-page::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.25);
  display: none;
}

.sidebar-page:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #8db6ff;
  padding-left: 2.35rem;
}

.sidebar-page.active {
  color: #8db6ff;
  font-weight: 600;
  background: rgba(141, 182, 255, 0.12);
  border: 1px solid rgba(141, 182, 255, 0.2);
}

.sidebar-page.external-link {
  color: #66e1ea;
  padding-left: 2.2rem;
  margin-top: 0.5rem;
  border: 1px solid rgba(102, 225, 234, 0);
  background: rgba(102, 225, 234, 0);
  font-weight: 500;
  text-decoration: none;
}

.sidebar-page.external-link::before {
  display: none;
}

.sidebar-page.external-link:hover {
  background: rgba(102, 225, 234, 0);
  border-color: rgba(102, 225, 234, 0);
  padding-left: 2.35rem;
}


/* Main Area */
.main-area {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  background-color: #1f1d1d;
}

.page-view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page-view.active {
  display: block;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(102, 225, 234, 0.15);
}

.page-title .page-icon {
  font-size: 2.5rem;
  min-width: 2.5rem;
  text-align: center;
}

.page-content {
  color: rgb(255, 255, 255);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: #151414;
  border: 1px solid rgba(102, 225, 234, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 1rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(102, 225, 234, 0.08);
  color: #e6e6e6;
}

.data-table th {
  background: rgba(102, 225, 234, 0.08);
  color: #9fc1ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
}

.data-table tbody tr:hover {
  background: rgba(102, 225, 234, 0.04);
}


.table-toolbar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.table-search {
  width: 100%;
  max-width: 320px;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(102, 225, 234, 0.2);
  background: rgba(18, 18, 18, 0.8);
  color: #e6e6e6;
  outline: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.table-search::placeholder {
  color: #777;
}

.table-search:focus {
  border-color: rgba(102, 225, 234, 0.5);
  background: #121212;
  box-shadow: 0 0 0 3px rgba(102, 225, 234, 0.1);
}

.table-select {
  background: rgba(18, 18, 18, 0.8);
  color: #e6e6e6;
  border: 1px solid rgba(102, 225, 234, 0.2);
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.table-select:focus {
  border-color: rgba(102, 225, 234, 0.5);
  outline: none;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pagination button {
  background: #121212;
  color: #e6e6e6;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.row-actions {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.delete-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ff6b6b;
  transform: scale(1.1);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 420px;
  background: #111111;
  border: 1px solid rgba(102, 225, 234, 0.15);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(102, 225, 234, 0.1);
  padding: 1.5rem;
  color: #f1f1f1;
  text-align: left;
  animation: slideIn 0.3s ease;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  min-width: 0;
}

.modal.confirmation {
  border-color: rgba(255, 200, 64, 0.35);
  box-shadow: 0 20px 60px rgba(255, 200, 64, 0.1), 0 0 0 1px rgba(255, 200, 64, 0.1);
}

.modal.success {
  border-color: rgba(64, 200, 120, 0.35);
  box-shadow: 0 20px 60px rgba(64, 200, 120, 0.1), 0 0 0 1px rgba(64, 200, 120, 0.1);
}

.modal.error {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 20px 60px rgba(239, 68, 68, 0.1), 0 0 0 1px rgba(239, 68, 68, 0.1);
}

.modal.info {
  border-color: rgba(102, 225, 234, 0.35);
  box-shadow: 0 20px 60px rgba(102, 225, 234, 0.1), 0 0 0 1px rgba(102, 225, 234, 0.1);
}

.modal h3 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.modal.confirmation h3 {
  color: #f2c168;
}

.modal.success h3 {
  color: #7edaa6;
}

.modal.error h3 {
  color: #ff7a7a;
}

.modal.info h3 {
  color: #66e1ea;
}

.modal p {
  color: #c9c9c9;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.modal-btn.cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #d7d7d7;
  border-color: rgba(255, 255, 255, 0.1);
}

.modal-btn.cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.modal-btn.confirm {
  background: linear-gradient(135deg, #66e1ea 0%, #233792 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 225, 234, 0.25);
}

.modal-btn.confirm:hover {
  box-shadow: 0 6px 20px rgba(102, 225, 234, 0.35);
  transform: translateY(-1px);
}

.modal-btn.confirm.success {
  background: linear-gradient(135deg, #34e051 0%, #1a8a2f 100%);
  box-shadow: 0 4px 15px rgba(52, 224, 81, 0.25);
}

.modal-btn.confirm.success:hover {
  box-shadow: 0 6px 20px rgba(52, 224, 81, 0.35);
}

.modal-btn.confirm.error {
  background: linear-gradient(135deg, #ef4444 0%, #a91c1c 100%);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

.modal-btn.confirm.error:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.modal-btn.confirm.info {
  background: linear-gradient(135deg, #66e1ea 0%, #233792 100%);
  box-shadow: 0 4px 15px rgba(102, 225, 234, 0.25);
}

.modal-btn.confirm.info:hover {
  box-shadow: 0 6px 20px rgba(102, 225, 234, 0.35);
}

.modal-btn.confirm.confirmation {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
}

.modal-btn.confirm.confirmation:hover {
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

.notify-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  z-index: 1200;
  width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}

.notify-toast {
  pointer-events: auto;
  border-radius: 10px;
  border: 1px solid rgba(102, 225, 234, 0.25);
  background: rgba(18, 18, 18, 0.95);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  color: #e6e6e6;
  padding: 0.75rem 0.875rem;
  animation: notifyIn 0.3s ease-out;
  cursor: pointer;
}

.notify-toast.info {
  background: #66c0ea73;
}

.notify-toast.success {
  background: #3afd6473;
}

.notify-toast.error {
  background: #f8515173;
}

.notify-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: #f3f3f3;
}

.notify-message {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #cfcfcf;
  overflow-wrap: anywhere;
}

.notify-toast.closing {
  animation: notifyOut 0.18s ease-in forwards;
}

@keyframes notifyIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes notifyOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #ffffff00;
}

::-webkit-scrollbar-thumb {
  background: #4979fd;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1551f8;
}

/* Formatting */
.expires-valid {
  color: #22c55e;
  font-weight: 500;
}

.expires-expired {
  color: #ef4444;
  font-weight: 500;
}

/* Tasks Management Styles */
.tasks-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tasks-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tasks-tab {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #999;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tasks-tab:hover {
  color: #ccc;
}

.tasks-tab.active {
  color: #66e1ea;
  border-bottom-color: #66e1ea;
}

.tasks-form-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
}

.tasks-form-section h3 {
  margin-bottom: 1rem;
  color: #e6e6e6;
  font-size: 1.1rem;
}

.task-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  color: #9fc1ff;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.75rem;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e6e6e6;
  font-family: inherit;
  font-size: 0.9rem;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #666;
}

/* Modern Tag Selector */
.modern-tag-selector {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 0;
  padding-bottom: 0.5rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #66e1ea 0%, #233792 100%);
  color: white;
  padding: 0.3rem 0.675rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
}

.tag-remove {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  line-height: 1;
  transition: opacity 0.2s;
}

.tag-remove:hover {
  opacity: 0.7;
}

.tag-input-wrapper {
  position: relative;
}

.tag-input {
  width: 100%;
  padding: 0.75rem;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e6e6e6;
  font-family: inherit;
  font-size: 0.9rem;
}

.tag-input::placeholder {
  color: #666;
}

.tag-input:focus {
  outline: none;
  border-color: #66e1ea;
  box-shadow: 0 0 0 2px rgba(102, 225, 234, 0.1);
}

.tag-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.5rem;
  background: #121212;
  border: 1px solid rgba(102, 225, 234, 0.3);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: none;
  z-index: 1000;
}

.tag-option {
  padding: 0.75rem 1rem;
  color: #e6e6e6;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.9rem;
}

.tag-option:hover {
  background: rgba(102, 225, 234, 0.15);
}

.tag-option-empty {
  padding: 1rem;
  color: #999;
  text-align: center;
  font-size: 0.9rem;
}

.btn-tag-selector {
  padding: 0.75rem 1rem;
  background: rgba(102, 225, 234, 0.1);
  border: 1px solid rgba(102, 225, 234, 0.3);
  color: #66e1ea;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.btn-tag-selector:hover {
  background: rgba(102, 225, 234, 0.15);
  border-color: rgba(102, 225, 234, 0.5);
}

.btn-tag-selector:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(102, 225, 234, 0.2);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #66e1ea;
  box-shadow: 0 0 0 2px rgba(102, 225, 234, 0.1);
}

.btn-primary {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #66e1ea 0%, #233792 100%);
  border: none;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 225, 234, 0.3);
}

.tasks-tab-content {
  animation: fadeIn 0.3s ease;
}

/* Task List Selector */
.task-list-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.task-list-selector label {
  color: #c9c9c9;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0;
}

.task-list-buttons {
  display: flex;
  gap: 0.5rem;
}

.task-list-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #999;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.task-list-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #c9c9c9;
}

.task-list-btn.active {
  background: rgba(102, 225, 234, 0.2);
  border-color: rgba(102, 225, 234, 0.4);
  color: #66e1ea;
}

/* Tags Edit Popup Menu */
.tags-edit-popup {
  position: fixed;
  background: #1a1a1a;
  border: 1px solid rgba(102, 225, 234, 0.3);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  z-index: 1000;
  min-width: 280px;
  max-width: 350px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tags-popup-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(102, 225, 234, 0.2);
  color: #66e1ea;
  font-weight: 600;
  font-size: 0.9rem;
}

.tags-popup-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  min-height: 35px;
}

.tag-chip-small {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, #66e1ea 0%, #233792 100%);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-remove-small {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.tag-remove-small:hover {
  opacity: 1;
}

/* Compact Tag Badge for Popup */
.tag-badge-compact {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.tag-remove-compact {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.tag-remove-compact:hover {
  opacity: 1;
}

.tags-popup-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  min-height: 32px;
  align-content: flex-start;
}

.tags-popup-divider {
  height: 1px;
  background: rgba(102, 225, 234, 0.1);
  margin: 0.25rem 0;
}

.tags-popup-available {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  min-height: 100px;
  max-height: 300px;
}

.tag-option-popup {
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(102, 225, 234, 0.2);
  color: #66e1ea;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
}

.tag-option-toggle {
  padding: 0.5rem 0.75rem;
  background-color: currentColor;
  background-clip: padding-box;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  text-align: left;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
  opacity: 0.6;
}

.tag-option-toggle:hover {
  opacity: 0.8;
}

.tag-option-toggle[data-selected="true"] {
  opacity: 1;
  font-weight: bold;
}

/* Compact Tag Badge for Popup */
.tag-badge-compact {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  margin: 0.15rem 0.15rem 0.15rem 0;
}

.tag-remove-compact {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.tag-remove-compact:hover {
  opacity: 1;
}

.tags-popup-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  min-height: 32px;
  align-content: flex-start;
}

/* Tag Preview Chips (smaller version for form) */
.tag-chip-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.6rem;
  border-radius: 14px;
  font-size: 0.65rem;
  font-weight: 600;
}

/* Modern Dropdown Menu (Reusable) */
.modern-dropdown {
  position: relative;
  width: 100%;
}

.modern-dropdown-button {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #2a2a2a;
  border: 1px solid #404040;
  color: #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modern-dropdown-button:hover {
  background: #333333;
  border-color: #505050;
}

.modern-dropdown-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(102, 225, 234, 0.2);
  border-color: #66e1ea;
}

.modern-dropdown-button.open {
  background: #333333;
  border-color: #66e1ea;
}

.modern-dropdown-arrow {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease;
  margin-left: auto;
  transform: rotate(0deg);
}

.modern-dropdown-button.open .modern-dropdown-arrow {
  transform: rotate(180deg);
}

.modern-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #2a2a2a;
  border: 1px solid #404040;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow: hidden;
  display: none;
  min-width: 100%;
}

.modern-dropdown-menu.open {
  display: flex;
  flex-direction: column;
}

.modern-dropdown-option {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 0.9rem;
  text-align: left;
  transition: background 0.15s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modern-dropdown-option:hover {
  background: #333333;
}

.modern-dropdown-option.selected {
  background: rgba(102, 225, 234, 0.15);
  color: #66e1ea;
  font-weight: 600;
}

.modern-dropdown-option.selected::after {
  content: '✓';
  color: #66e1ea;
  font-weight: bold;
}

/* Tag Selector Dropdown Menu */
.tags-selector-menu {
  max-height: 350px;
  overflow-y: auto;
  padding: 0.5rem;
}

.tags-selector-menu.open {
  display: flex;
  flex-direction: column;
}

.tag-selector-option {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  text-align: left;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
  opacity: 0.6;
}

.tag-selector-option:hover {
  opacity: 0.8;
}

.tag-selector-option[data-selected="true"] {
  opacity: 1;
}

/* Owner Selector Popup - Keep for backward compatibility */
.btn-owner-selector {
  padding: 0.75rem 1rem;
  background: rgba(102, 225, 234, 0.1);
  border: 1px solid rgba(102, 225, 234, 0.3);
  color: #66e1ea;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-owner-selector:hover {
  background: rgba(102, 225, 234, 0.15);
  border-color: rgba(102, 225, 234, 0.5);
}

.btn-owner-selector:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(102, 225, 234, 0.2);
}

.owner-selector-container {
  width: 100%;
}

/* Owner Options Popup */
.owner-option-popup {
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(102, 225, 234, 0.2);
  color: #66e1ea;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.owner-option-popup:hover {
  background: rgba(102, 225, 234, 0.1);
  border-color: rgba(102, 225, 234, 0.4);
}

/* Required Field Indicator */
.required-star {
  color: #ff4444;
  font-weight: 700;
  margin-left: 0.25rem;
}

/* Custom Dropdown Styling */
.form-group select,
select {
  width: 100%;
  padding: 0.75rem;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e6e6e6;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366e1ea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

select option {
  background: #121212;
  color: #e6e6e6;
}

.form-group select:hover,
select:hover {
  border-color: rgba(102, 225, 234, 0.3);
}

.form-group select:focus,
select:focus {
  outline: none;
  border-color: #66e1ea;
  box-shadow: 0 0 0 2px rgba(102, 225, 234, 0.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tasks-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.task-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  min-width: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  height: 100%;
}

.task-card:hover {
  border-color: rgba(102, 225, 234, 0.3);
  box-shadow: 0 5px 15px rgba(102, 225, 234, 0.1);
}

.task-card.priority-task {
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35), 0 10px 24px rgba(239, 68, 68, 0.15);
}

.task-card.priority-task:hover {
  border-color: rgba(239, 68, 68, 0.9);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.5), 0 12px 28px rgba(239, 68, 68, 0.22);
}

.task-card.status-completed {
  opacity: 0.85;
}

.task-card.status-denied {
  opacity: 0.85;
}

.task-header {
  margin-bottom: 1rem;
}

.task-header h4 {
  margin: 0 0 0.5rem 0;
  color: #e6e6e6;
  word-break: break-word;
}

.task-creator {
  color: #999;
  font-size: 0.85rem;
}

.task-description {
  color: #c9c9c9;
  font-size: 0.9rem;
  margin: 1rem 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tag {
  background: rgba(102, 225, 234, 0.15);
  color: #66e1ea;
  padding: 0.3rem 0.55rem;
  border-radius: 20px;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: capitalize;
  border: 1px solid rgba(102, 225, 234, 0.3);
}

.task-meta {
  color: #999;
  font-size: 0.85rem;
  margin: 1rem 0 1.5rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.task-meta small {
  display: block;
}

.task-card .task-meta {
  margin-top: auto;
}

.task-status {
  background: rgba(102, 225, 234, 0.05);
  border-left: 3px solid rgba(102, 225, 234, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin: 1rem 0;
}

.task-status-text-completed {
  color: #66ea71;
  font-size: 0.9rem;
  margin: 0 0 0.25rem 0;
  font-weight: 600;
}

.task-status-text-denied {
  color: #ea6666;
  font-size: 0.9rem;
  margin: 0 0 0.25rem 0;
  font-weight: 600;
}

.task-status-date {
  color: #999;
  font-size: 0.8rem;
  margin: 0;
}

.task-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  align-items: stretch;
}

.task-actions.history-only {
  gap: 0.75rem;
}

.btn-complete,
.btn-deny,
.btn-edit-tags,
.btn-delete {
  flex: 1;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.btn-edit-tags {
  background: rgba(102, 225, 234, 0.15);
  color: #66e1ea;
  border: 1px solid rgba(102, 225, 234, 0.3);
}

.btn-edit-tags:hover {
  background: rgba(102, 225, 234, 0.25);
  border-color: rgba(102, 225, 234, 0.5);
  box-shadow: 0 2px 8px rgba(102, 225, 234, 0.15);
}

.btn-complete {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.btn-complete:hover {
  background: rgba(34, 197, 94, 0.3);
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.btn-deny {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-deny:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-delete {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 1rem;
  padding: 0.6rem 0.8rem;
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.task-comments-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.task-detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 1rem;
}

.task-detail-modal {
  width: min(860px, 96vw);
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #111111;
  border: 1px solid rgba(102, 225, 234, 0.2);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.task-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.task-detail-header-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.task-detail-header h3 {
  margin: 0;
  color: #f1f1f1;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.task-detail-header-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #9b9b9b;
  font-size: 0.8rem;
}

.task-detail-header-dot {
  line-height: 1;
  color: #6f6f6f;
}

.task-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.task-detail-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ccc;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.task-detail-close:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.task-detail-body {
  overflow: auto;
  padding: 1rem 1.25rem 1.25rem;
}

.task-detail-section {
  margin-bottom: 1rem;
}

.task-detail-label {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.task-detail-description {
  margin: 0;
  color: #d1d1d1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.task-detail-comments {
  margin-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.85rem;
}

.task-detail-comments-title {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.task-comments-details {
  cursor: pointer;
}

.task-comments-details summary {
  color: #ffffff;
  font-weight: 600;
  padding: 0.5rem;
  user-select: none;
}

.task-comments-details summary:hover {
  background: rgba(102, 225, 234, 0.1);
  border-radius: 4px;
}

.comments-list {
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.comment {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.5rem;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  gap: 0.6rem;
}

.comment-author-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.comment-header strong {
  color: #ffffff;
  font-size: 0.82rem;
}

.comment-header small {
  color: #777;
  font-size: 0.7rem;
}

.comment-separator {
  color: #666;
  font-size: 0.75rem;
  line-height: 1;
}

.btn-delete-comment {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
  line-height: 1;
  transition: all 0.2s ease;
  opacity: 0.7;
  flex-shrink: 0;
}

.btn-delete-comment:hover {
  opacity: 1;
  transform: scale(1.1);
}

.comment-content {
  color: #c9c9c9;
  font-size: 0.78rem;
  margin: 0;
  line-height: 1.3;
}

.comment-input {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comment-textarea {
  padding: 0.6rem;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #e6e6e6;
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 60px;
}

.comment-textarea::placeholder {
  color: #666;
}

.comment-textarea:focus {
  outline: none;
  border-color: #66e1ea;
  box-shadow: 0 0 0 2px rgba(102, 225, 234, 0.1);
}

/* Admin Views */
.admin-view-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.admin-view-header h3 {
  margin: 0;
  color: #f1f1f1;
  font-size: 1.1rem;
}

.admin-view-header p {
  margin: 0.25rem 0 0;
  color: #a0a0a0;
  font-size: 0.86rem;
}

.admin-config-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(143, 168, 255, 0.28);
  background:
    radial-gradient(circle at 15% 20%, rgba(130, 183, 255, 0.18), transparent 45%),
    radial-gradient(circle at 88% 82%, rgba(102, 225, 234, 0.14), transparent 44%),
    linear-gradient(145deg, rgba(18, 20, 32, 0.95), rgba(14, 15, 20, 0.95));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 1.15rem;
}

.admin-config-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.07), transparent 26%, transparent 74%, rgba(255, 255, 255, 0.05));
}

.admin-config-card-header {
  position: relative;
  z-index: 1;
  margin-bottom: 0.9rem;
}

.admin-config-card-header h4 {
  margin: 0;
  color: #eaf1ff;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.admin-config-card-header p {
  margin: 0.25rem 0 0;
  color: #9baac8;
  font-size: 0.82rem;
}

.admin-config-button-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.admin-config-choice {
  border: 1px solid rgba(166, 188, 255, 0.34);
  background: linear-gradient(180deg, rgba(24, 29, 44, 0.9), rgba(17, 21, 34, 0.9));
  color: #d9e4ff;
  border-radius: 11px;
  padding: 0.58rem 0.92rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-config-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(102, 225, 234, 0.7);
  color: #e9fbff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.admin-config-choice.active {
  border-color: rgba(102, 225, 234, 0.95);
  background: linear-gradient(180deg, rgba(26, 43, 56, 0.96), rgba(17, 35, 47, 0.96));
  color: #bdf7ff;
  box-shadow: 0 0 0 1px rgba(102, 225, 234, 0.34), 0 10px 24px rgba(66, 156, 255, 0.18);
}

.admin-config-preview {
  position: relative;
  z-index: 1;
  margin-top: 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 9, 12, 0.72);
  padding: 0.75rem;
}

.admin-config-preview-label {
  color: #97a6bf;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.admin-config-preview-image {
  border-radius: 8px;
  height: 130px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.admin-config-preview-meta {
  margin-top: 0.55rem;
  color: #e3eeff;
  font-size: 0.8rem;
}

.admin-view-controls input {
  width: 100%;
  max-width: 420px;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e5e5e5;
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
}

.admin-filter-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.admin-filter-row select {
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e5e5e5;
  padding: 0.55rem 0.65rem;
  font-size: 0.82rem;
  min-width: 130px;
}

.admin-filter-row select:focus {
  outline: none;
  border-color: #66e1ea;
  box-shadow: 0 0 0 2px rgba(102, 225, 234, 0.1);
}

.admin-view-controls input:focus {
  outline: none;
  border-color: #66e1ea;
  box-shadow: 0 0 0 2px rgba(102, 225, 234, 0.1);
}

.admin-view-table-wrap {
  overflow: auto;
}

.admin-data-table {
  min-width: 900px;
}

.admin-data-table td {
  vertical-align: top;
}

.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.admin-user-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.admin-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.admin-user-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b5b5b5;
  background: rgba(255, 255, 255, 0.08);
}

.admin-user-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-sub {
  color: #8f8f8f;
  font-size: 0.76rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-chip {
  display: inline-block;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  margin: 0.08rem 0.2rem 0.08rem 0;
  border: 1px solid transparent;
  white-space: nowrap;
}

.admin-chip.role {
  color: #e8e8e8;
  background: rgba(130, 130, 130, 0.18);
  border-color: rgba(255, 255, 255, 0.15);
}

.admin-chip.perm {
  color: #667eea;
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.3);
}

.admin-chip.perm.admin {
  background: rgba(231, 60, 60, 0.15);
  color: #e73c4a;
  border-color: rgba(231, 76, 60, 0.3);
}

.admin-chip.perm.logs {
  background: rgba(52, 168, 224, 0.15);
  color: #34a8e0;
  border-color: rgba(52, 168, 224, 0.3);
}

.admin-chip.perm.member {
  background: rgba(52, 224, 81, 0.15);
  color: #34e051;
  border-color: rgba(91, 255, 165, 0.3);
}

.admin-chip.perm:hover {
  background: rgba(102, 126, 234, 0.25);
  border-color: rgba(102, 126, 234, 0.5);
}

.admin-chip.perm.admin:hover {
  background: rgba(231, 60, 60, 0.25);
  border-color: rgba(231, 76, 60, 0.5);
}

.admin-chip.perm.logs:hover {
  background: rgba(52, 168, 224, 0.25);
  border-color: rgba(52, 168, 224, 0.5);
}

.admin-chip.perm.member:hover {
  background: rgba(52, 224, 104, 0.25);
  border-color: rgba(52, 224, 109, 0.5);
}

.admin-chip.session.active {
  color: #98ffb5;
  background: rgba(26, 122, 66, 0.2);
  border-color: rgba(110, 255, 167, 0.35);
}

.admin-chip.session.expired {
  color: #ff9b9b;
  background: rgba(128, 15, 15, 0.2);
  border-color: rgba(255, 106, 106, 0.35);
}

.admin-chip.session.none {
  color: #b0b0b0;
  background: rgba(130, 130, 130, 0.18);
  border-color: rgba(255, 255, 255, 0.15);
}

.admin-chip.session.soon {
  color: #ffd39b;
  background: rgba(128, 78, 26, 0.2);
  border-color: rgba(255, 188, 106, 0.35);
}

.admin-chip-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.admin-link-btn {
  display: inline-block;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(102, 225, 234, 0.35);
  border-radius: 6px;
  color: #66e1ea;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
}

.admin-link-btn:hover {
  background: rgba(102, 225, 234, 0.12);
}

.admin-danger-btn {
  border-color: rgba(255, 118, 118, 0.45);
  color: #ff9b9b;
  background: rgba(255, 80, 80, 0.08);
}

.admin-danger-btn:hover {
  background: rgba(255, 80, 80, 0.18);
}

.admin-danger-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.admin-end-session-btn.icon-only {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-details-cell {
  max-width: 360px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.btn-comment {
  padding: 0.5rem 1rem;
  background: rgba(102, 225, 234, 0.2);
  border: 1px solid rgba(102, 225, 234, 0.3);
  color: #66e1ea;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.btn-comment:hover {
  background: rgba(102, 225, 234, 0.3);
  border-color: rgba(102, 225, 234, 0.5);
}

@media (max-width: 768px) {
  .tasks-container {
    grid-template-columns: 1fr;
  }

  .task-card {
    min-height: 320px;
  }

  .task-actions {
    flex-direction: column;
  }

  .btn-complete,
  .btn-deny {
    width: 100%;
  }
}
