﻿@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../vendor/fonts/Quicksand-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../vendor/fonts/Quicksand-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../vendor/fonts/Quicksand-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../vendor/fonts/Quicksand-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../vendor/fonts/Quicksand-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../vendor/fonts/Quicksand-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../vendor/fonts/Quicksand-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../vendor/fonts/Quicksand-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Noto Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../vendor/fonts/NotoSansArabic.ttf') format('truetype');
}

:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Quicksand,
    'Noto Sans Arabic',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  color: #1f2937;
  background: #f2f4fc;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

button {
  font: inherit;
  cursor: pointer;
}

[data-hidden] {
  display: none !important;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: #2a2b44;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-header .brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.app-header .spacer {
  flex: 1;
}

.app-header .search-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: min(22rem, 38vw);
  padding: 0.25rem 0.6rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.app-header .search-bar input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font: inherit;
}

.app-header .search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.app-header .search-bar input:focus-visible {
  outline: 2px solid #888aae;
  border-radius: 0.25rem;
}

.app-header .search-bar .icon-btn {
  border: 0;
  padding: 0.2rem 0.4rem;
}

.app-header .user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.875rem;
}

.icon-btn {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 0.375rem;
  padding: 0.3rem 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.app-shell {
  display: flex;
  flex: 1;
  min-height: 0;
}

#app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #f7f7f9;
  border-right: 1px solid #e5e5e5;
  transition: width 0.16s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#app-sidebar nav {
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

#app-sidebar a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.375rem;
  color: #374151;
  text-decoration: none;
  font-size: 0.925rem;
}

#app-sidebar a:hover {
  background: #eeeef3;
}

#app-sidebar a.active {
  background: #9c1b47;
  color: #fff;
  font-weight: 700;
}

#app-sidebar a .fa {
  width: 1.1rem;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.65rem 0.5rem;
  border-top: 1px solid #e5e5e5;
  font-size: 0.62rem;
  color: #b0b0c3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sidebar-footer__copy {
  display: block;
}

#app-sidebar .sidebar-footer__link {
  display: inline;
  padding: 0;
  color: #7779a5;
  font-size: inherit;
  font-weight: 400;
  text-decoration: none;
  background: transparent;
  letter-spacing: 0.2px;
}

#app-sidebar .sidebar-footer__link:hover {
  color: #55588b;
  text-decoration: underline;
  background: transparent;
}

html.sidebar-collapsed #app-sidebar {
  width: 64px;
  overflow: hidden;
}

html.sidebar-collapsed #app-sidebar a {
  justify-content: center;
  gap: 0;
  padding: 0.6rem 0;
  font-size: 0;
}

html.sidebar-collapsed #app-sidebar a i {
  font-size: 1.05rem;
}

html.sidebar-collapsed .sidebar-footer {
  visibility: hidden;
  font-size: 0;
  padding: 0;
  border-top: none;
}

#app-view {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  min-width: 0;
}

#app-view:focus-visible {
  outline: 2px solid #55588b;
  outline-offset: -2px;
}

:focus-visible {
  outline: 2px solid #55588b;
  outline-offset: 2px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  display: grid;
  place-items: center;
  z-index: 50;
}

.modal-dialog {
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  overflow: hidden;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 2rem 0 rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.modal-dialog--lg {
  width: min(720px, calc(100vw - 2rem));
}

.modal-dialog--xl {
  width: min(880px, calc(100vw - 2rem));
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-header .icon-btn {
  color: #dc2626;
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  justify-content: center;
  flex-shrink: 0;
}

.modal-header .icon-btn:hover {
  background: #dc2626;
  color: #fff;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.btn {
  border: 1px solid transparent;
  border-radius: 0.375rem;
  padding: 0.22rem 0.85rem;
  background: #e5e5e5;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn--primary {
  background: #55588b;
  color: #fff;
}

.btn--danger {
  background: #dc2626;
  color: #fff;
}

#toast-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 60;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 240px;
  max-width: 360px;
  padding: 0.7rem 0.9rem;
  border-radius: 0.375rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  background: #fff;
  border-left: 4px solid #6b7280;
}

.toast--success {
  border-left-color: #16a34a;
}

.toast--error {
  border-left-color: #dc2626;
}

.toast--info {
  border-left-color: #4d4f7d;
}

.toast--warning {
  border-left-color: #d97706;
}

.toast .toast__close {
  margin-left: auto;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 1.1rem;
  line-height: 1;
}

.placeholder {
  border: 1px dashed #9ca3af;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  color: #4b5563;
  background: #fff;
}

.card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 0.5rem 2rem 0 rgba(0, 0, 0, 0.08);
}

