* { box-sizing: border-box; }
:root { color: #111827; background: #f4f7fb; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-synthesis: none; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.site-shell { min-height: 100vh; background: radial-gradient(circle at top left, rgb(34 197 94 / 15%), transparent 30%), #f4f7fb; }
.site-header { min-height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 14px max(20px, 5vw); border-bottom: 1px solid #e5e7eb; background: rgb(255 255 255 / 80%); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: #052e16; background: #4ade80; font-weight: 900; }
.header-link, footer a { font-weight: 700; }
.page { min-height: calc(100vh - 146px); display: grid; place-items: center; padding: 58px 20px; }
.hero { width: min(1050px, 100%); text-align: center; }
.badge { display: inline-block; padding: 8px 14px; border-radius: 999px; color: #166534; background: #dcfce7; font-size: .78rem; font-weight: 800; letter-spacing: .12em; }
h1 { max-width: 780px; margin: 20px auto 12px; font-size: clamp(2.2rem, 7vw, 4.8rem); line-height: .98; letter-spacing: -.05em; }
.intro, .qr-card > p { max-width: 650px; margin: 0 auto; color: #5f6b7a; font-size: 1.08rem; line-height: 1.65; }
.session-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 42px; }
.session-card { padding: 26px; border: 1px solid #e5e7eb; border-radius: 24px; background: #fff; box-shadow: 0 18px 50px rgb(17 24 39 / 10%); text-align: left; }
.icon { font-size: 2rem; }
.card-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; color: #6b7280; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.session-card h2 { margin: 10px 0; font-size: 1.35rem; }
.session-card p { min-height: 72px; margin: 0 0 22px; color: #5f6b7a; line-height: 1.55; }
button, .primary-link { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 18px; border: 0; border-radius: 12px; color: #fff; background: #111827; font-weight: 700; text-decoration: none; cursor: pointer; }
button:hover, .primary-link:hover { opacity: .9; }
.message { max-width: 620px; margin: 28px auto 0; padding: 16px 18px; border: 1px solid #bbf7d0; border-radius: 14px; color: #166534; background: #f0fdf4; }
footer { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px max(20px, 5vw); border-top: 1px solid #e5e7eb; color: #5f6b7a; background: rgb(255 255 255 / 75%); }
.qr-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top left, rgb(34 197 94 / 15%), transparent 30%), #f4f7fb; }
.qr-card { width: min(620px, 100%); padding: 38px 24px; border: 1px solid #e5e7eb; border-radius: 28px; background: #fff; box-shadow: 0 18px 50px rgb(17 24 39 / 10%); text-align: center; }
.qr-card h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
.qr-box { width: min(360px, 100%); margin: 30px auto 18px; padding: 18px; border: 1px solid #e5e7eb; border-radius: 22px; background: #fff; }
.qr-box img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.url { margin-bottom: 24px !important; overflow-wrap: anywhere; font-size: .95rem !important; }

.admin-body { color: #1f2937; background: #f3f5f8; }
.demo-banner { position: relative; z-index: 2; padding: 9px 20px; color: #713f12; background: #fef3c7; text-align: center; font-size: .88rem; }
.admin-layout { min-height: calc(100vh - 38px); display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: calc(100vh - 38px); display: flex; flex-direction: column; padding: 26px 18px 20px; color: #d1d5db; background: #111827; }
.brand-light { padding: 0 8px; color: #fff; }
.sidebar nav { display: grid; gap: 6px; margin-top: 40px; }
.nav-item { padding: 12px 14px; border-radius: 10px; color: #9ca3af; font-size: .94rem; font-weight: 650; text-decoration: none; }
.nav-item:hover, .nav-item.active { color: #fff; background: #1f2937; }
.admin-profile { display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 16px 8px 0; border-top: 1px solid #374151; }
.avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #052e16; background: #4ade80; font-size: .78rem; font-weight: 900; }
.admin-profile strong, .admin-profile small { display: block; }
.admin-profile strong { color: #fff; font-size: .88rem; }
.admin-profile small { margin-top: 2px; color: #9ca3af; font-size: .75rem; }
.admin-main { width: min(1320px, 100%); padding: 42px clamp(20px, 4vw, 64px) 80px; }
.admin-header, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.admin-header h1 { margin: 3px 0 8px; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.04em; }
.admin-header p:not(.eyebrow) { margin: 0; color: #6b7280; }
.eyebrow { margin: 0; color: #16a34a; font-size: .72rem; font-weight: 850; letter-spacing: .14em; }
.accent-button { color: #052e16; background: #4ade80; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 34px; }
.stat-card, .admin-section { border: 1px solid #e5e7eb; border-radius: 18px; background: #fff; box-shadow: 0 8px 26px rgb(15 23 42 / 5%); }
.stat-card { padding: 22px; }
.stat-card span, .stat-card small { display: block; color: #6b7280; }
.stat-card span { font-size: .85rem; font-weight: 700; }
.stat-card strong { display: block; margin: 8px 0 5px; font-size: 2rem; }
.stat-card small { font-size: .76rem; }
.admin-section { margin-top: 24px; padding: 26px; scroll-margin-top: 24px; }
.section-heading h2, .dialog-heading h2 { margin: 3px 0 0; font-size: 1.45rem; }
.text-button { min-height: auto; padding: 6px; color: #4b5563; background: transparent; font-size: .84rem; }
.toolbar { display: flex; gap: 12px; margin: 24px 0 16px; }
.search-field { flex: 1; }
input, select { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid #d1d5db; border-radius: 10px; color: #111827; background: #fff; }
input:focus, select:focus { outline: 3px solid rgb(74 222 128 / 28%); border-color: #22c55e; }
.toolbar select { min-width: 160px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { padding: 11px 12px; color: #6b7280; background: #f9fafb; text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
td { padding: 14px 12px; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
.video-title { min-width: 240px; display: flex; align-items: center; gap: 12px; }
.video-title strong, .video-title small { display: block; }
.video-title small { max-width: 210px; margin-top: 3px; overflow: hidden; color: #9ca3af; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.video-thumb { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #166534; background: #dcfce7; font-size: .75rem; }
.status-pill { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; text-transform: capitalize; }
.status-pill.published { color: #166534; background: #dcfce7; }
.status-pill.draft { color: #92400e; background: #fef3c7; }
.row-actions { display: flex; gap: 6px; }
.row-actions button { min-height: 32px; padding: 0 9px; color: #4b5563; background: #f3f4f6; font-size: .74rem; }
.empty-state { padding: 30px; color: #6b7280; text-align: center; }
.category-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.category-list article { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid #e5e7eb; border-radius: 14px; }
.category-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: #f3f4f6; font-size: 1.25rem; }
.category-list strong, .category-list small { display: block; }
.category-list small { margin-top: 3px; color: #6b7280; font-size: .76rem; }
dialog { width: min(560px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 24px 80px rgb(15 23 42 / 30%); }
dialog::backdrop { background: rgb(15 23 42 / 62%); backdrop-filter: blur(3px); }
dialog form { display: grid; gap: 17px; padding: 26px; }
.dialog-heading { display: flex; justify-content: space-between; gap: 20px; }
.icon-button { width: 36px; min-height: 36px; padding: 0; border-radius: 50%; color: #374151; background: #f3f4f6; font-size: 1.5rem; }
.form-note { margin: -4px 0 0; padding: 12px; border-radius: 10px; color: #713f12; background: #fffbeb; font-size: .82rem; line-height: 1.5; }
dialog label { display: grid; gap: 7px; font-size: .84rem; font-weight: 700; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.file-drop { padding: 16px; border: 1px dashed #9ca3af; border-radius: 12px; background: #f9fafb; }
.file-drop input { padding: 9px; background: #fff; }
.file-drop small { color: #6b7280; font-weight: 500; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.secondary-button { color: #374151; background: #e5e7eb; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 10; max-width: min(380px, calc(100% - 44px)); padding: 14px 18px; border-radius: 12px; color: #fff; background: #111827; box-shadow: 0 12px 34px rgb(15 23 42 / 25%); font-size: .88rem; }

@media (max-width: 1000px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .category-list { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .session-grid { grid-template-columns: 1fr; }
  .session-card p { min-height: auto; }
  footer { flex-direction: column; text-align: center; }
  .admin-layout { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 16px 20px; }
  .sidebar nav { display: flex; margin-top: 18px; overflow-x: auto; }
  .nav-item { white-space: nowrap; }
  .admin-profile { display: none; }
  .admin-main { padding-top: 28px; }
}
@media (max-width: 600px) {
  .admin-header { align-items: flex-start; flex-direction: column; }
  .accent-button { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-card strong { font-size: 1.6rem; }
  .admin-section { padding: 18px; }
  .toolbar, .form-row { flex-direction: column; grid-template-columns: 1fr; }
  .toolbar { display: flex; }
}
