:root {
  /* Core Palette - Blue & Grey */
  --primary-color: #2563eb; /* Royal Blue */
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b; /* Slate Grey */
  --accent-color: #3b82f6;
  
  --bg-body: #f1f5f9; /* Light Slate Grey Background */
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a; /* Dark Slate Blue */
  
  --text-main: #1e293b; /* Very Dark Slate */
  --text-muted: #64748b;
  --text-light: #f8fafc;
  
  --border-color: #e2e8f0;
  
  /* UX Variables */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --transition-speed: 0.2s;

  --footer-banner-space: 64px;

}

html, body {
  height: 100%;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--footer-banner-space);
  min-height: 100vh;
}

.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-layout-row {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  min-height: 100vh;
}

/* Forms */
form p {
  margin-bottom: 1rem;
}

form label {
  display: inline-block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form input[type="date"],
form input[type="datetime-local"],
form input[type="file"],
form input[type="tel"],
form input[type="url"],
form select,
form textarea {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  color: var(--text-main);
  caret-color: var(--text-main);
}

form input::placeholder,
form textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

/* Bootstrap form helpers (used by most Django forms) */
.form-control,
.form-select {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.2rem rgb(37 99 235 / 0.15);
}

form textarea {
  min-height: 6rem;
}

form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.2rem rgb(37 99 235 / 0.15);
}

.form-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-card-grid p {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 0.9rem;
}

.form-card-grid p:has(textarea),
.form-card-grid p:has(select[multiple]),
.form-card-grid p:has(input[type="file"]) {
  grid-column: span 2;
}

.form-card-grid p:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.form-card-grid p:has(input[type="checkbox"]) label {
  margin: 0;
}

.form-card-grid .helptext,
.form-card-grid .form-text {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.form-card-grid ul.errorlist {
  margin: 0.4rem 0 0;
  padding-left: 1rem;
  color: #b91c1c;
  font-size: 0.85rem;
}

.theme-settings-page .theme-form-section {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  background: linear-gradient(180deg, #d7dee8 0%, #cfd8e3 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.55), 0 4px 12px rgb(15 23 42 / 0.05);
}

.theme-settings-page .theme-form-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.theme-settings-page .theme-form-subtitle {
  margin-bottom: 0.75rem;
  color: #475569;
  font-size: 0.84rem;
  background: rgb(255 255 255 / 0.55);
  border: 1px solid #c7d2e2;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  display: inline-block;
}

/* Theme settings: switch knob color (ON state) */
.theme-settings-page .form-switch .form-check-input:checked {
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23dc3545'/%3e%3c/svg%3e");
}

.theme-settings-page .form-card-grid > div {
  margin: 0;
  background: #dfe5ee;
  border: 1px solid #bcc8d8;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 10px rgb(15 23 42 / 0.06);
  padding: 0.9rem;
}

.theme-settings-page .theme-field-span-2 {
  grid-column: span 2;
}

.theme-settings-page input[type="color"] {
  width: 100%;
  min-height: 2.4rem;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
}

.theme-settings-page .form-control,
.theme-settings-page .form-select,
.theme-settings-page input,
.theme-settings-page textarea,
.theme-settings-page select {
  background-color: #ffffff !important;
}

.purpose-form-shell {
  background: #fbfcfd;
  border: 1px solid #dbe6f2;
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.65), 0 10px 22px rgb(15 23 42 / 0.06);
}

.purpose-form-shell.employee-onboard-form {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  background: #fbfcfd;
  border-color: #dbe6f2;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.65), 0 10px 22px rgb(15 23 42 / 0.06);
}

.purpose-form-shell.employee-onboard-form .card {
  background: #f5f7fb;
  border-color: #dbe6f2;
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.04);
}

.purpose-form-shell.employee-onboard-form .card-header,
.purpose-form-shell.employee-onboard-form .card-body {
  background: #f5f7fb;
  border-color: #dbe6f2;
}

