.nav-right button {
  white-space: nowrap;
}

.button-theme.disabled {
  cursor: default;
  opacity: 0.6;
  pointer-events: none;
}

.hamburger.disabled {
  pointer-events: none;
  opacity: 0.5;
}
/* =====================================================
   SIDEBAR.CSS — PRODUCTION READY (THEME-SAFE)
   Active strip uses dark yellow for guaranteed contrast
===================================================== */

/* Sidebar container */
.sidebar {
  width: 260px;
  height: 100vh;
  padding: 12px;
  background-color: var(--bg);
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.08);
}

/* Close button (mobile) */
.close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  margin-bottom: 10px;
  color: var(--text);
}

/* Menu list */
.menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* User info row */
.menu-userinfo {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* NavLink wrapper */
.menu-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Menu item */
.menu-link li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 4px 0;
  border-radius: 6px;
  cursor: pointer;

  color: var(--text);
  transition: background-color 0.2s ease;
}

/* Icon */
.menu-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* -----------------------------------------------------
   Hover preview (lighter yellow)
----------------------------------------------------- */
.menu-link li:hover {
  background-color: #fff3cd; /* light amber */
}

/* -----------------------------------------------------
   ACTIVE STATE (dark yellow strip — guaranteed contrast)
----------------------------------------------------- */
.menu-link.active li {
  background-color: #f0ad00; /* dark yellow / amber */
  color: #1a1a1a;            /* forced dark text */
  font-weight: 600;
}

.menu-link.active li {
  background-color: #f0ad00;
  color: black;
}

/* Keep active stable even on hover */
.menu-link.active li:hover {
  background-color: #f0ad00;
  color: #1a1a1a;
}

/* -----------------------------------------------------
   Disabled menu
----------------------------------------------------- */
.menu-disabled {
  pointer-events: none;
  opacity: 0.6;
}
/* ================= Dashboard Layout ================= */
.dashboard {
  padding: 20px;
  background-color: var(--content-bg);
  color: var(--text);
}


.dashboard-header {
  margin-bottom: 22px;
}

.dashboard-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 4px;
}

.dashboard-subtitle {
  font-size: 14px;
  color: #6b7280;
}

/* ================= Grid ================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

/* ================= Card ================= */
.dashboard-card {
  position: relative;
  padding: 22px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
  cursor: pointer;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.dashboard-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

/* Keyboard accessibility (cleaner than :focus) */
.dashboard-card:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ================= Accent Bar ================= */
.dashboard-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: #2563eb;
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

/* ================= Card Title ================= */
.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ================= Stats ================= */
.card-stats {
  display: flex;
  justify-content: space-between;
}

.label {
  display: block;
  font-size: 12px;
  color: #6b7280;
}

.value {
  font-size: 20px;
  font-weight: 600;
}

.value.active {
  color: #16a34a;
}

.value.inactive {
  color: #dc2626;
}

/* ================= Variant Colors ================= */
.dashboard-card.profiles::before {
  background: #2563eb;
}

.dashboard-card.articles::before {
  background: #16a34a;
}

.dashboard-card.judgements::before {
  background: #dc2626;
}

.dashboard-card.judges::before {
  background: #7c3aed;
}

.dashboard-card.acts::before {
  background: #f59e0b;
}

.dashboard-card.users::before {
  background: #0ea5e9;
}

/* ================= Dark Mode ================= */
[data-theme="dark"] .dashboard-card {
  background: linear-gradient(145deg, #020617, #020a1a);
  color: #e5e7eb;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .label {
  color: #9ca3af;
}


/* ================= Reduced Motion Support ================= */
@media (prefers-reduced-motion: reduce) {
  .dashboard-card {
    transition: none;
  }

  .dashboard-card:hover {
    transform: none;
  }
}
/* ================= HEADER ================= */

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.profile-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ================= TOOLBAR (DO NOT DISTURB) ================= */

.profile-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 14px;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 14px;
  max-width: 100%;
}

/* Keeps everything on ONE line until truly small */
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
}

