@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Outfit:wght@500;600;700;800;900&display=swap");

:root {
  --bg: #dce4e2;
  --bg-soft: #edf3f1;
  --surface: #f6fbf9;
  --surface-strong: #ffffff;
  --surface-dark: #0b5d5f;
  --surface-dark-2: #0a4b4d;
  --text: #123839;
  --text-soft: #4f6d6d;
  --text-inverse: #f5fffd;
  --line: rgba(11, 78, 79, 0.14);
  --line-soft: rgba(255, 255, 255, 0.12);
  --red: #0c6f71;
  --red-strong: #0f7f81;
  --red-deep: #073d3f;
  --shadow: 0 28px 48px rgba(10, 58, 59, 0.26);
  --shadow-soft: 0 16px 28px rgba(20, 76, 77, 0.18);
  --radius-xl: 32px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 15px;
  --sidebar-width: 300px;
  --cut-lg: 30px;
  --cut-md: 22px;
  --cut-sm: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(15, 127, 129, 0.16), transparent 26%),
    radial-gradient(circle at left center, rgba(255, 255, 255, 0.52), transparent 18%),
    linear-gradient(180deg, #e5ebea 0%, #d5dfdd 100%);
  color: var(--text);
  font-family: "IBM Plex Sans Arabic", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.46), transparent 8%),
    linear-gradient(115deg, transparent 0 39%, rgba(255, 255, 255, 0.08) 39.2% 40%, transparent 40.2% 100%),
    linear-gradient(145deg, transparent 0 63%, rgba(255, 255, 255, 0.05) 63.1% 64%, transparent 64.1% 100%);
  pointer-events: none;
  opacity: 0.95;
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: "Outfit", "IBM Plex Sans Arabic", sans-serif;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
}

.app-shell,
.coffee-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 18px auto;
  display: grid;
  grid-template-columns: minmax(240px, var(--sidebar-width)) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.sidebar,
.coffee-rail,
.mobile-nav-drawer {
  color: var(--text-inverse);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0, rgba(255, 255, 255, 0.02) 29%, transparent 30%) 0 0 / 180px 180px,
    linear-gradient(135deg, #0f7578, #084f51 58%, #063738 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

.sidebar,
.coffee-rail {
  position: sticky;
  top: 18px;
  border-radius: var(--radius-xl);
  padding: 24px 18px;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - var(--cut-lg)) 0, 100% var(--cut-lg), 100% 100%, 0 100%);
}

.sidebar::before,
.coffee-rail::before,
.mobile-nav-drawer::before,
.coffee-topbar::before,
.admin-hero::before,
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, transparent 0 12%, rgba(255, 255, 255, 0.18) 12.15% 12.55%, transparent 12.7% 100%),
    linear-gradient(125deg, transparent 0 31%, rgba(255, 255, 255, 0.09) 31.1% 31.35%, transparent 31.5% 100%),
    linear-gradient(145deg, transparent 0 56%, rgba(255, 255, 255, 0.08) 56.15% 56.4%, transparent 56.55% 100%);
  opacity: 0.95;
  pointer-events: none;
}

.sidebar > *,
.coffee-rail > *,
.mobile-nav-drawer > * {
  position: relative;
  z-index: 1;
}

.sidebar-brand,
.coffee-rail-top,
.mobile-nav-head {
  padding: 8px 10px 18px;
}

.sidebar-brand h1,
.coffee-rail-mark,
.mobile-nav-brand,
.auth-logo {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: #fff;
}

.sidebar-brand p,
.coffee-user-card span,
.user-box p,
.mobile-nav-user span {
  color: rgba(255, 247, 240, 0.82);
}