.purpose-form-shell.employee-onboard-form .card-header {
  font-size: 0.94rem;
  letter-spacing: 0.01em;
}

.purpose-form-shell.employee-onboard-form .card-body .mb-3,
.purpose-form-shell.employee-onboard-form .card-body .mb-0 {
  position: relative;
  overflow: visible;
  border: 1px solid #98a8bc;
  border-radius: var(--radius-md);
  padding: 0.95rem 0.75rem 0.28rem;
  background: #ffffff;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.purpose-form-shell.employee-onboard-form .card-body .mb-3 .form-label,
.purpose-form-shell.employee-onboard-form .card-body .mb-0 .form-label {
  position: absolute;
  top: -0.52rem;
  transform: none;
  left: 0.7rem;
  z-index: 2;
  margin: 0;
  padding: 0 0.2rem;
  background: transparent;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1;
  text-shadow: -2px 0 #f5f7fb, 2px 0 #f5f7fb, 0 -1px #f5f7fb, 0 1px #f5f7fb;
}

.purpose-form-shell.employee-onboard-form .card-body .mb-3 .form-control,
.purpose-form-shell.employee-onboard-form .card-body .mb-3 .form-select,
.purpose-form-shell.employee-onboard-form .card-body .mb-3 input:not([type="file"]),
.purpose-form-shell.employee-onboard-form .card-body .mb-3 textarea,
.purpose-form-shell.employee-onboard-form .card-body .mb-3 select,
.purpose-form-shell.employee-onboard-form .card-body .mb-0 .form-control,
.purpose-form-shell.employee-onboard-form .card-body .mb-0 .form-select,
.purpose-form-shell.employee-onboard-form .card-body .mb-0 input:not([type="file"]),
.purpose-form-shell.employee-onboard-form .card-body .mb-0 textarea,
.purpose-form-shell.employee-onboard-form .card-body .mb-0 select {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0.08rem 0 0.02rem;
  min-height: 1.35rem;
}

.purpose-form-shell.employee-onboard-form .card-body .mb-3:focus-within,
.purpose-form-shell.employee-onboard-form .card-body .mb-0:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.17rem rgb(37 99 235 / 0.16);
}

.purpose-form-shell.employee-onboard-form .card-body .mb-3:hover,
.purpose-form-shell.employee-onboard-form .card-body .mb-0:hover {
  border-color: rgb(37 99 235 / 0.48);
  box-shadow: 0 0 0 0.11rem rgb(37 99 235 / 0.08);
}

.purpose-form-shell.employee-onboard-form .card-body .mb-3 .text-danger,
.purpose-form-shell.employee-onboard-form .card-body .mb-0 .text-danger {
  margin-top: 0.2rem;
}

.purpose-form-subtitle {
  color: #475569;
  font-size: 0.88rem;
  background: rgb(255 255 255 / 0.55);
  border: 1px solid #c7d2e2;
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  display: inline-block;
  box-shadow: var(--shadow-sm);
}

.purpose-form-shell .form-card-grid p {
  position: relative;
  overflow: visible;
  background: #ffffff;
  border: 1px solid #98a8bc;
  border-radius: var(--radius-md);
  box-shadow: none;
  padding: 0.95rem 0.75rem 0.28rem;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.purpose-form-shell .form-card-grid p:not(:has(input[type="checkbox"])) > label {
  position: absolute;
  top: -0.52rem;
  left: 0.7rem;
  z-index: 2;
  margin: 0;
  padding: 0 0.2rem;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1;
  background: transparent;
  text-shadow: -2px 0 #fbfcfd, 2px 0 #fbfcfd, 0 -1px #fbfcfd, 0 1px #fbfcfd;
}

.purpose-form-shell .form-card-grid p:not(:has(input[type="checkbox"])) input:not([type="file"]),
.purpose-form-shell .form-card-grid p:not(:has(input[type="checkbox"])) select,
.purpose-form-shell .form-card-grid p:not(:has(input[type="checkbox"])) textarea {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0.08rem 0 0.02rem;
  min-height: 1.35rem;
}

.purpose-form-shell .form-card-grid p:not(:has(input[type="checkbox"])):focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.17rem rgb(37 99 235 / 0.16);
}