/* Inputs */
.toolbar-input,
.toolbar-select,
.toolbar-sort-btn {
  height: 44px;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

/* Search */
.toolbar-input {
  padding: 0 12px;
  flex: 1 1 220px;
  min-width: 190px;
}

.toolbar-input::placeholder {
  color: var(--muted);
}

.toolbar-input:hover,
.toolbar-input:focus,
.toolbar-select:hover,
.toolbar-select:focus {
  border-color: var(--primary);
}

/* Sort group — MUST stay inline */
.sort-group {
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Sort select */
.toolbar-select {
  padding: 0 12px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Sort button */
.toolbar-sort-btn {
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.toolbar-sort-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

/* ================= GRID ================= */

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

/* ================= CARD ================= */

.profile-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

/* ================= IMAGE ================= */

.photo-wrapper {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: 12px;
  background: #f1f5f9;
  margin-bottom: 12px;
  position: relative;
}

/* ================= TEXT ================= */

.name {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 4px;
}

.title {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ================= ACTIONS ================= */

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

button.addButton {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--success);
  color: var(--success-text);
  border: none;
  font-weight: 600;
  cursor: pointer;
}

button.addButton:hover {
  background: var(--success-hover);
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-container {
  background: hsl(0, 0%, 2%);
  color: bisque;
  width: min(92vw, 520px);
  padding: 20px;
  border-radius: 12px;
  position: relative;
}

.close-btn {
  position: absolute;

}

h2 {
  text-align: center;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

input[type="text"],
input[type="file"] {
  width: 100%;
  padding: 8px;
  font-size: 0.95rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.photo-preview {
  margin-top: 8px;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.pdf-preview {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

button[type="submit"] {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  background: #4f86ff;
  color: #fff;
  cursor: pointer;
}

button:disabled {
  background: #aaa;
  cursor: not-allowed;
}

.error {
  color: red;
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.modal-actions .cancel-btn {
  background-color: #dc2626;
  color: #ffffff;
  padding: 9.6px 19.2px;
  margin-top: 12px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
}

.modal-actions .cancel-btn:hover {
  background-color: #b91c1c;
}

.warning {
  background: #fff7ed;
  border: 1px solid #facc15;
  color: #92400e;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.success {
  background: #dcfce7;
  color: #166534;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-weight: 600;
}
.article-viewer {
  padding: 20px;
  background: var(--bg);
  color: var(--text);
}

/* ===== TITLE WRAP (PHASE 1) ===== */
.article-title-wrap {
  width: 30%;
}

.article-viewer-description {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  word-break: break-word;
  white-space: normal;
}

/* ===== META ===== */
.subtitle-1 {
  margin-top: 14px;
  margin-bottom: 2px;
  font-size: 13.6px;
  color: var(--muted);
}

/* ===== ACTIONS ===== */
.back-btn {
  margin-bottom: 12px;
}

/* ===== PDF VIEWER (PHASE 2) ===== */
.article-pdf-container {
  margin-top: 20px;
  height: 520px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdf-toolbar {
  padding: 10px 14px;
  font-weight: 600;
  background: var(--content-bg);
  border-bottom: 1px solid var(--border);
}

.article-pdf-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--panel);
}

.no-pdf {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .article-title-wrap {
    width: 100%;
  }

  .article-pdf-container {
    height: 420px;
  }
}

@media (max-width: 480px) {
  .article-pdf-container {
    height: 360px;
  }
}
/* ======================================================
   ArticleDashboard.css
   PRODUCTION READY — ISOLATED — SAFE
   Goal:
   - Visually match ProfileDashboard cards & toolbar
   - WITHOUT touching ProfileDashboard.css
   - WITHOUT JSX changes
===================================================== */

/* ================= DASHBOARD WRAPPER ================= */

.article-dashboard {
  width: 100%;
}

/*
  IMPORTANT:
  ArticleDashboard.jsx already uses the same structural
  classes as ProfileDashboard:
  - .profile-header
  - .profile-toolbar
  - .toolbar-group
  - .toolbar-input
  - .toolbar-select
  - .toolbar-sort-btn
  - .profile-grid
  - .profile-card

  All toolbar & grid styling is inherited from
  ProfileDashboard.css intentionally.
*/

/* ================= ARTICLE CARD NORMALIZATION ================= */

/*
  Article cards lack the fixed-height photo-wrapper
  used by Profile cards.
  This causes flex spacing differences.

  We simulate the photo area using ::before
  to match Profile UI without DOM changes.
*/

.profile-viewer-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px; /* visual parity with Profile cards */
}

/* Simulated photo block (matches Profile photo-wrapper) */
.article-dashboard .profile-viewer-card::before {
  content: "";
  display: block;
  width: 100%;
  height: 160px; /* EXACT Profile photo height */
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    #e5e7eb,
    #f3f4f6
  );
}

/* Dark theme simulated photo */
[data-theme="dark"] .profile-viewer-card::before {
  background: linear-gradient(
    135deg,
    #1f2937,
    #111827
  );
}

/* ================= ARTICLE TEXT ================= */

.article-excerpt {
  margin: 4px 0px 2px;
  font-size: 0.6rem;
  line-height: 1.5;
  color: var(--muted);
  max-height: 4.5em; /* ~3 lines */
  overflow: hidden;
}

/* Name & title spacing to match Profile cards */
.profile-card .name {
  margin-top: 0px;
  margin-bottom: 4px;
  padding:0px;
}

p.name {
  margin-top: 0px;
  margin-bottom: 4px;
  padding:0px;
  font-size: 0.8rem;
}

p.name-main {
  margin-top: 4px;
  margin-bottom: 2px;
  padding-bottom: 6px;
  font-size: 0.8rem;
}

.profile-viewer-card .title {
  margin-bottom: 6px;
}

/* ================= ACTIONS ================= */

/* Anchor action buttons to bottom (Profile behavior) */
.profile-viewer-card .card-actions {
  margin-top: auto;
}

/* Keep button sizing consistent */
.profile-viewer-card .card-actions button {
  min-width: 72px;
}

/* ================= EMPTY / STATES ================= */

.article-loading,
.article-error,
.empty {
  text-align: center;
  padding: 24px;
  font-weight: 600;
  color: var(--muted);
}

.article-error {
  color: var(--danger);
}

/* ================= TOAST (CENTERED, SAME AS PROFILE) ================= */

.toast-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
}

.toast-success {
  background: #16a34a;
  color: #ffffff;
  padding: 14px 26px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  animation: toastFade 0.3s ease;
}

@keyframes toastFade {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ================= RESPONSIVE SAFETY ================= */

@media (max-width: 480px) {
  .profile-viewer-card {
    min-height: auto;
  }

  .profile-viewer-card::before {
    height: 140px;
  }
}

.article-box {
  border: 1px solid #ccc;
  padding: 12px;
  margin: 10px 0;
  border-radius: 6px;
  max-width: 600px;         /* optional width limit */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

button.addButton {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--success);
  color: var(--success-text);
  border: none;
  font-weight: 600;
  cursor: pointer;
}

button.addButton:hover {
  background: var(--success-hover);
}

/* ======================================================
   ArticleUploadModal.css
   Aligned with ProfileUploadModal UX
====================================================== */

/* ---------- Overlay ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

/* ---------- Modal Container ---------- */
.modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 520px;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Header ---------- */
.modal-container h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
}

/* ---------- Error ---------- */
.modal-container .error {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

/* ---------- Form ---------- */
.modal-container form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- Inputs (MATCH ProfileUploadModal) ---------- */
.modal-container input[type="text"],
.modal-container input[type="file"],
.modal-container textarea {
  width: 100%;
  min-height: 42px;
  padding: 12px 14px;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
}

/* ---------- Textarea ---------- */
.modal-container textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.5;
}

/* ---------- Focus ---------- */
.modal-container input:focus,
.modal-container textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* ---------- Actions ---------- */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.modal-actions button {
  padding: 10px 18px;
  font-size: 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
}

/* Primary */
.modal-actions button[type="submit"] {
  background: #2563eb;
  color: #ffffff;
}

.modal-actions button[type="submit"]:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Cancel */
.modal-actions .cancel-btn {
  background: #e5e7eb;
  color: #111827;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] .modal-container {
  background: #1f2933;
}

[data-theme="dark"] .modal-container h2 {
  color: #f9fafb;
}

[data-theme="dark"] .modal-container input,
[data-theme="dark"] .modal-container textarea {
  background: #111827;
  color: #f9fafb;
  border-color: #374151;
}

[data-theme="dark"] .modal-container .cancel-btn {
  background: #374151;
  color: #f9fafb;
}

[data-theme="dark"] .modal-container .error {
  background: #7f1d1d;
  color: #fee2e2;
}
/* ======================================================
JUDGMENT DASHBOARD – PRODUCTION READY (THEME SAFE)
====================================================== */

/* ================= PAGE ================= */
.judgment-dashboard {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg);
  color: var(--text);
}

/* ================= HEADER ================= */
.judgment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.judgment-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
}

.judgment-header button {
  padding: 9px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* ADD JUDGMENT BUTTON */
/* ADD JUDGMENT BUTTON */
.judgment-header .add-btn {
  background: #22c55e;   /* green */
  color: #000;           /* black text */
}

.judgment-header .add-btn:hover {
  background: #16a34a;
  color: #000;
}


/* ================= TOOLBAR ================= */
.judgment-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--panel);
  padding: 14px;
  border-radius: 14px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}

.judgment-toolbar input,
.judgment-toolbar select {
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.9rem;
  min-width: 200px;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.12),
    0 2px 6px rgba(0,0,0,0.14);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.judgment-toolbar input:focus,
.judgment-toolbar select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow:
    0 0 0 3px rgba(79,134,255,0.28),
    inset 0 1px 2px rgba(0,0,0,0.12);
}

.judgment-toolbar button {
  padding: 10px 16px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}

.judgment-toolbar button:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 14px rgba(0,0,0,0.26);
}

.judgment-toolbar button:active {
  transform: translateY(1px);
}

/* ================= GRID ================= */
.judgment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

/* ================= CARD ================= */
.judgment-card {
  background: var(--panel);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 2px solid var(--border);
  box-shadow:
    0 6px 14px rgba(0,0,0,0.18),
    0 0 0 1px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.judgment-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.30),
    0 0 0 1px var(--primary);
}

.judgment-card h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.judgment-card .subtitle,
.judgment-card .desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

/* ================= THUMB ================= */
.thumb {
  height: 150px;
  border-radius: 10px;
  background: var(--bg);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

/* ================= ACTION BUTTONS ================= */
.card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.card-actions button {
  flex: 1;
  padding: 7px 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
}

/* View */
.card-actions button:first-child {
  background: var(--primary);
  color: #fff;
}

/* ✅ EDIT – YELLOW */
.card-actions .edit {
  background: var(--edit);
  color: #222;
}
.card-actions .edit:hover {
  background: var(--edit-hover);
}

/* Delete */
.card-actions .danger {
  background: var(--danger);
  color: #fff;
}

/* ================= STATES ================= */
.judgment-loading,
.empty {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ================= TOOLTIP ================= */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 6px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.15s ease;
  z-index: 1000;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
  .judgment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .judgment-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .judgment-toolbar input,
  .judgment-toolbar select,
  .judgment-toolbar button {
    width: 100%;
  }
}
.judgment-header .add-btn {
  background: var(--success);
}

.clear-btn{
  background:#007bff;
  color:white;
  border:none;
  padding:6px 14px;
  border-radius:4px;
  cursor:pointer;
  margin-left:8px;
}

.clear-btn:hover{
  background:#0056b3;
}

mark{
  background:#ffe066;
  padding:1px 3px;
  border-radius:2px;
}

.sort-group{
  display:flex;
  align-items:center;
  
}

.toolbar-sort-btn{
  padding:6px 10px;
  cursor:pointer;
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
}

/*   */
/* SORT GROUP */
./* .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.modal-content h2 {
  margin-top: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: #222;
}

.modal-content form input,
.modal-content form textarea,
.modal-content form select {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
}

.modal-content form textarea {
  min-height: 80px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.modal-actions button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.modal-actions button[type="submit"] {
  background: var(--primary, #4f86ff);
  color: #fff;
}

.modal-actions button[type="submit"]:hover {
  background: var(--primary-hover, #3a6fe0);
}

.modal-actions button[type="button"] {
  background: #ddd;
  color: #222;
}

.modal-actions button[type="button"]:hover {
  background: #ccc;
}

.error {
  color: red;
  margin-bottom: 1rem;
  font-size: 0.9rem;
} */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content.with-nav {
  background: #fff;
  padding: 0;
  border-radius: 8px;
  width: 800px;
  max-width: 95%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  display: flex;
}

.modal-nav {
  width: 180px;
  background: #f5f5f5;
  border-right: 1px solid #ddd;
  padding: 1rem;
}

.modal-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-nav li {
  margin-bottom: 0.8rem;
}

.modal-nav a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
}