.auth-card {
  max-width: 420px;
  margin: 2rem auto 0;
}

body.auth-page {
  background:
    radial-gradient(circle at 12% 18%, rgba(156, 27, 71, 0.55) 0%, transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(122, 125, 176, 0.5) 0%, transparent 45%),
    radial-gradient(circle at 74% 8%, rgba(156, 27, 71, 0.32) 0%, transparent 38%),
    radial-gradient(circle at 28% 92%, rgba(122, 125, 176, 0.35) 0%, transparent 42%),
    linear-gradient(135deg, #2a2b44 0%, #55588b 100%);
  background-attachment: fixed;
}

body.auth-page .auth-card {
  box-shadow: 0 1rem 3rem rgba(10, 12, 40, 0.35);
}

.auth-logo {
  display: block;
  max-height: 84px;
  max-width: 220px;
  margin: 0 auto 0.75rem;
  object-fit: contain;
}

.auth-card h2 {
  margin: 0 0 0.25rem;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

.field input,
.field select,
.field textarea {
  padding: 0.3rem 0.7rem;
  border: 1px solid #d5d5e2;
  border-radius: 0.5rem;
  font: inherit;
  background: #fff;
  color: inherit;
}

.field textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
}

.field input.has-value,
.field select.has-value,
.field textarea.has-value,
.input.has-value {
  background: #eeeef3;
  border-color: #c9c9dc;
}

.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #eeeef3 inset;
  -webkit-text-fill-color: #111;
  caret-color: #111;
  transition: background-color 9999s ease-in-out 0s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid #55588b;
  outline-offset: 1px;
  border-color: transparent;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.form-hint {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.banner {
  border-radius: 0.375rem;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.banner--warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.schedule-readonly-banner {
  background: #f9ebed;
  color: #7b2732;
  border: 1px solid #c29ba3;
  font-weight: 600;
}

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

.toolbar .input {
  flex: 1 1 220px;
}

.input {
  padding: 0.3rem 0.7rem;
  border: 1px solid #d5d5e2;
  border-radius: 0.375rem;
  font: inherit;
  background: #fff;
  min-width: 0;
}

.input:focus {
  outline: 2px solid #55588b;
  outline-offset: 1px;
  border-color: transparent;
}

.muted {
  color: #6b7280;
  font-size: 0.85rem;
  margin: 0.25rem 0 0.75rem;
}

.strong {
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  overflow: hidden;
}

.table th,
.table td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #e5e5e5;
}

.table th {
  background: #f7f7f9;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #4b5563;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: #f7f7f9;
}

.table td.actions {
  white-space: nowrap;
  text-align: right;
}

.btn {
  padding: 0.5rem 0.85rem;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
  background: #e5e5e5;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn--primary {
  background: #55588b;
  color: #fff;
}

.btn--danger {
  background: #dc2626;
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: #55588b;
  border-color: transparent;
}

.btn--danger-ghost {
  background: transparent;
  color: #dc2626;
  border-color: transparent;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge--actif {
  background: #dcfce7;
  color: #15803d;
}

.badge--inactif {
  background: #fee2e2;
  color: #b91c1c;
}

.badge--abandon {
  background: #fee2e2;
  color: #b91c1c;
}

.modal-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.25rem;
  margin-top: 0;
  align-items: start;
}

.modal-form .form-block,
.modal-form .field:has(textarea),
.modal-form .field--full {
  grid-column: 1 / -1;
}

.form-block {
  border: 1px solid #e5e5e5;
  border-radius: 0.375rem;
  padding: 0.75rem;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}

.form-block h3 {
  grid-column: 1 / -1;
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.form-block--parent {
  background: #f4effb;
  border-color: #e0d4f5;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.qr-preview {
  text-align: center;
  padding: 0.5rem;
}

.qr-preview img {
  border: 1px solid #e5e5e5;
  border-radius: 0.375rem;
}

.qr-print-root {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }
  .qr-print-root,
  .qr-print-root * {
    visibility: visible;
  }
  .qr-print-root {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
  }
  .qr-print-card {
    text-align: center;
  }
  .qr-print-card img {
    width: 300px;
    height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #app-sidebar {
    transition: none;
  }
}

.banner--danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.banner--danger h4 {
  margin: 0 0 0.35rem;
}

.schedule-range {
  font-weight: 600;
  min-width: 11rem;
}

.schedule-view-toggle {
  display: inline-flex;
  gap: 0.25rem;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.schedule-grid__head,
.schedule-grid__row {
  display: contents;
}

.schedule-grid__head-cell {
  text-align: center;
  font-size: 0.8rem;
  color: #4b5563;
  padding: 0.3rem 0.2rem;
}

.schedule-grid__dl {
  font-weight: 700;
  font-size: 0.85rem;
}

.schedule-grid__dd {
  font-size: 0.78rem;
}

.schedule-day-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 150px;
}

.schedule-day-col--off {
  align-items: center;
  justify-content: center;
  background: #f7f7f9;
  border-radius: 0.375rem;
  color: #9ca3af;
  font-size: 0.85rem;
}

.schedule-day-empty {
  color: #9ca3af;
  text-align: center;
  margin-top: 0.5rem;
}

.schedule-card {
  text-align: left;
  border: 1px solid #d5d5e2;
  background: #eeeef3;
  border-radius: 0.375rem;
  padding: 0.45rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.8rem;
}

.schedule-card:hover {
  border-color: #55588b;
  background: #d5d5e2;
}

.schedule-card__time {
  font-weight: 700;
  color: #404268;
  font-size: 0.85rem;
}

.schedule-card__subject {
  font-weight: 600;
}

.schedule-card__meta {
  color: #4b5563;
  font-size: 0.75rem;
}

.schedule-card__exceptions {
  color: #b45309;
  font-size: 0.75rem;
  font-weight: 600;
}

.schedule-card--live {
  background: #eaf6e6;
  border-color: #6ea152;
}

.schedule-card--live .schedule-card__time {
  color: #3f6c2f;
}

.schedule-card--live:hover {
  background: #d9efd2;
  border-color: #55863f;
}

.schedule-card__live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  margin-top: 0.1rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: #6ea152;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.schedule-card__live::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #fff;
  animation: schedule-live-pulse 1.2s ease-in-out infinite;
}

@keyframes schedule-live-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.75);
  }
}