.user-box,
.coffee-user-card,
.mobile-nav-user {
  margin: 8px 8px 18px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.user-box h3,
.coffee-user-card strong,
.mobile-nav-user strong {
  margin: 0;
  display: block;
  color: #fff;
  font-size: 1rem;
}

.nav,
.coffee-nav,
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav a,
.nav button,
.coffee-nav a,
.coffee-rail-bottom button,
.mobile-nav-links a,
.mobile-nav-links button,
.mobile-nav-footer button {
  width: 100%;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.nav a::after,
.coffee-nav a::after,
.mobile-nav-links a::after {
  content: "+";
  font-family: "Outfit", sans-serif;
  font-size: 1.05rem;
  opacity: 0.72;
}

.nav a:hover,
.nav button:hover,
.nav a.active,
.coffee-nav a:hover,
.coffee-nav a.active,
.coffee-rail-bottom button:hover,
.mobile-nav-links a:hover,
.mobile-nav-footer button:hover {
  transform: translateY(-1px);
  background: #f8fffd;
  color: #0a4e50;
}

.coffee-rail-bottom,
.mobile-nav-footer {
  margin-top: 14px;
}

.main,
.coffee-main,
.admin-main {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.coffee-topbar,
.admin-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 26px 28px;
  border-radius: var(--radius-xl);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0, rgba(255, 255, 255, 0.02) 32%, transparent 32.5%) 0 0 / 220px 220px,
    linear-gradient(135deg, #0d7073, #095558 58%, #063e40 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 36px, 100% 100%, 0 100%);
}

.coffee-topbar > *,
.admin-hero > * {
  position: relative;
  z-index: 1;
}

.coffee-topbar h1,
.admin-hero h2 {
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  line-height: 0.95;
  color: #fff;
}

.coffee-kicker,
.panel-kicker {
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 250, 245, 0.84);
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.coffee-search-pill,
.role-badge,
.coffee-chip,
.coffee-role,
.status-pill,
.pill,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #f8fffd;
  color: #0a5255;
  border: 1px solid rgba(9, 86, 88, 0.18);
  box-shadow: 0 10px 18px rgba(9, 81, 83, 0.12);
}

.coffee-stage,
.coffee-bottom-grid,
.coffee-list-grid,
.admin-section-grid,
.scanner-shell,
.dashboard-metrics-grid,
.mini-grid,
.dual-auth-grid,
.teacher-group-grid,
.teacher-stage-grid,
.parent-student-grid,
.parent-student-link-grid,
.parent-student-metrics,
.parent-mini-stats,
.parent-info-grid,
.action-row {
  display: grid;
  gap: 22px;
}

.coffee-stage,
.scanner-shell {
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.75fr);
}

.coffee-bottom-grid,
.admin-section-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.admin-section-grid-wide > :first-child,
.wide {
  grid-column: 1 / -1;
}

.coffee-hero-card,
.coffee-panel-card,
.card,
.admin-panel-card,
.coffee-list-card,
.scanner-stage,
.scanner-side-panel > *,
.metric-card,
.parent-metric-card,
.parent-detail-panel,
.parent-table-section,
.student-id-action-card,
.report-card,
.alert-card,
.announcement-card,
.schedule-card,
.student-card,
.timeline-card,
.settings-card,
.teacher-stage-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-strong) 0%, var(--surface) 100%);
  box-shadow: var(--shadow-soft);
  clip-path: polygon(0 0, calc(100% - var(--cut-md)) 0, 100% var(--cut-md), 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%);
}

.coffee-hero-card,
.coffee-panel-card,
.card,
.admin-panel-card,
.scanner-stage,
.metric-card,
.parent-detail-panel,
.parent-table-section,
.settings-card {
  padding: 24px;
}

.coffee-hero-card::before,
.coffee-panel-card::before,
.card::before,
.admin-panel-card::before,
.coffee-list-card::before,
.scanner-stage::before,
.parent-detail-panel::before,
.parent-table-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 14%, rgba(11, 94, 95, 0.04) 14.15% 14.3%, transparent 14.45% 100%),
    linear-gradient(180deg, transparent 0 54%, rgba(11, 94, 95, 0.025) 54.1% 54.25%, transparent 54.4% 100%);
  pointer-events: none;
}

.coffee-panel-card::after,
.card::after,
.admin-panel-card::after,
.scanner-stage::after,
.coffee-list-card::after,
.coffee-topbar::after,
.admin-hero::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 16px;
  width: 84px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  z-index: 1;
  pointer-events: none;
}

.coffee-hero-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09) 0, rgba(255, 255, 255, 0.015) 32%, transparent 32.5%) 0 0 / 220px 220px,
    linear-gradient(135deg, #0c6669, #094b4d 58%, #07393b 100%);
  color: var(--text-inverse);
  border-color: rgba(255, 255, 255, 0.12);
  clip-path: polygon(0 0, calc(100% - 52px) 0, 100% 52px, 100% calc(100% - 24px), calc(100% - 24px) 100%, 22% 100%, calc(22% - 14px) calc(100% - 18px), 0 calc(100% - 18px));
}