.modal-nav a:hover {
  color: var(--primary, #4f86ff);
}

.modal-form {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  max-height: 80vh;
}

.modal-form h2 {
  margin-top: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: #222;
}

.modal-form label {
  display: block;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 4px;
  color: #333;
}

.modal-form form input:not([type="checkbox"]):not([type="file"]),
.modal-form form textarea,
.modal-form form select {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
}

.modal-form input[type="file"] {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #111;
}

.modal-form form textarea {
  min-height: 80px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}

/* .modal-actions button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.modal-actions button[type="submit"] {
  background: var(--primary, #4f86ff);
  color: #fff;
}

.modal-actions button[type="submit"]:hover {
  background: var(--primary-hover, #3a6fe0);
}

.modal-actions button[type="button"] {
  background: #ddd;
  color: #222;
}

.modal-actions button[type="button"]:hover {
  background: #ccc;
} */

.error {
  color: red;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* ... rest of your CSS above ... */

.judge-list {
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 4px;
  border-radius: 4px;
  background: #fff;
}

/* Ensure the stray "." from your previous code is removed */

.judge-option {
  display: flex !important;      /* Overrides the global 'display: block' */
  align-items: center !important;
  gap: 8px;                      /* This creates the single blank space */
  padding: 4px 8px;
  margin: 0 !important;          /* Overrides global label margins */
  cursor: pointer;
  width: 100%;
}

.judge-checkbox {
  width: auto !important;        /* Prevents checkbox from stretching to 100% */
  margin: 0 !important;          /* Removes default bottom margins */
  flex-shrink: 0;                /* Keeps the checkbox from squishing */
}

.judge-name {
  margin: 0;
  white-space: nowrap;
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

.judge-option:hover {
  background: #f0f4ff;
}



/* ... rest of your CSS below ... */
.judge-option input {
  margin: 0;
  /* remove default browser spacing */
}

.act-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.date-preview {
  margin-top: 5px;
  font-size: 13px;
  color: #555;
}

.citation-preview {
  margin-top: 6px;
  padding: 6px 10px;
  background: #f2f7ff;
  border-left: 4px solid #2c6bed;
  font-size: 14px;
  color: #1a1a1a;
}

.bench-preview {
  margin-top: 10px;
  padding: 8px 10px;
  background: #eef3ff;
  border-left: 4px solid #2c6bed;
  font-size: 14px;
  color: #111;        /* darker text */
}

.bench-preview strong {
  color: #1a1a1a;
}

/* .bench-preview li {
  color: #222;
} */

.bench-preview ol {
  margin: 5px 0 0 18px;
  padding: 0;
}


.act-row button:hover {
  background: #ccc;
}

.act-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.act-row select {
  flex: 2;
  margin-bottom: 0;
}

.act-row input {
  flex: 3;
  margin-bottom: 0;
}

.act-row button {
  flex: 0;
  padding: 0.6rem 1.2rem;
  height: 36px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  background: #ddd;
}

.act-row button:hover {
  background: #ccc;
}

.act-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  /* 1. This is the most important line for alignment */
  align-items: center; 
}

.act-row select,
.act-row input {
  /* 2. Remove bottom margins that push the row height */
  margin-bottom: 0 !important; 
  flex: 2;
}

.act-row input {
  flex: 1; /* Section input is narrower than the Act dropdown */
}

.act-row button {
  /* 3. Reset the button's box model */
  margin: 0 !important;
  padding: 0.5rem 1rem; /* Match the vertical padding of your inputs */
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffeded;
  color: #d93025;
  border: 1px solid #ffcfcf;
}

.act-row button:hover {
  background: #f8d7da;
}

button.btn.btn-success {
  padding: 0.6rem 1.2rem;
  height: 36px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  background: #c4f8d0;
  color: #060606;
}

button.btn.btn-success:hover {
  background: #9af1ad;
}

button.btn.btn-secondary {
  padding: 0.6rem 1.2rem;
  height: 36px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  background: #f25850;
  color: #fff;
}
button.btn.btn-secondary:hover {
  background: #ec2f25;
}

button.btn.btn-primary {
  padding: 0.6rem 1.2rem;
  height: 36px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  background: #739df7;
  color: #fff;
}
button.btn.btn-primary:hover {
  background: #2563eb;
}

.success {
  background: #e6ffed;
  color: #0a5c2a;
  border-left: 4px solid #28a745;
  padding: 8px 10px;
  margin-bottom: 12px;
  font-weight: 600;
}/* ===============================
   MAIN CONTAINER
================================ */
.judgment-viewer {
  max-width: 900px;
  margin: 20px auto;
  padding: 20px;
  background: #2e4e6f;
  color: #f7f6f6;              /* ✅ FIX */
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* ===============================
   BACK BUTTON
================================ */
.back-btn {
  background: #f1f1f1;
  color: #222;              /* ✅ add this */
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 15px;
  transition: background 0.2s ease;
}

.back-btn:hover {
  background: #e0e0e0;
}

/* ===============================
   SECTION TITLES
================================ */
.subtitle-1 {
  font-weight: 600;
  margin-top: 15px;
  margin-bottom: 5px;
  color: #ffffff;
}

/* ===============================
   TEXT CONTENT
================================ */
.judgment-viewer-description {
  background: #dcd4d4;
  color: #222;              /* ✅ ensure visibility */
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #ffffff;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===============================
   PDF CONTAINER
================================ */
.judgment-pdf-container {
  margin-top: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

/* ===============================
   PDF TOOLBAR
================================ */
.pdf-toolbar {
  background: #2c3e50;
  color: #fff;
  padding: 8px 12px;
  font-size: 14px;
}

/* ===============================
   PDF IFRAME
================================ */
.judgment-pdf-container iframe {
  width: 100%;
  height: 600px;
  border: none;
}

/* ===============================
   NO PDF MESSAGE
================================ */
.no-pdf {
  padding: 20px;
  text-align: center;
  color: #777;
  font-style: italic;
}

/* ===============================
   LOADING & ERROR STATES
================================ */
.profile-loading,
.profile-error {
  text-align: center;
  padding: 40px;
  font-size: 16px;
}

.profile-error {
  color: red;
}

.judgment-viewer-description div {
  margin-bottom: 4px;
}/* ======================================================
   USER MANAGEMENT – FINAL STABLE PRODUCTION CSS
   ====================================================== */

/* ================= THEME VARIABLES ================= */
:root {
  --page-padding: 20px;
  --content-padding: 12px;

  --bg-page: #f2f4f8;
  --bg-card: #e9edf3;
  --border-card: #c3cbd9;

  --text-main: #1f2937;
  --text-muted: #4b5563;

  --primary: #1e40af;
  --primary-dark: #1e3a8a;

  --danger: #b91c1c;
  --danger-dark: #7f1d1d;
}

/* ================= DARK THEME ================= */
[data-theme="dark"] {
  --bg-page: #0f172a;
  --bg-card: #1e293b;
  --border-card: #334155;

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;

  --primary: #3b82f6;
  --primary-dark: #2563eb;

  --danger: #ef4444;
  --danger-dark: #dc2626;
}

/* ================= PAGE ================= */
.judge-page {
  padding: var(--page-padding);
  background: var(--bg-page);
  color: var(--text-main);
  min-height: 100%;
}
/*************************************************
 * Judge.css – PRODUCTION READY (THEME AWARE)
 *************************************************/


/* =================================================
   THEME VARIABLES (inherits from User UI theme)
   ================================================= */
:root {
  --judge-bg: #64748B33;
  --judge-text: #222222;
  --judge-border: #dddddd;
  --judge-shadow: rgba(0, 0, 0, 0.08);
}

body.dark {
  --judge-bg: #1e1e1e;
  --judge-text: #e6e6e6;
  --judge-border: #333333;
  --judge-shadow: rgba(0, 0, 0, 0.6);
}

/* =================================================
   SUMMARY CARDS
   ================================================= */
.judge-cards {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.judge-card {
  width: 280px;
  height: 120px;
  padding: 14px 16px;
  border-radius: 6px;

   background: var(--bg-card);
  color: var(--text-main);

  display: flex;
  flex-direction: column;
  justify-content: center;

  border-left: 6px solid transparent;
  box-shadow: 0 2px 6px var(--judge-shadow);

  font-size: 14px;
  font-weight: 600;
}

.judge-card span {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 700;
}

/* =================================================
   CARD LEFT BORDER COLORS (DO NOT CHANGE)
   ================================================= */
.judge-card.total {
  border-left-color: #dc2626; /* red */
}

.judge-card.active {
  border-left-color: #16A34A; /* green */
}

.judge-card.inactive {
  border-left-color: #F59E0B; /* yellow */
}

/* =================================================
   TOOLBAR
   ================================================= */
.judge-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.judge-filters input {
  flex: 1;
  padding: 6px 8px;
  background: var(--judge-bg);
  color: var(--judge-text);
  border: 1px solid var(--judge-border);
}

.judge-filters input::placeholder {
  color: #888;
}

.add-judge-btn {
  padding: 6px 12px;
  cursor: pointer;
}

.add-judge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  white-space: nowrap;

  background: linear-gradient(135deg, #1e411e, #308409);
  color: #000000;
  border: none;

  box-shadow: 0 8px 22px rgba(30, 64, 175, 0.45);
}

/* =================================================
   INLINE FORM
   ================================================= */
.judge-inline-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.judge-inline-form input,
.judge-inline-form select {
  padding: 6px;
  background: var(--judge-bg);
  color: var(--judge-text);
  border: 1px solid var(--judge-border);
}

/* =================================================
   TABLE
   ================================================= */
.judg-table {
  width: 100%;
  border-collapse: collapse;
}

.judg-table th,
.judg-table td {
  border: 1px solid var(--judge-border);
  padding: 8px;
  background: var(--judge-bg);
  color: var(--judge-text);
}

.judg-table th {
  cursor: pointer;
  font-weight: 600;
}

.judge-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

.judge-table th,
.judge-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-card);
  text-align: left;
  vertical-align: middle;
}

.judge-table th {
  background: rgba(100, 116, 139, 0.2);
  font-weight: 700;
}

.status.active {
  color: #137333;
}

.status.inactive {
  color: #c5221f;
}

.no-data {
  text-align: center;
  padding: 16px;
}

.form-error {
  color: #c5221f;
  margin-top: 8px;
}

.judge-page h2 {
  text-align: left;
  margin: 12px auto;
  font-size: 1.4rem;
  font-weight: 700;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.judge-table button, 
.judge-inline-form button {
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.judge-table .edit-btn {
  background: var(--primary);
  color: #ffffff;
}

.judge-table .delete-btn {
  background: var(--danger);
  color: #ffffff;
}
/* ===== Disabled Edit button ===== */
.action-buttons .edit-btn:disabled {
  background-color: #e6ecf5 !important;  /* muted blue-grey */
  color: #8a9bb5 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed;
  opacity: 0.6;
}


/* ===== Disabled Delete button (already discussed) ===== */
.action-buttons .delete-btn:disabled {
  background-color: #f2dede !important;  /* muted red */
  color: #b94a48 !important;
  border-color: #ebccd1 !important;
  cursor: not-allowed;
  opacity: 0.5;
}
/* Save / Cancel colors */
.save-btn {
  background: var(--primary);
  color: #ffffff;
}

.cancel-btn {
  background: var(--danger);
  color: #ffffff;
}
 
/* ===== SORTABLE TABLE HEADERS (EXCLUDE ACTION COLUMN) ===== */
.judge-table th:not(:last-child) {
  cursor: pointer;
  user-select: none;
}

.judge-table th:not(:last-child):hover {
  opacity: 0.85;
}

/* ======================================================
   USER MANAGEMENT – FINAL STABLE PRODUCTION CSS
   ====================================================== */

/* ================= THEME VARIABLES ================= */
:root {
  --page-padding: 20px;
  --content-padding: 12px;

  --bg-page: #f2f4f8;
  --bg-card: #e9edf3;
  --border-card: #c3cbd9;

  --text-main: #1f2937;
  --text-muted: #4b5563;

  --primary: #1e40af;
  --primary-dark: #1e3a8a;

  --danger: #b91c1c;
  --danger-dark: #7f1d1d;
}

/* ================= DARK THEME ================= */
[data-theme="dark"] {
  --bg-page: #0f172a;
  --bg-card: #1e293b;
  --border-card: #334155;

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;

  --primary: #3b82f6;
  --primary-dark: #2563eb;

  --danger: #ef4444;
  --danger-dark: #dc2626;
}

/* ================= PAGE ================= */
.act-page {
  padding: var(--page-padding);
  background: var(--bg-page);
  color: var(--text-main);
  min-height: 100%;
}
/*************************************************
 * Act.css – PRODUCTION READY (THEME AWARE)
 *************************************************/

/* =================================================
   THEME VARIABLES (inherits from User UI theme)
   ================================================= */
:root {
  --act-bg: #64748b33;
  --act-text: #222222;
  --act-border: #dddddd;
  --act-shadow: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
  --act-bg: #1e293b;
  --act-text: #ffffff;
  --act-border: #334155;
  --act-shadow: rgba(0, 0, 0, 0.6);
}

/* =================================================
   SUMMARY CARDS
   ================================================= */
.act-cards {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.act-card {
  width: 280px;
  height: 120px;
  padding: 14px 16px;
  border-radius: 6px;

  background: var(--act-bg);
  color: var(--act-text);

  display: flex;
  flex-direction: column;
  justify-content: center;

  border-left: 6px solid transparent;
  box-shadow: 0 2px 6px var(--act-shadow);

  font-size: 14px;
  font-weight: 600;
}

.act-card span {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 700;
}

/* =================================================
   CARD LEFT BORDER COLORS (DO NOT CHANGE)
   ================================================= */
.act-card.total {
  border-left-color: #dc2626; /* red */
}

.act-card.active {
  border-left-color: #16a34a; /* green */
}

.act-card.inactive {
  border-left-color: #f59e0b; /* yellow */
}

/* =================================================
   TOOLBAR
   ================================================= */
.act-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.act-filters input {
  flex: 1;
  padding: 6px 8px;
  background: var(--act-bg);
  color: var(--act-text);
  border: 1px solid var(--act-border);
}

.act-filters input::placeholder {
  color: #888;
}

.add-act-btn {
  padding: 6px 12px;
  cursor: pointer;
}

.add-act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  white-space: nowrap;

  background: linear-gradient(135deg, #1e411e, #308409);
  color: #000000;
  border: none;

  box-shadow: 0 8px 22px rgba(30, 64, 175, 0.45);
}

/* =================================================
   INLINE FORM
   ================================================= */
.act-inline-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.act-inline-form input,
.act-inline-form select {
  padding: 6px;
  background: var(--act-bg);
  color: var(--act-text);
  border: 1px solid var(--act-border);
}

/* =================================================
   TABLE
   ================================================= */
.judg-table {
  width: 100%;
  border-collapse: collapse;
}

.judg-table th,
.judg-table td {
  border: 1px solid var(--act-border);
  padding: 8px;
  background: var(--act-bg);
  color: var(--act-text);
}

.judg-table th {
  cursor: pointer;
  font-weight: 600;
}

.act-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

.act-table th,
.act-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-card);
  text-align: left;
  vertical-align: middle;
}

.act-table th {
  background: rgba(100, 116, 139, 0.2);
  font-weight: 700;
}

.status.active {
  color: #137333;
}

.status.inactive {
  color: #c5221f;
}

.no-data {
  text-align: center;
  padding: 16px;
}

.form-error {
  color: #c5221f;
  margin-top: 8px;
}

.act-page h2 {
  text-align: left;
  margin: 12px auto;
  font-size: 1.4rem;
  font-weight: 700;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.act-table button,
.act-inline-form button {
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.act-table .edit-btn {
  background: var(--primary);
  color: #ffffff;
}

.act-table .delete-btn {
  background: var(--danger);
  color: #ffffff;
}
/* ===== Disabled Edit button ===== */
.action-buttons .edit-btn:disabled {
  background-color: #e6ecf5 !important; /* muted blue-grey */
  color: #8a9bb5 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===== Disabled Delete button (already discussed) ===== */
.action-buttons .delete-btn:disabled {
  background-color: #f2dede !important; /* muted red */
  color: #b94a48 !important;
  border-color: #ebccd1 !important;
  cursor: not-allowed;
  opacity: 0.5;
}
/* Save / Cancel colors */
.save-btn {
  background: var(--primary);
  color: #ffffff;
}

.cancel-btn {
  background: var(--danger);
  color: #ffffff;
}

/* ===== SORTABLE TABLE HEADERS (EXCLUDE ACTION COLUMN) ===== */
.act-table th:not(:last-child) {
  cursor: pointer;
  user-select: none;
}

.act-table th:not(:last-child):hover {
  opacity: 0.85;
}

/* ==========================================
   Act inline form – input width control
   shortName : longName = 1 : 3
   ========================================== */

.act-inline-form input[name="shortName"] {
  flex: 1;
}

.act-inline-form input[name="longName"] {
  flex: 3;
}

/* ===============================
   Center Toast – Success
   =============================== */
.toast-center-success {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #28a745;
  color: #fff;
  padding: 14px 26px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  animation: fadeInOut 5s ease-in-out;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ======================================================
   USER MANAGEMENT – FINAL STABLE PRODUCTION CSS
   ====================================================== */

/* ================= THEME VARIABLES ================= */
:root {
  --page-padding: 20px;
  --content-padding: 12px;

  --bg-page: #f2f4f8;
  --bg-card: #e9edf3;
  --border-card: #c3cbd9;

  --text-main: #1f2937;
  --text-muted: #4b5563;

  --primary: #1e40af;
  --primary-dark: #1e3a8a;

  --danger: #b91c1c;
  --danger-dark: #7f1d1d;
}

/* ================= DARK THEME ================= */
[data-theme="dark"] {
  --bg-page: #0f172a;
  --bg-card: #1e293b;
  --border-card: #334155;

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;

  --primary: #3b82f6;
  --primary-dark: #2563eb;

  --danger: #ef4444;
  --danger-dark: #dc2626;
}

/* ================= PAGE ================= */
.user-page {
  padding: var(--page-padding);
  background: var(--bg-page);
  color: var(--text-main);
  min-height: 100%;
}

/* ================= HEADER ================= */
.user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: var(--content-padding);
  padding-right: var(--content-padding);
  margin-bottom: 14px;
}

.user-header h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
}

/* ================= ADD USER BUTTON ================= */
.add-user-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  white-space: nowrap;

  background: linear-gradient(135deg, #1e411e, #308409);
  color: #000000;
  border: none;

  box-shadow: 0 8px 22px rgba(30, 64, 175, 0.45);
}

/* ================= SUMMARY CARDS ================= */
.user-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 16px 14px 16px 20px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.card span {
  display: block;
  font-size: 28px;
  font-weight: 800;
  margin-top: 6px;
}

/* ================= CARD LEFT STRIP ================= */
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 100%;
  border-radius: 14px 0 0 14px;
  background: #f5bb04;
}

.user-cards .card:nth-child(2)::before {
  background: #ef4444;
}
.user-cards .card:nth-child(3)::before {
  background: #22c55e;
}
.user-cards .card:nth-child(4)::before {
  background: #3b82f6;
}
.user-cards .card:nth-child(5)::before {
  background: #a855f7;
}

/* ================= TOOLBAR ================= */
.user-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-left: var(--content-padding);
  padding-right: var(--content-padding);
  margin-bottom: 16px;
}

.user-toolbar input,
.user-toolbar select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  font-size: 14px;
  background: #ffffff;
}

/* ================= FORM ================= */
.user-form {
  margin: 10px var(--content-padding) 20px;
  background: #dde3ec;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

[data-theme="dark"] .user-form {
  background: var(--bg-card);
}

/* ================= FORM FIELD GROUP ================= */
.user-form .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ================= LABEL (EDIT MODE) ================= */
.user-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ================= NORMALIZED INPUT HEIGHT ================= */
.user-form input,
.user-form select {
  height: 40px; /* uniform height */
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  font-size: 14px;
  box-sizing: border-box;
}

/* ================= TABLE ================= */
.user-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

.user-table th,
.user-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-card);
  text-align: left;
  vertical-align: middle;
}

.user-table th {
  background: rgba(100, 116, 139, 0.2);
  font-weight: 700;
}

/* ================= ACTION BUTTONS ================= */
.action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.user-table button {
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.user-table .edit-btn {
  background: var(--primary);
  color: #ffffff;
}

.user-table .delete-btn {
  background: var(--danger);
  color: #ffffff;
}

/* ================= STATUS ================= */
.status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status.active {
  background: #bbf7d0;
  color: #14532d;
}

.status.inactive {
  background: #fecaca;
  color: #7f1d1d;
}

/* ================= EMPTY ================= */
.empty {
  text-align: center;
  padding: 22px;
  color: var(--text-muted);
}

/* ================= PASSWORD MASK ================= */
.password-mask {
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ================= FORM ERROR ================= */
.form-error {
  color: #b91c1c;
  font-size: 13px;
}

/* ================= SUMMARY CARDS (RESTORED – STAGE 1) ================= */

.user-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 16px 14px 16px 20px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.card span {
  display: block;
  font-size: 28px;
  font-weight: 800;
  margin-top: 6px;
}

/* ===== LEFT COLOR STRIP (AS EARLIER) ===== */
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 100%;
  border-radius: 14px 0 0 14px;
  background: #f5bb04;
}

.user-cards .card:nth-child(2)::before {
  background: #ef4444;
}
.user-cards .card:nth-child(3)::before {
  background: #22c55e;
}
.user-cards .card:nth-child(4)::before {
  background: #3b82f6;
}
.user-cards .card:nth-child(5)::before {
  background: #a855f7;
}

/* =====================================================
   USER TOOLBAR – PROFESSIONAL ALIGNMENT FIX
===================================================== */

/* Toolbar row */
.user-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap; /* stay in one line */
}

/* Unified control height */
.user-filters input,
.user-filters select,
.user-filters .add-user-btn {
  height: 36px; /* SAME height */
  line-height: 36px;
  box-sizing: border-box;
}

/* Controlled widths */
.user-filters input {
  width: 260px; /* search box */
}

.user-filters select {
  width: 150px; /* dropdowns */
}

/* Button alignment */
.user-filters .add-user-btn {
  padding: 0 16px; /* horizontal only */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Responsive fallback */
@media (max-width: 900px) {
  .user-filters {
    flex-wrap: wrap; /* wrap ONLY on small screens */
  }

  .user-filters input,
  .user-filters select {
    width: 100%;
  }
}
/* =====================================================
   USER HEADER ↔ TOOLBAR SPACING CONSISTENCY
===================================================== */

.user-header {
  margin-bottom: 14px; /* same visual rhythm */
}

.user-filters {
  margin-top: 0; /* prevent double gaps */
}

/* Ensure Add User button aligns vertically with inputs */
.user-filters .add-user-btn {
  margin-left: auto; /* keeps it aligned but spaced */
}

/* =====================================================
   USER FILTER TOOLBAR – HEIGHT & ALIGNMENT LOCK
===================================================== */

/* Single source of vertical spacing */
.user-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin-top: 0;
  margin-bottom: 14px; /* SAME spacing for all controls */
}

/* Unified control box model */
.user-filters input,
.user-filters select,
.user-filters button {
  height: 36px; /* ONE canonical height */
  min-height: 36px;
  line-height: 36px;
  margin: 0; /* SAME top & bottom margins */
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
}

/* Search width */
.user-filters input {
  width: 260px;
  padding-left: 12px;
  padding-right: 12px;
}

/* Dropdown widths */
.user-filters select {
  width: 150px;
  padding-left: 10px;
  padding-right: 10px;
  cursor: pointer;
}

/* Reset button */
.user-filters .reset-btn {
  padding-left: 14px;
  padding-right: 14px;
}

/* Add User button */
.user-filters .add-user-btn {
  margin-left: auto; /* keeps it aligned to the right */
  padding-left: 16px;
  padding-right: 16px;
  white-space: nowrap;
}

/* Responsive fallback */
@media (max-width: 900px) {
  .user-filters {
    flex-wrap: wrap;
  }

  .user-filters input,
  .user-filters select {
    width: 100%;
  }

  .user-filters .add-user-btn {
    margin-left: 0;
  }
}

/* =====================================================
   USER TABLE – VERTICAL SCROLL (DATA ONLY)
===================================================== */

/* ================= USER TABLE – SCROLL FIX (FINAL) ================= */

.user-table-wrapper {
  border: 1px solid var(--border-card);
  border-radius: 8px;
}

/* Make table sections behave independently */
.user-table {
  border-collapse: collapse;
  width: 100%;
}

/* Fixed header */
.user-table thead {
  display: table;
  width: 100%;
  table-layout: fixed;
}

/* Scrollable body */
.user-table tbody {
  display: block;
  max-height: calc(100vh - 420px); /* viewport-aware */
  overflow-y: auto;
  width: 100%;
}

/* Keep row widths aligned */
.user-table thead tr,
.user-table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

/* Reduce space between Status and Action */
.user-table th:nth-child(5),
.user-table td:nth-child(5) {
  width: 90px;
  white-space: nowrap;
}

/* Keep action column compact */
.user-table th:nth-child(6),
.user-table td:nth-child(6) {
  width: 190px;
  white-space: nowrap;
}

.action-buttons {
  gap: 4px;
}
/* =====================================================
   RESET BUTTON – TEXT-FIT WIDTH ONLY (FINAL FIX)
===================================================== */

.reset-btn {
  width: auto; /* do NOT stretch */
  min-width: unset; /* remove inherited min-width */
  padding-left: 12px; /* compact horizontal padding */
  padding-right: 12px;
  white-space: nowrap; /* prevent wrapping */
  border-radius: 999px; /* pill shape like Add User */
}

/* ================= INLINE ADD USER FORM ================= */

/* ================= INLINE ADD USER FORM (CORRECTED) ================= */

.user-inline-form {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-inline-form .form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Inputs & selects — fit to content, fixed height */
.user-inline-form input,
.user-inline-form select {
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  font-size: 14px;

  width: auto; /* 👈 critical */
  min-width: unset; /* 👈 prevents stretch */
  max-width: max-content; /* 👈 fit to content */
  box-sizing: border-box;
}

/* Buttons — STRICT fit to text */
.user-inline-form button {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;

  width: auto; /* 👈 critical */
  min-width: unset; /* 👈 prevents flex stretch */
  flex: 0 0 auto; /* 👈 DO NOT grow or shrink */
}

/* Save / Cancel colors */
.save-btn {
  background: var(--primary);
  color: #ffffff;
}

.cancel-btn {
  background: var(--danger);
  color: #ffffff;
}

.cancel-btn {
  background: var(--danger);
  color: #fff;
}

/* =====================================================
   USER TABLE – COMPACT ROW HEIGHT (SAFE REDUCTION)
   ===================================================== */

/* Reduce table row vertical spacing */
.user-table th,
.user-table td {
  padding-top: 6px;
  padding-bottom: 6px;
}

/* Reduce header height slightly */
.user-table th {
  padding-top: 7px;
  padding-bottom: 7px;
}

/* Compact readonly email textbox */
.user-table .email-cell {
  height: 24px;
  line-height: 24px;
  padding: 0 6px;
  font-size: 13px;
  color: inherit;
  
  border: none;
  background: transparent;

  width: 100%;
  box-sizing: border-box;

  overflow-x: auto;
  white-space: nowrap;
}

/* Keep focus visible for keyboard users */
.user-table .email-cell:focus {
  outline: 1px dotted var(--border-card);
}

/* =====================================================
   USER TABLE – REDUCE GAP BETWEEN USERTYPE & USERNAME
   ===================================================== */

/* Narrow the usertype column slightly */
.user-table th:nth-child(1),
.user-table td:nth-child(1) {
  width: 110px; /* reduced from auto */
  white-space: nowrap;
}
/* =====================================================
   USERNAME COLUMN – READONLY, SINGLE LINE, BORDERLESS
   ===================================================== */

.username-cell {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;

  font: inherit;
  color: inherit;

  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;

  outline: none;
  cursor: text;
}

/* =====================================================
   USERNAME COLUMN – BORDERLESS (FINAL)
   ===================================================== */

.username-cell {
  border: none !important;
  outline: none !important;
  background: transparent;
}

/* Remove focus ring completely */
.username-cell:focus,
.username-cell:focus-visible {
  border: none !important;
  outline: none !important;
}
/* =====================================================
   UID COLUMN – READONLY, SCROLLABLE, BORDERLESS
   ===================================================== */

.uid-cell {
  width: 100%;
  border: none !important;
  outline: none !important;
  background: transparent;

  font: inherit;
  color: inherit;

  padding: 0;
  margin: 0;

  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;

  cursor: text;
}

/* Remove any focus chrome */
.uid-cell:focus,
.uid-cell:focus-visible {
  border: none !important;
  outline: none !important;
}
/* =====================================================
   UID & USERNAME – MATCH EMAIL FOCUS BEHAVIOR
   ===================================================== */

/* Show dotted focus border like Email */
.uid-cell:focus,
.uid-cell:focus-visible,
.username-cell:focus,
.username-cell:focus-visible {
  outline: 1px dotted var(--border-card);
  outline-offset: 2px;
}
/* =====================================================
   FORCE FOCUS OUTLINE FOR UID & USERNAME (FINAL FIX)
   ===================================================== */

.uid-cell:focus,
.uid-cell:focus-visible,
.username-cell:focus,
.username-cell:focus-visible {
  outline: 1px dotted var(--border-card) !important;
  outline-offset: 2px;
}

/* =====================================================
   USER TABLE – ALIGN ALL COLUMNS WITH EMAIL METRICS
   (FONT SIZE, HEIGHT, LINE-HEIGHT)
   ===================================================== */

/* Canonical metrics taken from .email-cell */
.user-table td,
.user-table td input,
.user-table td span {
  font-size: 13px;
  line-height: 24px;
  vertical-align: middle;
}

/* Ensure inputs do not inflate row height */
.user-table td input {
  height: 24px;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}

/* Password mask aligned with email */
.user-table .password-mask {
  display: inline-flex;
  align-items: center;
  height: 24px;
  line-height: 24px;
  font-size: 13px;
}

/* UserType (plain text) alignment */
.user-table td:first-child {
  line-height: 24px;
  font-size: 13px;
}

/* UserStatus pill vertical alignment */
.user-table .status {
  height: 24px;
  line-height: 24px;
  font-size: 12px; /* kept as-is visually */
  display: inline-flex;
  align-items: center;
}

/* =====================================================
   SORTABLE HEADER INDICATOR (WORKING – REACT SAFE)
   ===================================================== */

/* All headers except Action are sortable */
.user-table th:not(:last-child) {
  position: relative;
  cursor: pointer;
}

/* Append up/down arrows */
.user-table th:not(:last-child)::after {
  content: " ▲▼";
  font-size: 10px;
  opacity: 0.6;
  margin-left: 4px;
}
/* Disabled action buttons – visual cue */
.action-buttons button:disabled {
  background-color: #e0e0e0 !important; /* muted grey */
  color: #9e9e9e !important;
  border-color: #cfcfcf !important;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Prevent hover/focus styles from overriding disabled look */
.action-buttons button:disabled:hover,
.action-buttons button:disabled:focus {
  background-color: #e0e0e0 !important;
  color: #9e9e9e !important;
  box-shadow: none !important;
}
.action-buttons .delete-btn:disabled {
  background-color: #f2dede !important;
  color: #b94a48 !important;
  opacity: 0.5;
}
/* ===== Disabled Edit button ===== */
.action-buttons .edit-btn:disabled {
  background-color: #e6ecf5 !important;  /* muted blue-grey */
  color: #8a9bb5 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===== Disabled Permissions button ===== */
.action-buttons .permission-btn:disabled {
  background-color: #f3efe4 !important;  /* muted amber */
  color: #a68b44 !important;
  border-color: #e2d3a1 !important;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===== Disabled Delete button (already discussed) ===== */
.action-buttons .delete-btn:disabled {
  background-color: #f2dede !important;  /* muted red */
  color: #b94a48 !important;
  border-color: #ebccd1 !important;
  cursor: not-allowed;
  opacity: 0.5;
}

/* ===== Prevent hover/focus overriding disabled ===== */
.action-buttons button:disabled:hover,
.action-buttons button:disabled:focus {
  box-shadow: none !important;
}


/*
/* UID column width */
.user-table th:nth-child(2),
.user-table td:nth-child(2) {
  width: 140px;
}

/* Username column width */
.user-table th:nth-child(3),
.user-table td:nth-child(3) {
  width: 160px;
}

/* Email column – reduce width */
.user-table th:nth-child(4),
.user-table td:nth-child(4) {
  width: 200px;   /* adjust as needed */
}/* ================= PERMISSION MODAL ================= */

.perm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.perm-modal {
  background: var(--bg-card);
  color: var(--text-main);
  width: 720px;
  max-width: 95%;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}

.perm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.perm-header h3 {
  margin: 0;
  font-size: 18px;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: inherit;
}

.perm-subtitle {
  margin: 10px 0 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.perm-loading {
  padding: 20px;
  text-align: center;
}

.perm-table {
  width: 100%;
  border-collapse: collapse;
}

.perm-table th,
.perm-table td {
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid var(--border-card);
}

.perm-table th {
  background: rgba(100,116,139,0.2);
  font-size: 12px;
}

.perm-table .resource {
  text-align: left;
  font-weight: 600;
  text-transform: capitalize;
}

.perm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.perm-footer .save-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 700;
}

.perm-footer .cancel-btn {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 700;
}

.perm-error {
  margin-top: 10px;
  color: var(--danger);
  font-size: 13px;
}
/* ===================== LAYOUT ===================== */

.login-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f4f6fb, #e9ecf5);
  z-index: 1000;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  padding: 32px 28px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.login-icon {
  width: 88px;
  height: 88px;
  margin-bottom: 14px;
}

.login-title {
  margin: 8px 0 20px;
  font-size: 22px;
  font-weight: 600;
  color: #1f2937;
}

/* ===================== FORM ===================== */

.form-group {
  margin-bottom: 16px;
}

/* Neutral grey inputs – consistent & browser-safe */
.form-group input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  background-color: #e5e7eb;
  color: #111827;
  transition: border 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-group input::placeholder {
  color: #6b7280;
}

/* 🚫 Kill Chrome autofill visuals completely */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #e5e7eb inset !important;
  -webkit-text-fill-color: #111827 !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* ===================== BUTTON ===================== */

.btn-primary {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.btn-primary:hover {
  background: #1e40af;
}

.btn-primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* ===================== ERROR ===================== */

.login-error {
  margin-top: 10px;
  padding: 8px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  font-size: 13px;
}


/* ===================== DARK MODE ===================== */

body.dark-mode .login-wrapper {
  background: linear-gradient(135deg, #0f172a, #020617);
}

body.dark-mode .login-card {
  background: #020617;
  color: #e5e7eb;
}

body.dark-mode .form-group input {
  background-color: #020617;
  color: #e5e7eb;
  border-color: #334155;
}

body.dark-mode .form-group input::placeholder {
  color: #64748b;
}

/* ===================== FORGOT PASSWORD LINK ===================== */

.login-links {
  margin-top: 14px;        /* creates gap from Login button */
  text-align: center;
}

.login-links a {
  font-size: 13px;         /* slightly smaller than inputs/buttons */
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
}

.login-links a:hover {
  text-decoration: underline;
}
/* ===============================
   LOGIN BUTTON WIDTH CONTROL
=============================== */

.login-btn {
  width: auto;               /* shrink to content */
  padding: 8px 18px;         /* controls button size */
  display: inline-flex;      /* keeps icon + text aligned */
  align-items: center;
  gap: 6px;                  /* space between icon and text */
  margin: 8px auto 0;        /* center horizontally */
}
.login-info {
  background: #ae6a56;
  color: #fbfbfb;
  border: 1px solid #ffeeba;
  padding: 8px;
  margin-bottom: 10px;
  text-align: center;
  border-radius: 4px;
  font-size: 14px;
}
/* ===============================
   WRAPPER
=============================== */

.fp-wrapper {
  background-color: #f5f7fa;
  padding: 28px 16px 16px;
  display: flex;
  justify-content: center;   /* horizontal centering */
}

/* ===============================
   CARD (COMPACT)
=============================== */

.fp-card {
  width: fit-content;
  min-width: 320px;
  background: #ffffff;
  padding: 22px 26px 20px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  text-align: center;
}

/* ===============================
   TITLE & INFO
=============================== */

.fp-card h2 {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.fp-info {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 14px;
  line-height: 1.4;
}

/* ===============================
   INPUT (PLACEHOLDER ONLY)
=============================== */

.fp-input {
  width: 280px;
  padding: 10px;
  margin: 0 auto 14px;
  display: block;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  background-color: #f9fafb;
}

.fp-input:focus {
  outline: none;
  border-color: #2563eb;
  background-color: #ffffff;
}

/* ===============================
   BUTTON
=============================== */

.fp-btn {
  width: auto;
  padding: 8px 18px;
  margin: 0 auto;
  display: block;
  background-color: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.fp-btn:hover {
  background-color: #1e40af;
}

.fp-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===============================
   MESSAGE
=============================== */

.fp-msg {
  margin-top: 12px;
  font-size: 13px;
  color: #065f46;
}

/* ===============================
   MOBILE SAFETY
=============================== */

@media (max-width: 380px) {
  .fp-card {
    min-width: unset;
    width: 100%;
  }

  .fp-input {
    width: 100%;
  }
}
/* =====================================================
   RESET PASSWORD – COMPACT BORDERED WRAPPER
===================================================== */

/* =====================================================
   RESET PASSWORD – TOP OFFSET (FINAL POLISH)
===================================================== */

.auth-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;     /* horizontal center */
  align-items: flex-start;     /* 🔑 move away from vertical center */
  padding-top: 80px;           /* 🔑 distance from top */
}

.auth-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 🔒 Wrapper around inputs + button */
.reset-box {
  display: flex;
  flex-direction: column;
  gap: 12px;

  padding: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;

  width: fit-content;     /* 🔑 do NOT stretch */
  margin: 0 auto;
}

/* Inputs – content-fit */
.reset-box input {
  width: auto;
  min-width: 240px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
}

/* Button – content-fit */
.reset-box .auth-btn {
  width: auto;
  align-self: center;
  padding: 8px 20px;
  white-space: nowrap;
}

/* Messages */
.auth-error,
.auth-success {
  margin-top: 14px;
  text-align: center;
}
/* =====================================================
   RESET PASSWORD – SUBTEXT REFINEMENT
===================================================== */

.auth-subtext {
  font-size: 13px;          /* smaller than heading/body */
  color: #6b7280;           /* neutral grey */
  margin-top: 4px;
  margin-bottom: 20px;      /* extra breathing space */
  text-align: center;
}
/* ==============================
   ADMIN SETTINGS – PRODUCTION UI
============================== */

.admin-settings {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.admin-settings h2 {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 600;
}

/* ==============================
   GRID LAYOUT
============================== */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  align-items: stretch;
}

/* ==============================
   CARD
============================== */

.settings-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.settings-card.danger {
  border-left: 4px solid #dc2626;
}

.settings-card.green {
  border-left: 4px solid hsl(129, 87%, 59%);
}

/* ==============================
   HEADERS
============================== */

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.card-title.danger {
  color: #b91c1c;
}

/* ==============================
   FORM
============================== */

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* ==============================
   BUTTONS
============================== */

.btn {
  margin-top: 12px;
  padding: 10px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.btn.primary {
  background: #2563eb;
  color: #ffffff;
}

.btn.primary:hover {
  background: #1d4ed8;
}

.btn.secondary {
  background: #374151;
  color: #ffffff;
}

.btn.secondary:hover {
  background: #1f2937;
}

.btn.danger {
  background: #dc2626;
  color: #ffffff;
}

.btn.danger:hover {
  background: #b91c1c;
}

.btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* ==============================
   ALERTS
============================== */

.alert {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.alert.success {
  background: #dcfce7;
  color: #166534;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

/* ==============================
   LOADING
============================== */

.admin-loading {
  padding: 20px;
}



/* ==============================
   MOBILE
============================== */

@media (max-width: 480px) {
  .admin-settings {
    padding: 14px;
  }

  .settings-card {
    padding: 16px;
  }
}
/* ==============================
   DARK THEME FIX – ADMIN SETTINGS
============================== */

[data-theme="dark"] .admin-settings {
  background: transparent;
}

[data-theme="dark"] .settings-card {
  background: #1f2937; /* dark slate */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .card-title {
  color: #f9fafb;
  border-bottom-color: #374151;
}

[data-theme="dark"] .card-title.danger {
  color: #fca5a5;
}

/* 🔑 FIX: LABEL VISIBILITY */
[data-theme="dark"] .form-group label {
  color: #e5e7eb;
}

/* INPUTS & SELECTS */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select {
  background-color: #111827;
  color: #f9fafb;
  border-color: #374151;
}

[data-theme="dark"] .form-group input::placeholder {
  color: #9ca3af;
}

/* ALERTS */
[data-theme="dark"] .alert.success {
  background: #064e3b;
  color: #d1fae5;
}

[data-theme="dark"] .alert.error {
  background: #7f1d1d;
  color: #fee2e2;
}
/* ======================================================
   USER MANAGEMENT – FINAL STABLE PRODUCTION CSS
   ====================================================== */

/* ================= THEME VARIABLES ================= */
:root {
  --page-padding: 20px;
  --content-padding: 12px;

  --bg-page: #f2f4f8;
  --bg-card: #e9edf3;
  --border-card: #c3cbd9;

  --text-main: #1f2937;
  --text-muted: #4b5563;

  --primary: #1e40af;
  --primary-dark: #1e3a8a;

  --danger: #b91c1c;
  --danger-dark: #7f1d1d;
}

/* ================= DARK THEME ================= */
[data-theme="dark"] {
  --bg-page: #0f172a;
  --bg-card: #1e293b;
  --border-card: #334155;

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;

  --primary: #3b82f6;
  --primary-dark: #2563eb;

  --danger: #ef4444;
  --danger-dark: #dc2626;
}

/* ================= PAGE ================= */
.journal-page {
  padding: var(--page-padding);
  background: var(--bg-page);
  color: var(--text-main);
  min-height: 100%;
}
/*************************************************
 * Journal.css – PRODUCTION READY (THEME AWARE)
 *************************************************/

/* =================================================
   THEME VARIABLES (inherits from User UI theme)
   ================================================= */
:root {
  --journal-bg: #64748b33;
  --journal-text: #222222;
  --journal-border: #dddddd;
  --journal-shadow: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
  --journal-bg: #1e293b;
  --journal-text: #ffffff;
  --journal-border: #334155;
  --journal-shadow: rgba(0, 0, 0, 0.6);
}

/* =================================================
   SUMMARY CARDS
   ================================================= */
.journal-cards {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.journal-card {
  width: 280px;
  height: 120px;
  padding: 14px 16px;
  border-radius: 6px;

  background: var(--journal-bg);
  color: var(--journal-text);

  display: flex;
  flex-direction: column;
  justify-content: center;

  border-left: 6px solid transparent;
  box-shadow: 0 2px 6px var(--journal-shadow);

  font-size: 14px;
  font-weight: 600;
}

.journal-card span {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 700;
}

/* =================================================
   CARD LEFT BORDER COLORS (DO NOT CHANGE)
   ================================================= */
.journal-card.total {
  border-left-color: #dc2626; /* red */
}

.journal-card.active {
  border-left-color: #16a34a; /* green */
}

.journal-card.inactive {
  border-left-color: #f59e0b; /* yellow */
}

/* =================================================
   TOOLBAR
   ================================================= */
.journal-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.journal-filters input {
  flex: 1;
  padding: 6px 8px;
  background: var(--journal-bg);
  color: var(--journal-text);
  border: 1px solid var(--journal-border);
}

.journal-filters input::placeholder {
  color: #888;
}

.add-journal-btn {
  padding: 6px 12px;
  cursor: pointer;
}

.add-journal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  white-space: nowrap;

  background: linear-gradient(135deg, #1e411e, #308409);
  color: #000000;
  border: none;

  box-shadow: 0 8px 22px rgba(30, 64, 175, 0.45);
}

/* =================================================
   INLINE FORM
   ================================================= */
.journal-inline-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.journal-inline-form input,
.journal-inline-form select {
  padding: 6px;
  background: var(--journal-bg);
  color: var(--journal-text);
  border: 1px solid var(--journal-border);
}

/* =================================================
   TABLE
   ================================================= */
.judg-table {
  width: 100%;
  border-collapse: collapse;
}

.judg-table th,
.judg-table td {
  border: 1px solid var(--journal-border);
  padding: 8px;
  background: var(--journal-bg);
  color: var(--journal-text);
}

.judg-table th {
  cursor: pointer;
  font-weight: 600;
}

.journal-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

.journal-table th,
.journal-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-card);
  text-align: left;
  vertical-align: middle;
}

.journal-table th {
  background: rgba(100, 116, 139, 0.2);
  font-weight: 700;
}

.status.active {
  color: #137333;
}

.status.inactive {
  color: #c5221f;
}

.no-data {
  text-align: center;
  padding: 16px;
}

.form-error {
  color: #c5221f;
  margin-top: 8px;
}

.journal-page h2 {
  text-align: left;
  margin: 12px auto;
  font-size: 1.4rem;
  font-weight: 700;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.journal-table button,
.journal-inline-form button {
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.journal-table .edit-btn {
  background: var(--primary);
  color: #ffffff;
}

.journal-table .delete-btn {
  background: var(--danger);
  color: #ffffff;
}
/* ===== Disabled Edit button ===== */
.action-buttons .edit-btn:disabled {
  background-color: #e6ecf5 !important; /* muted blue-grey */
  color: #8a9bb5 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===== Disabled Delete button (already discussed) ===== */
.action-buttons .delete-btn:disabled {
  background-color: #f2dede !important; /* muted red */
  color: #b94a48 !important;
  border-color: #ebccd1 !important;
  cursor: not-allowed;
  opacity: 0.5;
}
/* Save / Cancel colors */
.save-btn {
  background: var(--primary);
  color: #ffffff;
}

.cancel-btn {
  background: var(--danger);
  color: #ffffff;
}

/* ===== SORTABLE TABLE HEADERS (EXCLUDE ACTION COLUMN) ===== */
.journal-table th:not(:last-child) {
  cursor: pointer;
  user-select: none;
}

.journal-table th:not(:last-child):hover {
  opacity: 0.85;
}

/* ==========================================
   journal inline form – input width control
   shortName : longName = 1 : 3
   ========================================== */

.journal-inline-form input[name="shortName"] {
  flex: 1;
}

.journal-inline-form input[name="longName"] {
  flex: 3;
}

/* ===============================
   Center Toast – Success
   =============================== */
.toast-center-success {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #28a745;
  color: #fff;
  padding: 14px 26px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  animation: fadeInOut 5s ease-in-out;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ==================================================
   RESET & BASE
================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ==================================================
   NAVBAR
================================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--navbar-bg);
  color: var(--navbar-text);
}

.logo-icon {
  width: 45px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-right .button-log,
.nav-right .button-theme 
 { 
  white-space: nowrap; 
}

.nav-icon {
  width: 22px;
}

.navbar button {
  height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #e74c3c;
  color: #ffffff;
}

.navbar .button-log{
  height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #e74c3c;
  color: #ffffff;
}
.navbar .button-theme {
  height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #269d45;
  color: #ffffff;
}

.navbar .title {
  font-size: 20px;
}

#themeToggle {
  background: #16a085;
}

/* ==================================================
   HAMBURGER
================================================== */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  height: 3px;
  width: 25px;
  background: var(--navbar-text);
  margin: 4px 0;
}

/* ==================================================
   MAIN LAYOUT
================================================== */
.container {
  display: flex;
  min-height: calc(100vh - 60px); /* viewport minus footer height */
  padding-bottom: 60px;           /* prevents overlap with footer */
  min-width: 0;   /* ✅ ADD THIS LINE ONLY */
}

/* ==================================================
   LEFT SIDEBAR
================================================== */
.sidebar {
  width: 250px;
  background: var(--sidebar-bg);
  color: var(--navbar-text);
  padding: 15px;
}

.sidebar ul {
  list-style: none;
  padding-top: 40px;
}

.sidebar li {
  padding: 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.sidebar li:hover {
  background: var(--sidebar-hover);
}

.menu-icon {
  width: 20px;
  margin-right: 10px;
}

.close-btn {
  display: none;
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
}

/* ==================================================
   CONTENT
================================================== */
.content {
  flex: 1;
  padding: 20px;
  background: var(--content-bg);
  min-width: 0;   /* ✅ ADD THIS LINE ONLY */
}

/* ==================================================
   RIGHT SIDEBAR
================================================== */
.right-sidebar {
  width: 220px;
  background: var(--right-bg);
  padding: 15px;

  display: flex;
  flex-direction: column;
  gap: 12px;
}

.right-sidebar button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #ffffff;
  cursor: pointer;
}

/* ==================================================
   FOOTER — ALWAYS AT BOTTOM (FIXED)
================================================== */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--footer-bg);
  color: var(--navbar-text);
  z-index: 3000;
}

/* ==================================================
   OVERLAY
================================================== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  z-index: 2000;
}

/* ==================================================
   MOBILE RESPONSIVE
================================================== */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .right-sidebar {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    height: 100%;
    transition: left 0.3s ease-in-out;
    z-index: 2500;
  }

  .sidebar.active {
    left: 0;
  }

  .close-btn {
    display: block;
  }

  .overlay.active {
    display: block;
  }
}
/* ==================================================
   GLOBAL THEME VARIABLES
   SINGLE SOURCE OF TRUTH
   Controlled via <html data-theme="light|dark">
================================================== */

/* ==================================================
   LIGHT THEME (DEFAULT)
================================================== */
:root {
  /* ---------- Base ---------- */
  --bg: #ffffff;
  --text: #000000;
  --muted: #6b7280;

  /* ---------- Layout ---------- */
  --content-bg: #ffffff;
  --right-bg: #ecf0f1;
  --overlay-bg: rgba(0, 0, 0, 0.5);

  /* ---------- Panels / Borders ---------- */
  --panel: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.08);

  /* ---------- Navbar ---------- */
  --navbar-bg: #2c3e50;
  --navbar-text: #ffffff;

  /* ---------- Sidebar ---------- */
  --sidebar-bg: #34495e;
  --sidebar-hover: #3d566e;

  /* ---------- Footer ---------- */
  --footer-bg: #2c3e50;

  /* ==================================================
     SEMANTIC ACTION COLORS
     (used across Profile / Article / Dashboard)
  ================================================== */

  /* View / Primary */
  --primary: #4f86ff;
  --primary-hover: #3a6fe0;

  /* Edit */
 
  --edit: #eab208;  /* amber-500 */
  --edit-hover: #facc15;/* amber-400 */
  --edit-text: #000000;

  /* Delete / Danger */
  --danger: #dc2626;
  --danger-hover: #b91c1c;

  /* Warning / Info */
  --warning: #fde68a;
  --warning-dark: #facc15;
}

/* ==================================================
   DARK THEME
================================================== */
[data-theme="dark"] {
  /* ---------- Base ---------- */
  --bg: #1e1e1e;
  --text: #f0f0f0;
  --muted: #9ca3af;

  /* ---------- Layout ---------- */
  --content-bg: #121212;
  --right-bg: #1f2937;
  --overlay-bg: rgba(0, 0, 0, 0.7);

  /* ---------- Panels / Borders ---------- */
  --panel: #111827;
  --border: #374151;
  --shadow: 0 3px 10px rgba(0, 0, 0, 0.5);

  /* ---------- Navbar ---------- */
  --navbar-bg: #111827;
  --navbar-text: #f9fafb;

  /* ---------- Sidebar ---------- */
  --sidebar-bg: #1f2937;
  --sidebar-hover: #374151;

  /* ---------- Footer ---------- */
  --footer-bg: #111827;

  /* ==================================================
     SEMANTIC ACTION COLORS
  ================================================== */

  /* View / Primary */
  --primary: #5b8cff;
  --primary-hover: #4a7ae6;

  /* Edit */
  --edit: #fde047;        /* amber-300 */
  --edit-hover: #facc15;  /* amber-400 */
  --edit-text: #1f2937;

  /* Delete / Danger */
  --danger: #ef4444;
  --danger-hover: #dc2626;

  /* Warning / Info */
  --warning: #fef08a;
  --warning-dark: #fde047;
}
/* ==================================================
   SEMANTIC ACTION — ADD / CREATE
================================================== */

/* Light theme */
:root {
  --success: #16a34a;        /* green-600 */
  --success-hover: #15803d; /* green-700 */
  --success-text: #ffffff;
}

/* Dark theme */
[data-theme="dark"] {
  --success: #22c55e;        /* green-500 */
  --success-hover: #16a34a;  /* green-600 */
  --success-text: #052e16;
}