.schedule-card--cancelled {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.schedule-card--cancelled .schedule-card__time,
.schedule-card--cancelled .schedule-card__subject,
.schedule-card--cancelled .schedule-card__meta {
  color: #9ca3af;
}

.schedule-card__cancelled {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: #dc2626;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.schedule-card--past {
  background: #f9ebed;
  border-color: #c29ba3;
}

.schedule-card--past .schedule-card__time {
  color: #7b2732;
}

.schedule-card--past:hover {
  background: #f3dfe3;
  border-color: #a97a85;
}

.schedule-card__past {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: #8e2431;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.schedule-card__flags {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  align-self: flex-start;
  margin-top: 0.1rem;
}

.schedule-card__flags .schedule-card__past {
  align-self: center;
}

.schedule-card__flags .schedule-card__live {
  align-self: center;
  margin-top: 0;
}

.schedule-card__assigned {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #7b2732;
  padding: 0.1rem 0.4rem;
  background: #fdeef0;
  border: 1px solid #c29ba3;
  border-radius: 6px;
  margin-top: 0.25rem;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.schedule-list__meta-item--assigned {
  font-weight: 600;
  color: #7b2732;
}

.schedule-card__count {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #7b2732;
  background: #fff;
  border: 1px solid #c29ba3;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.schedule-card__count svg {
  flex: none;
  display: block;
}

.schedule-card__reason {
  font-size: 0.7rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 0.1rem;
}

.schedule-list__item--cancelled {
  opacity: 0.55;
}

.schedule-list__item.schedule-card--past {
  background: #f9ebed;
  border-color: #c29ba3;
}

.badge--capacity {
  background: #fee2e2;
  color: #b91c1c;
  align-self: flex-start;
  margin-top: 0.15rem;
}

.schedule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.schedule-list__empty {
  padding: 1.5rem;
  text-align: center;
  color: #6b7280;
  background: #fff;
  border: 1px dashed #9ca3af;
  border-radius: 0.5rem;
}

.schedule-list__day {
  font-weight: 700;
  margin-top: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: #eeeef3;
  color: #55588b;
  border-radius: 0.375rem;
  font-size: 0.9rem;
}

.schedule-list__item {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

.schedule-list__main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.schedule-list__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  flex: 1;
}

.schedule-list__meta-item {
  color: #4b5563;
  font-size: 0.85rem;
}

.schedule-list__item .btn {
  margin-left: auto;
}

.conflict-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.conflict-list span {
  display: block;
}

.schedule-exceptions__body {
  grid-column: 1 / -1;
}

.exception-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f7f7f9;
}

.exception-row__info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.exception-row__actions {
  display: flex;
  gap: 0.4rem;
}

.exception-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid #e5e5e5;
  border-radius: 0.375rem;
}