.purpose-form-shell .form-card-grid p:not(:has(input[type="checkbox"])):hover {
  border-color: rgb(37 99 235 / 0.48);
  box-shadow: 0 0 0 0.11rem rgb(37 99 235 / 0.08);
}

.event-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.event-form-grid .event-field-span-3 {
  grid-column: span 3;
}

.attendance-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.attendance-form-grid .attendance-field-span-4 {
  grid-column: span 4;
}

.purpose-form-shell .card {
  background: #f5f7fb;
  border-color: #dbe6f2;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.04);
  overflow: hidden;
}

.purpose-form-shell .card-header,
.purpose-form-shell .card-body {
  background: #f5f7fb;
  border-color: #dbe6f2;
}

.purpose-form-shell .card-header {
  position: relative;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1e293b;
  padding-left: 1.05rem;
}

.purpose-form-shell .card-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-color);
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

.purpose-form-shell .form-label {
  color: #334155;
  font-weight: 400;
}

.purpose-form-shell .form-text,
.purpose-form-shell .helptext {
  color: #64748b !important;
}

.purpose-form-shell .form-control,
.purpose-form-shell .form-select,
.purpose-form-shell input,
.purpose-form-shell textarea,
.purpose-form-shell select {
  background-color: #ffffff !important;
  border-color: #cbd5e1;
  border-radius: var(--radius-sm);
}

.purpose-form-shell .form-control:focus,
.purpose-form-shell .form-select:focus,
.purpose-form-shell input:focus,
.purpose-form-shell textarea:focus,
.purpose-form-shell select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgb(37 99 235 / 0.18);
}

.purpose-form-shell .mt-3.d-flex {
  margin-top: 1rem !important;
  padding-top: 0.9rem;
  border-top: 1px solid #c6d2e3;
}

.purpose-form-shell .form-card-grid p:has(input[required]) label::after,
.purpose-form-shell .form-card-grid p:has(select[required]) label::after,
.purpose-form-shell .form-card-grid p:has(textarea[required]) label::after,
.purpose-form-shell .mb-3:has(input[required]) .form-label::after,
.purpose-form-shell .mb-3:has(select[required]) .form-label::after,
.purpose-form-shell .mb-3:has(textarea[required]) .form-label::after {
  content: " *";
  color: #dc2626;
  font-weight: 700;
}

.purpose-form-shell .btn-primary {
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  box-shadow: 0 6px 12px rgb(37 99 235 / 0.2);
}

.purpose-form-shell .btn-primary:hover {
  transform: translateY(-1px);
}

.form-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.form-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #c6d2e3;
  border-radius: var(--radius-md);
  background: #e6edf7;
  padding: 0.5rem 0.6rem;
  color: #334155;
}

.form-step-index {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #c7d2e2;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
}