.coffee-hero-card h2,
.coffee-hero-card p,
.coffee-hero-card .coffee-list-copy strong,
.coffee-hero-card .panel-kicker {
  color: var(--text-inverse);
}

.coffee-hero-card > *,
.coffee-panel-card > *,
.card > *,
.admin-panel-card > *,
.scanner-stage > * {
  position: relative;
  z-index: 1;
}

.coffee-hero-card h2,
.coffee-panel-card h3,
.section-head h3,
.coffee-section-head h3 {
  font-size: clamp(1.5rem, 2.4vw, 2.3rem);
  color: var(--text);
}

.coffee-hero-card p,
.admin-hero-copy p,
.coffee-list-copy span,
.caption,
.message,
.empty-note,
.settings-note {
  color: var(--text-soft);
}

.coffee-hero-card,
.admin-hero-copy {
  min-height: 100%;
}

.coffee-hero-copy,
.admin-hero-copy,
.coffee-list-copy,
.student-summary,
.student-details,
.timeline-content {
  display: grid;
  gap: 10px;
}

.coffee-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.coffee-hero-badge,
.coffee-side-card,
.metric-card,
.parent-metric-card,
.parent-mini-stat {
  background: linear-gradient(180deg, #ffffff 0%, #eff9f7 100%);
  color: var(--text);
  border-radius: 22px;
  border: 1px solid rgba(9, 86, 88, 0.12);
  box-shadow: var(--shadow-soft);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

.coffee-hero-badge,
.coffee-side-card,
.metric-card,
.parent-metric-card {
  padding: 20px;
}

.coffee-hero-badge span,
.coffee-side-card span,
.metric-card span,
.parent-metric-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.coffee-hero-badge strong,
.coffee-side-card strong,
.metric-card strong,
.parent-metric-card strong {
  color: #0a4f51;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1;
}

.coffee-hero-side {
  display: grid;
  gap: 18px;
}

.coffee-section-head,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(9, 86, 88, 0.14);
}

.coffee-section-head.inner,
.section-head.compact {
  margin-bottom: 14px;
}

.coffee-list-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.015) 32%, transparent 32.5%) 0 0 / 220px 220px,
    linear-gradient(135deg, #0d6769, #094c4e 58%, #07393b 100%);
  color: var(--text-inverse);
  border-color: rgba(255, 255, 255, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}

.coffee-list-card:hover,
.coffee-panel-card:hover,
.admin-panel-card:hover,
.card:hover,
.report-card:hover,
.student-card:hover,
.timeline-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
}