.exception-form > * {
  grid-column: 1 / -1;
}

.exception-times {
  display: contents;
}

.exception-form .form-footer {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .app-header .search-bar {
    width: 100%;
  }

  .app-header .search-bar .icon-btn {
    display: none;
  }

  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .schedule-grid__head {
    display: none;
  }

  .schedule-day-col {
    min-height: 0;
  }

  .schedule-day-col--off {
    padding: 0.4rem;
  }
}

.att-tabbar {
  margin-bottom: 1rem;
}

.att-selector {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.att-selector__session {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 280px;
}

.att-selector__session .input[type='date'] {
  width: auto;
}

.att-select {
  flex: 1 1 auto;
}

.att-label {
  white-space: nowrap;
}

.att-grid {
  display: grid;
  grid-template-columns: minmax(340px, 5fr) minmax(320px, 4fr);
  gap: 1rem;
  align-items: start;
}

.att-grid__scan,
.att-grid__live {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.att-card {
  padding: 1rem;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
}

.att-session h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.att-methods {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.att-method--active {
  border-color: #55588b;
  color: #55588b;
}

.att-scan-zone {
  padding: 0.75rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.375rem;
  margin-bottom: 0.75rem;
}

.att-camera {
  width: 100%;
  max-width: 320px;
  min-height: 160px;
  margin-bottom: 0.5rem;
  background: #111827;
  border-radius: 0.375rem;
  overflow: hidden;
}

.att-camera video {
  width: 100%;
  display: block;
}

.att-usb {
  display: flex;
  gap: 0.5rem;
}

.att-usb .input {
  flex: 1 1 auto;
}

.att-feedback {
  min-height: 1.25rem;
  margin: 0 0 0.5rem;
  color: #b91c1c;
  font-size: 0.85rem;
}

.att-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.att-list-head h3 {
  margin: 0;
  font-size: 1rem;
}

.att-list-count {
  font-size: 0.9rem;
}

.att-live {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 420px;
  overflow-y: auto;
}

.att-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid #e5e5e5;
  border-radius: 0.375rem;
  background: #f7f7f9;
}

.att-row__main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.att-row__name {
  font-weight: 600;
}

.att-row__meta {
  color: #6b7280;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.att-row__del {
  flex-shrink: 0;
}

.att-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.att-filters .field {
  margin: 0;
  min-width: 150px;
}

.att-filters__actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.att-table-actions {
  text-align: right;
}

.actt-autonote {
  margin-top: 0.75rem;
  font-size: 0.8rem;
}

.page-heading h1 {
  margin: 0 0 0.25rem;
}

@media (max-width: 900px) {
  .att-grid {
    grid-template-columns: 1fr;
  }
}

.cm-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}

.cm-card {
  background: #fafafa;
  border: 1px solid var(--stroke, #e5e5e5);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cm-card__label {
  font-size: 0.8rem;
  color: #777;
}

.cm-card__value {
  font-size: 1.15rem;
  font-weight: 600;
}

.cm-card--paid .cm-card__value {
  color: #1a7f37;
}

.cm-card--rest .cm-card__value {
  color: #b42318;
}

.cm-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: #f6f8fa;
  border-radius: 8px;
}

.cm-mini__item {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cm-mini__label {
  font-size: 0.75rem;
  color: #777;
}

.td-actions {
  text-align: right;
  white-space: nowrap;
}

.t-wrap {
  max-width: 220px;
}

.fi-receipt-frame {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--stroke, #e5e5e5);
  border-radius: 8px;
  background: #fff;
}

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}
.alert--error {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
.alert--warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: #55588b;
  cursor: pointer;
  font: inherit;
}
.link-btn:hover {
  text-decoration: underline;
}
tr.is-selected {
  background: #eeeef3;
}

.card-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.metric-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: 0 0.5rem 2rem 0 rgba(0, 0, 0, 0.08);
}

.metric-label {
  font-size: 0.8rem;
  color: #6b7280;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
}

.metric-value--positive {
  color: #1a7f37;
}

.metric-value--negative {
  color: #b42318;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

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

.audit-values {
  max-width: 260px;
  max-height: 160px;
  overflow: auto;
  margin: 0.25rem 0 0;
  padding: 0.5rem;
  background: #f7f7f9;
  border: 1px solid #e5e5e5;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  white-space: pre-wrap;
}

.audit-date {
  white-space: nowrap;
}