.form-step-label {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.form-step.is-active {
  border-color: rgb(37 99 235 / 0.38);
  box-shadow: 0 2px 8px rgb(37 99 235 / 0.12);
}

.form-step.is-active .form-step-index {
  background: var(--primary-color);
  color: #ffffff;
}

@media (max-width: 575.98px) {
  .purpose-form-shell {
    padding: 0.9rem;
  }

  .form-steps {
    grid-template-columns: 1fr;
  }

  .purpose-form-shell .mt-3.d-flex {
    flex-direction: column;
  }

  .purpose-form-shell .mt-3.d-flex .btn,
  .purpose-form-shell .mt-3.d-flex a.btn {
    width: 100%;
  }
}

@media (max-width: 991.98px) {
  .event-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-form-grid .event-field-span-3 {
    grid-column: span 2;
  }

  .attendance-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .attendance-form-grid .attendance-field-span-4 {
    grid-column: span 2;
  }
}

@media (max-width: 767.98px) {
  .event-form-grid {
    grid-template-columns: 1fr;
  }

  .event-form-grid .event-field-span-3 {
    grid-column: span 1;
  }

  .attendance-form-grid {
    grid-template-columns: 1fr;
  }

  .attendance-form-grid .attendance-field-span-4 {
    grid-column: span 1;
  }
}

.theme-settings-page .form-check.form-switch {
  padding-left: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.theme-preview-card {
  position: sticky;
  top: 1rem;
}

@media (max-width: 991.98px) {
  .theme-settings-page .theme-field-span-2 {
    grid-column: auto;
  }

  .theme-preview-card {
    position: static;
  }
}

@media (max-width: 991.98px) {
  .form-card-grid {
    grid-template-columns: 1fr;
  }

  .form-card-grid p:has(textarea) {
    grid-column: auto;
  }
}

/* Sidebar Styling */
.sidebar {
  background-color: var(--bg-sidebar);
  color: var(--text-light);
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  padding-top: 0.35rem;
  display: flex;
  flex-direction: column;
  z-index: 10;
  padding-bottom: var(--footer-banner-space);
}

.sidebar .position-sticky {
  flex: 1 1 auto;
}

@media (min-width: 768px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 100vh;
  }
}

.sidebar h5 {
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.25rem;
  color: #fff;
  padding: 0;
}

.sidebar-brand {
  padding-top: 0.25rem;
  text-align: center;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.sidebar-logo {
  display: block;
  width: 100%;
  max-width: 92%;
  height: auto;
  max-height: 96px;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
  margin-left: auto;
  margin-right: auto;
}

.sidebar-brand .sidebar-logo {
  margin-bottom: 0.35rem !important;
}

.sidebar-brand h5 {
  justify-content: center;
}

.sidebar small {
  color: rgb(255 255 255 / 0.72);
  padding: 0;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Ensure sidebar tagline stays readable even with Bootstrap's .text-muted !important */
.sidebar .text-muted {
  color: rgb(255 255 255 / 0.72) !important;
}

.nav-link {
  color: #cbd5e1;
  padding: 0.6rem 0.9rem;
  margin: 0.15rem 0.35rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link i {
  opacity: 0.9;
}

.nav-link:hover {
  background-color: rgb(255 255 255 / 0.08);
  color: #fff;
}

.nav-link.active {
  background-color: rgb(59 130 246 / 0.18);
  color: #fff;
  box-shadow: inset 3px 0 0 0 var(--accent-color);
}

.nav-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  margin: 1.1rem 0.7rem 0.6rem;
  font-weight: 600;
}

/* Main Content Area */
main {
  padding: 1.5rem;
  padding-bottom: calc(var(--footer-banner-space) + 1rem);
}

@media (max-width: 575.98px) {
  main {
    padding: 1.1rem;
    padding-bottom: calc(var(--footer-banner-space) + 1rem);
  }
}

/* Footer Banner */
.app-footer-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background-color: var(--footer-bg-color);
  color: var(--footer-text-color);
  border-top: 0 !important;
  box-shadow: 0 -6px 16px rgb(0 0 0 / 0.06);
  font-size: 0.9rem;
}

.app-footer-banner small {
  color: var(--footer-text-color);
}

.app-footer-link {
  color: var(--footer-text-color);
  text-decoration: none;
  font-weight: 600;
}

.app-footer-link:hover {
  text-decoration: underline;
}

@media (max-width: 575.98px) {
  :root {
    --footer-banner-space: 92px;
  }
}

.page-header {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.page-title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 1.5rem;
  margin: 0;
}

/* Landing / Public Home */
.landing-hero-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-body) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Tasks (Trello-like labels) */
.task-tile {
  position: relative;
  overflow: hidden;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.task-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: rgb(15 23 42 / 0.18);
}

.task-tile[data-status="TODO"]::before {
  background: rgba(var(--bs-secondary-rgb), 0.85);
}

.task-tile[data-status="IN_PROGRESS"]::before {
  background: rgba(var(--bs-primary-rgb), 0.85);
}

.task-tile[data-status="DONE"]::before {
  background: rgba(var(--bs-success-rgb), 0.85);
}

.task-tile[data-status="REDO"]::before {
  background: rgba(var(--bs-danger-rgb), 0.85);
}

.task-draggable {
  cursor: grab;
}

.task-draggable.is-dragging {
  opacity: 0.75;
  transform: rotate(1deg);
  cursor: grabbing;
}

.task-column-body {
  min-height: 140px;
}

.task-column-header {
  font-weight: 800;
}

.task-column-header--todo {
  background: rgba(var(--bs-secondary-rgb), 0.10);
}

.task-column-header--progress {
  background: rgba(var(--bs-primary-rgb), 0.10);
}

.task-column-header--done {
  background: rgba(var(--bs-success-rgb), 0.12);
}

.task-column-header--redo {
  background: rgba(var(--bs-danger-rgb), 0.10);
}

.task-column-body[data-status="TODO"] {
  background: rgba(var(--bs-secondary-rgb), 0.03);
}

.task-column-body[data-status="IN_PROGRESS"] {
  background: rgba(var(--bs-primary-rgb), 0.03);
}

.task-column-body[data-status="DONE"] {
  background: rgba(var(--bs-success-rgb), 0.03);
}

.task-column-body[data-status="REDO"] {
  background: rgba(var(--bs-danger-rgb), 0.03);
}

.task-column-body.is-drop-target {
  outline: 2px dashed rgb(37 99 235 / 0.55);
  outline-offset: 6px;
  border-radius: var(--radius-md);
}

.task-tile + .task-tile {
  margin-top: 0.75rem;
}

.task-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.task-label {
  border-radius: 9999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.task-meta {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.landing-hero-body {
  padding: 1.5rem;
}

.landing-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.1;
}

.landing-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

.landing-cta .btn {
  box-shadow: var(--shadow-sm);
}


.feature-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgb(37 99 235 / 0.35);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.9rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
}

.feature-icon i {
  font-size: 1.8rem;
}

@media (max-width: 575.98px) {
  .landing-hero-body {
    padding: 1.05rem;
  }
}

/* Auth صفحات (Login) */
.auth-page {
  margin-top: 0.25rem;
  min-height: calc(100vh - 8rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgb(15 23 42 / 0.12), 0 6px 16px rgb(15 23 42 / 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.auth-card-minimal {
  max-width: 720px;
  margin: 0 auto;
}

.auth-shell {
  width: 100%;
}

.auth-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 0.75rem;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.auth-brand {
  font-weight: 700;
  color: var(--text-main);
  font-size: 1rem;
}

.auth-tagline {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.auth-badge {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgb(37 99 235 / 0.12);
  color: var(--primary-color);
}

.auth-badge-minimal {
  width: 120px;
  height: 120px;
  margin-inline: auto;
}

.auth-badge-minimal i {
  font-size: 3rem;
}

.auth-badge i {
  font-size: 1.75rem;
}

.auth-card .form-label {
  letter-spacing: 0.08em;
}

.auth-card-minimal .form-label {
  letter-spacing: normal;
  font-size: 1.05rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.5rem;
}

.auth-form-shell {
  padding: 1.1rem;
  background: #f8fbff;
}

.auth-form-shell-minimal {
  max-width: 620px;
  margin: 0 auto;
}

.auth-minimal-field {
  position: relative;
}

.auth-minimal-field .form-control {
  border: 1px solid #c7ced9;
  background: #fff;
  border-radius: 0.85rem;
  min-height: 4.6rem;
  padding: 1.2rem 1rem;
  font-size: 1rem;
}

.auth-minimal-field .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.18rem rgb(37 99 235 / 0.14);
}

.auth-submit-btn {
  min-height: 3.7rem;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  border-radius: 0.35rem;
}

.auth-forgot-link {
  color: #9b002f;
  text-decoration: none;
  font-size: 1.1rem;
}

.auth-forgot-link:hover {
  text-decoration: underline;
}

.auth-v2 {
  background: var(--bg-body);
}

.auth-card-v2 {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 18px 40px rgb(15 23 42 / 0.10), 0 6px 14px rgb(15 23 42 / 0.06);
  overflow: hidden;
}

.auth-card-header-v2 {
  background: var(--primary-color);
  color: var(--text-light);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.auth-card-header-compact-v2 {
  padding: 1.1rem 1.25rem;
}

.auth-logo-shell {
  width: 92px;
  height: 92px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(255 255 255 / 0.16);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.25);
}

.auth-logo-v2 {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 0.35rem;
}

.auth-logo-fallback {
  font-size: 1.75rem;
  color: var(--text-light);
}

.auth-appname {
  font-weight: 700;
  color: var(--text-light);
  font-size: 1.08rem;
  line-height: 1.2;
}

.auth-tagline-v2 {
  color: rgb(255 255 255 / 0.86);
  font-size: 0.92rem;
  margin-top: 0.15rem;
}

.auth-title-v2 {
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.auth-subtitle-v2 {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
}

.auth-label-v2 {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.auth-input-group-v2 .input-group-text {
  border: 1px solid var(--border-color);
  border-right: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: var(--bg-body);
  color: var(--text-muted);
  min-width: 46px;
  justify-content: center;
}

.auth-form-v2 .form-control {
  border-radius: var(--radius-md);
  min-height: 2.9rem;
  font-size: 1rem;
}

.auth-password-wrap {
  position: relative;
}

.auth-eye-icon {
  position: absolute;
  right: 1rem;
  top: 2.9rem;
  color: #8b9098;
  pointer-events: none;
}

.auth-btn-v2 {
  min-height: 2.9rem;
  border-radius: var(--radius-md);
  font-size: 1.02rem;
  font-weight: 600;
  color: #fff;
  border: 0;
  background: var(--primary-color);
}

.auth-btn-v2:hover,
.auth-btn-v2:focus {
  color: #fff;
  background: var(--primary-hover);
}

.auth-forgot-v2 {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.15;
}

.auth-forgot-v2:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .auth-logo-shell {
    width: 84px;
    height: 84px;
  }

  .auth-logo-v2 {
    width: 62px;
    height: 62px;
  }

  .auth-btn-v2 {
    font-size: 1.05rem;
  }

  .auth-forgot-v2 {
    font-size: 0.98rem;
  }
}

.auth-field-wrap {
  border: 1px solid #d2deed;
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem 0.4rem;
  background: #fff;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.auth-field-wrap:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.16rem rgb(37 99 235 / 0.14);
}

.auth-card .form-control {
  border-radius: var(--radius-sm);
  border: 0;
  background: transparent;
  padding: 0.35rem 0.1rem;
}

.auth-card .form-control:focus {
  background: transparent;
  box-shadow: none;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-main);
  padding: 1rem 1.25rem;
}

.card-body {
  padding: 1.25rem;
}

/* Buttons */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all var(--transition-speed);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
}

.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.2rem rgb(37 99 235 / 0.2);
}

/* Tables */
.table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-color);
}

.table td {
  vertical-align: middle;
  color: var(--text-main);
}
.table-hover tbody tr:hover {
  background-color: #f8fafc;
}

/* Alerts */
.alert {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.text-muted { color: var(--text-muted) !important; }
.bg-light { background-color: #f8fafc !important; }