.coffee-list-thumb {
  width: 78px;
  aspect-ratio: 1;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #e8f5f2 100%);
  color: #0a4f51;
  font-family: "Outfit", sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.coffee-list-copy strong,
.student-card-head strong,
.list-item strong,
.report-card strong,
.timeline-head strong {
  color: inherit;
  font-size: 1.05rem;
}

.coffee-list-card b {
  display: grid;
  place-items: center;
  width: 40px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: #f7fffd;
  color: #0a5154;
}

.stack-list,
.timeline-list {
  display: grid;
  gap: 14px;
}

.stack-list > *,
.timeline-list > *,
.student-id-actions > *,
.tag-list > .teacher-stage-box,
.tag-list > .report-card,
.tab-row > *,
.data-list > *,
.parent-student-link-grid > *,
.parent-student-grid > * {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 10px 18px rgba(10, 78, 79, 0.08);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

.list-item,
.student-card,
.announcement-card,
.schedule-card,
.alert-card,
.timeline-card,
.student-id-action-card,
.parent-student-card,
.parent-detail-panel,
.parent-table-section,
.report-card {
  display: grid;
  gap: 10px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-list > *,
.parent-student-badges > *,
.option-stack > *,
.checkbox-card,
.teacher-stage-box {
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(11, 104, 106, 0.1);
  border: 1px solid rgba(11, 104, 106, 0.16);
  color: #0a5557;
}

.tab-row,
.option-stack,
.parent-student-badges,
.student-id-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tab-btn,
.parent-student-tab-link,
.student-id-button-row .btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
}

.tab-btn.active,
.parent-student-tab-link.active,
.tab-btn:hover,
.parent-student-tab-link:hover {
  background: linear-gradient(135deg, #0f7d80, #095a5c);
  color: #fff;
  border-color: transparent;
}

.form-grid,
.filter-grid,
.teacher-group-grid,
.teacher-stage-grid,
.data-row,
.global-tools-body {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(11, 99, 101, 0.045);
  border: 1px solid rgba(11, 99, 101, 0.1);
}

.form-grid-2,
.teacher-group-grid,
.teacher-stage-grid,
.parent-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.input,
.select,
.textarea,
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  border-radius: 18px;
  padding: 14px 16px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.input:focus,
.select:focus,
.textarea:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(11, 110, 112, 0.55);
  box-shadow: 0 0 0 4px rgba(11, 110, 112, 0.12);
}

.textarea,
textarea {
  min-height: 140px;
  resize: vertical;
}

.btn,
.btn-primary,
.btn-secondary,
.scanner-secondary,
button[type="submit"] {
  border: 0;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.scanner-secondary:hover,
button[type="submit"]:hover {
  transform: translateY(-1px);
}

.btn-primary,
button[type="submit"] {
  background: linear-gradient(135deg, #f8fffd, #dff1ee);
  color: #0a4f51;
  border: 1px solid rgba(9, 86, 88, 0.12);
  box-shadow: 0 14px 24px rgba(9, 86, 88, 0.18);
}

.btn-secondary,
.scanner-secondary,
.student-id-button-row .btn,
.global-tool-link,
.global-tool-btn {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.message,
.caption,
.empty-note {
  font-size: 0.95rem;
}

.message {
  min-height: 1.5em;
}

.empty-note {
  padding: 18px;
  border-radius: 20px;
  background: rgba(9, 86, 88, 0.08);
  border: 1px dashed rgba(9, 86, 88, 0.22);
  color: #0a5658;
}

.table-wrap,
.parent-student-table-wrap {
  overflow: auto;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}

.data-table,
.parent-student-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

.data-table thead th,
.parent-student-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-dark);
  color: #fff;
  text-align: right;
  font-weight: 700;
}

.data-table th,
.data-table td,
.parent-student-table th,
.parent-student-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.data-table tbody tr:nth-child(even) td,
.parent-student-table tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.02);
}

.data-table tbody tr:hover td,
.parent-student-table tbody tr:hover td {
  background: rgba(9, 86, 88, 0.06);
}

.result-card,
.student-qr-wrap,
.qr-code,
.student-qr-frame,
.data-key,
.data-value,
.data-row,
.timeline-head,
.timeline-date,
.student-meta,
.parent-link-stat {
  border-radius: 18px;
}

.result-card,
.student-qr-wrap,
.qr-code {
  min-height: 120px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.student-qr-wrap {
  display: grid;
  grid-template-columns: minmax(160px, 210px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0, rgba(255, 255, 255, 0.02) 32%, transparent 32.5%) 0 0 / 220px 220px,
    linear-gradient(135deg, #0c6669, #094b4d 58%, #07393b 100%);
  border-color: rgba(255, 255, 255, 0.14);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}

.student-qr-frame {
  position: relative;
  min-height: 188px;
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #ecf8f5 100%);
  border: 1px solid rgba(9, 86, 88, 0.12);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.student-qr-frame::before {
  content: "SCAN";
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(9, 86, 88, 0.08);
  border: 1px solid rgba(9, 86, 88, 0.14);
  color: #0a5255;
  font-family: "Outfit", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.announcement-thumb,
.student-qr-image {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}

.qr-empty-state {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 2px dashed rgba(9, 86, 88, 0.2);
  color: #0a5255;
  font-family: "Outfit", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff 0%, #edf7f5 100%);
}

.qr-code {
  display: grid;
  gap: 12px;
  align-content: center;
  background: rgba(255, 255, 255, 0.96);
}

.qr-code-label {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(9, 86, 88, 0.08);
  border: 1px solid rgba(9, 86, 88, 0.12);
  color: #0a5255;
  font-family: "Outfit", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.qr-code-value,
.parent-code-text,
.data-table td code {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f7679, #084e50);
  color: #f7fffd;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: "Outfit", "IBM Plex Sans Arabic", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.6;
  direction: ltr;
  text-align: center;
  word-break: break-word;
}

.data-table td code {
  padding: 10px 12px;
  font-size: 0.82rem;
}

.scanner-frame {
  position: relative;
  min-height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.scanner-video {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.scanner-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.25));
}

.scanner-target {
  width: min(280px, 52vw);
  aspect-ratio: 1;
  border-radius: 28px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.2);
}

.scanner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.attendance-toast {
  position: fixed;
  top: 22px;
  left: 22px;
  z-index: 20;
  min-width: 260px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f0e9 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.attendance-toast-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f7d80, #095b5d);
  color: #fff;
  font-weight: 800;
}

.attendance-toast-copy {
  display: grid;
  gap: 4px;
}

.auth-page {
  width: min(1200px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.auth-card,
.teacher-auth-panel {
  position: relative;
  overflow: hidden;
  width: min(540px, 100%);
  padding: 34px 30px;
  border-radius: 34px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 240, 233, 0.96) 100%);
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}

.auth-card::before,
.teacher-auth-panel::before {
  height: 130px;
  inset: 0 0 auto 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14) 0, rgba(255, 255, 255, 0.02) 32%, transparent 32.5%) 0 0 / 220px 220px,
    linear-gradient(135deg, #0d7073, #095558 58%, #063e40 100%);
}

.auth-card > *,
.teacher-auth-panel > * {
  position: relative;
  z-index: 1;
}

.auth-logo {
  margin-top: 12px;
  color: #fff;
}

.auth-subtitle {
  margin-top: 6px;
  margin-bottom: 22px;
  color: var(--text-soft);
}

.auth-group {
  display: grid;
  gap: 14px;
}

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

.timeline-card,
.alert-card {
  grid-template-columns: 1fr auto;
}

.mobile-sidebar-toggle,
.mobile-sidebar-backdrop,
.mobile-nav-drawer {
  display: none;
}

.mobile-sidebar-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, #0f7d80, #095b5d);
  color: #fff;
  z-index: 40;
  box-shadow: var(--shadow);
}

.mobile-sidebar-toggle-icon {
  display: grid;
  place-items: center;
}

.mobile-sidebar-toggle svg {
  width: 24px;
  height: 24px;
}

.mobile-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  border: 0;
  z-index: 35;
}

.mobile-nav-drawer {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(340px, calc(100vw - 32px));
  padding: 22px 18px;
  border-radius: 30px;
  z-index: 36;
  overflow: auto;
  transform: translateX(calc(100% + 24px));
  transition: transform 0.22s ease;
}

body.mobile-sidebar-open .mobile-sidebar-backdrop,
body.mobile-sidebar-open .mobile-nav-drawer,
body.mobile-sidebar-open .mobile-sidebar-toggle {
  display: block;
}

body.mobile-sidebar-open .mobile-nav-drawer {
  transform: translateX(0);
}

.mobile-nav-head {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.mobile-nav-footer {
  margin-top: 16px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1180px) {
  .coffee-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coffee-stage,
  .scanner-shell,
  .coffee-bottom-grid,
  .admin-section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-shell,
  .coffee-shell {
    width: min(100% - 18px, 100%);
    grid-template-columns: 1fr;
    margin: 12px auto 88px;
  }

  .sidebar,
  .coffee-rail {
    display: none;
  }

  .mobile-sidebar-toggle {
    display: block;
  }

  .coffee-topbar,
  .admin-hero {
    grid-template-columns: 1fr;
  }

  .coffee-list-grid,
  .form-grid-2,
  .form-grid-3,
  .teacher-group-grid,
  .teacher-stage-grid,
  .parent-info-grid,
  .dual-auth-grid {
    grid-template-columns: 1fr;
  }

  .coffee-topbar,
  .admin-hero,
  .coffee-panel-card,
  .card,
  .admin-panel-card,
  .scanner-stage,
  .auth-card,
  .teacher-auth-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .coffee-topbar h1,
  .admin-hero h2 {
    font-size: clamp(2rem, 11vw, 3.4rem);
  }

  .coffee-list-card {
    grid-template-columns: 64px 1fr auto;
    padding: 18px;
  }

  .coffee-list-thumb {
    width: 64px;
    border-radius: 18px;
  }

  .scanner-frame,
  .scanner-video {
    min-height: 300px;
  }

  .student-qr-wrap {
    grid-template-columns: 1fr;
  }

  .student-qr-frame {
    min-height: 160px;
  }

  .attendance-toast {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}
