/* ResLook Conference platform — admin */

:root {
  --navy: #0B1F33;
  --navy-2: #12304F;
  --blue: #1D5FBF;
  --blue-dark: #164C9C;
  --blue-soft: #EAF2FF;
  --paper: #F7FAFD;
  --white: #FFFFFF;
  --ink: #0B1B2B;
  --muted: #5A6B7E;
  --line: #E2E8F0;
  --line-strong: #CBD8E8;
  --success: #0F7B4F;
  --warning: #9A5B00;
  --error: #B42318;
  --display: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 8px 24px rgba(11,31,51,.06);
}

* , *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); color: var(--navy); letter-spacing: -.025em; }
h1 { margin: 0 0 .35rem; font-size: 2rem; line-height: 1.15; }
h2 { margin: 0; font-size: 1.2rem; line-height: 1.3; }
h3 { margin: 0; font-size: 1rem; }
p { margin: 0 0 .8rem; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::selection { background: #CFE3FF; }
.muted { color: var(--muted); }

/* --------------------------------------------------------------- shell */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1rem 1rem;
  background: var(--white);
  border-right: 1px solid var(--line);
  z-index: 40;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .2rem .35rem;
  color: var(--navy);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -.025em;
}
.brand em { font-style: normal; color: var(--blue); }
.brand-mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand--light { color: var(--white); }
.brand--light em { color: var(--sky, #8CC2FF); }
.sidebar > .btn { margin: 1.25rem 0 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 42px;
  padding: .55rem .95rem;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--paper); border-color: var(--blue); color: var(--blue); }
.btn-danger { background: #FFF1F0; color: var(--error); border-color: #F3C5C1; }
.btn-danger:hover { background: #FFE4E1; }
.btn-small { min-height: 36px; padding: .4rem .75rem; font-size: .76rem; }
.btn-block { width: 100%; }

.side-nav { margin-top: .2rem; overflow-y: auto; }
.side-label {
  margin: 1rem .5rem .35rem;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8B98A8;
}
.side-link {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .55rem;
  border-radius: 6px;
  color: var(--navy-2);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
}
.side-link svg { width: 16px; height: 16px; color: var(--muted); }
.side-link:hover, .side-link.is-active { background: var(--blue-soft); color: var(--blue); }
.side-link:hover svg, .side-link.is-active svg { color: var(--blue); }
.side-event {
  display: block;
  padding: .5rem .55rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--navy-2);
}
.side-event span { display: block; font-size: .8rem; font-weight: 500; line-height: 1.35; }
.side-event small { display: block; margin-top: .12rem; font-size: .66rem; color: var(--muted); }
.side-event:hover, .side-event.is-active { background: var(--paper); }
.sidebar-foot {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.user-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: .76rem;
  font-weight: 700;
}
.user-meta { min-width: 0; flex: 1; }
.user-meta strong { display: block; font-size: .76rem; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { display: block; font-size: .64rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--muted);
}
.icon-button:hover { color: var(--blue); border-color: var(--blue); }
.icon-button svg { width: 15px; height: 15px; }

.app-main { min-width: 0; }
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 2rem;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: .6rem; }
.topbar-title { font-size: .8rem; font-weight: 600; color: var(--navy-2); }
.mobile-menu {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
}
.mobile-menu svg { width: 18px; height: 18px; }
.app-content { max-width: 1180px; margin: 0 auto; padding: 2rem 2rem 4rem; }

/* --------------------------------------------------------------- pages */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.page-head--split { align-items: flex-end; }
.page-lede { margin: .2rem 0 0; color: var(--muted); font-size: .88rem; }
.head-kicker { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; font-size: .72rem; color: var(--muted); }
.head-actions { display: flex; gap: .5rem; align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0 0 .55rem;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.stat-card { padding: 1rem 1.05rem; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.stat-label { display: block; font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat-card strong { display: block; margin: .25rem 0 .1rem; font-family: var(--display); font-size: 1.65rem; line-height: 1; color: var(--navy); letter-spacing: -.03em; }
.stat-note { font-size: .65rem; color: var(--muted); }

.event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.event-card { padding: 1.15rem; border: 1px solid var(--line); border-radius: 9px; background: var(--white); transition: border-color .18s ease, box-shadow .18s ease; }
.event-card:hover { border-color: #BBD6F8; box-shadow: var(--shadow); }
.event-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .55rem; }
.event-date { font-size: .68rem; color: var(--muted); }
.event-card h2 { margin: 0 0 .25rem; font-size: 1.12rem; }
.event-card h2 a { text-decoration: none; }
.event-card h2 a:hover { color: var(--blue); }
.event-meta { margin: 0 0 .8rem; font-size: .74rem; color: var(--muted); }
.event-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; padding: .7rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.event-stats strong { display: block; font-family: var(--display); font-size: .98rem; color: var(--navy); }
.event-stats span { font-size: .62rem; color: var(--muted); }
.event-actions { display: flex; align-items: center; justify-content: space-between; margin-top: .7rem; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: .16rem .45rem;
  border-radius: 4px;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge--published { background: #E8F7EF; color: var(--success); }
.badge--draft { background: #F1F3F6; color: var(--muted); }
.status { display: inline-flex; padding: .15rem .42rem; border-radius: 4px; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.status--paid { background: #E8F7EF; color: var(--success); }
.status--pending { background: #FFF5E6; color: var(--warning); }
.status--cancelled { background: #FFF1F0; color: var(--error); }

.notice { padding: .75rem .9rem; margin-bottom: 1.2rem; border: 1px solid #F1D7A8; border-radius: 8px; background: #FFF9ED; color: #6B4A00; font-size: .78rem; }
.notice strong { color: #4E3500; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-bottom: .9rem; }
.two-col--wide-left { grid-template-columns: 1.45fr .85fr; }
.panel { padding: 1.1rem 1.15rem; border: 1px solid var(--line); border-radius: 9px; background: var(--white); margin-bottom: .9rem; }
.panel--sticky { align-self: start; position: sticky; top: 80px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.panel-head p { margin: .2rem 0 0; font-size: .74rem; color: var(--muted); }
.text-link { color: var(--blue); font-size: .76rem; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.text-link--muted { color: var(--muted); }

.type-list { margin: 0 0 .9rem; padding: 0; list-style: none; }
.type-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-top: 1px solid var(--line); }
.type-list li:first-child { border-top: 0; padding-top: 0; }
.type-list strong { display: block; font-size: .82rem; color: var(--navy); }
.type-list span { display: block; margin-top: .1rem; font-size: .68rem; color: var(--muted); }
.type-price { text-align: right; flex: 0 0 auto; }
.type-price strong { font-family: var(--display); font-size: .9rem; }
.type-price span { text-transform: uppercase; font-size: .56rem; letter-spacing: .05em; }

.url-box { display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); margin-bottom: .8rem; }
.url-box code { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .68rem; color: var(--navy-2); }
.stat-rows { border-top: 1px solid var(--line); }
.stat-rows div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .74rem; }
.stat-rows div:last-child { border-bottom: 0; }
.stat-rows span { color: var(--muted); }
.stat-rows strong { color: var(--navy); }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.data-table th { padding: .55rem .6rem; border-bottom: 1px solid var(--line-strong); text-align: left; font-size: .6rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.data-table td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--navy-2); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table strong { color: var(--navy); font-weight: 600; }
.data-table a { color: var(--muted); text-decoration: none; }
.data-table a:hover { color: var(--blue); }

/* ----------------------------------------------------------------- forms */
.form-panel { max-width: 850px; }
.form-section { padding-bottom: 1.2rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { border-bottom: 0; }
.form-section h2 { font-size: 1rem; margin-bottom: .15rem; }
.form-hint { margin: .2rem 0 .8rem; font-size: .7rem; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form-grid--compact { grid-template-columns: 1.2fr .8fr .8fr; gap: .55rem; }
.field { display: flex; flex-direction: column; gap: .25rem; }
.field--full { grid-column: 1 / -1; }
.field > span { font-size: .64rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--navy-2); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 40px;
  padding: .5rem .6rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
  font-size: .82rem;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,95,191,.1); }
.field input[type="color"] { padding: .2rem; width: 70px; min-height: 40px; }
.field--check { flex-direction: row; align-items: center; gap: .4rem; padding-top: 1.1rem; }
.field--check input { width: auto; min-height: 0; }
.field--check span { text-transform: none; letter-spacing: 0; font-size: .76rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .5rem; padding-top: .5rem; }
.stack-form { display: flex; flex-direction: column; gap: .7rem; }
.type-editor { padding: .8rem 0; border-top: 1px solid var(--line); }
.type-editor:first-child { border-top: 0; padding-top: 0; }
.type-editor-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.type-editor-head strong { color: var(--navy); font-size: .84rem; }
.type-editor-head span { font-size: .66rem; }
.type-editor-actions { display: flex; gap: .4rem; margin-top: .55rem; }

/* ---------------------------------------------------------------- auth */
.auth-body { background: var(--paper); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.02fr .98fr; }
.auth-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.2rem 3rem;
  background: var(--navy);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.auth-brand::before { content: ""; position: absolute; inset: -10%; background: url('/static/blueprint.svg') center / 120% no-repeat; opacity: .2; }
.auth-brand > * { position: relative; }
.auth-brand-copy { max-width: 30rem; }
.auth-brand-copy .eyebrow { color: var(--sky, #8CC2FF); }
.auth-brand-copy h1 { color: var(--white); font-size: clamp(2.1rem, 3.6vw, 3.2rem); line-height: 1.08; margin-bottom: .9rem; }
.auth-brand-copy p { color: rgba(255,255,255,.72); font-size: 1rem; line-height: 1.65; }
.auth-brand-foot { margin: 0; font-size: .68rem; color: rgba(255,255,255,.45); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-card { width: min(420px, 100%); }
.auth-card .eyebrow { color: var(--blue); }
.auth-card h2 { font-size: 1.8rem; margin-bottom: .3rem; }
.auth-lede { color: var(--muted); font-size: .86rem; margin-bottom: 1.2rem; }
.auth-form { display: flex; flex-direction: column; gap: .7rem; }
.auth-links { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .74rem; color: var(--muted); }
.auth-links a { color: var(--blue); text-decoration: none; font-weight: 600; }
.auth-links p { margin: .3rem 0; }

/* --------------------------------------------------------------- flash */
.flash-stack { margin-bottom: 1rem; }
.flash { padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 6px; background: var(--white); font-size: .78rem; margin-bottom: .45rem; }
.flash--success { border-color: #BFE3CF; background: #F1FBF5; color: #145C3A; }
.flash--error { border-color: #F3C5C1; background: #FFF7F6; color: var(--error); }
.flash--warning { border-color: #F1D7A8; background: #FFF9ED; color: #6B4A00; }

.empty-state { padding: 3rem 1.5rem; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--white); text-align: center; }
.empty-state--compact { padding: 2rem 1rem; border: 0; }
.empty-icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .7rem; border-radius: 10px; background: var(--blue-soft); color: var(--blue); }
.empty-icon svg { width: 21px; height: 21px; }
.empty-state h2 { margin-bottom: .3rem; }
.empty-state p { max-width: 28rem; margin: 0 auto .9rem; color: var(--muted); font-size: .84rem; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.filter-tabs { display: flex; gap: .25rem; padding: .2rem; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.filter-tab { padding: .35rem .65rem; border-radius: 5px; color: var(--muted); font-size: .7rem; font-weight: 600; text-decoration: none; }
.filter-tab:hover { color: var(--blue); }
.filter-tab.is-active { background: var(--blue-soft); color: var(--blue); }

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; left: -280px; width: 260px; transition: left .2s ease; box-shadow: 0 10px 30px rgba(11,31,51,.14); }
  .sidebar.is-open { left: 0; }
  .mobile-menu { display: inline-flex; }
  .app-content { padding: 1.4rem 1rem 3rem; }
  .app-topbar { padding: .6rem 1rem; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-grid, .two-col, .two-col--wide-left { grid-template-columns: 1fr; }
  .panel--sticky { position: static; }
}
@media (max-width: 720px) {
  h1 { font-size: 1.7rem; }
  .page-head, .page-head--split { flex-direction: column; align-items: flex-start; }
  .stats-grid { gap: .5rem; }
  .stat-card { padding: .8rem; }
  .stat-card strong { font-size: 1.35rem; }
  .form-grid, .form-grid--compact { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 260px; padding: 1.4rem; }
  .auth-brand-copy h1 { font-size: 1.7rem; }
  .auth-panel { padding: 1.4rem 1rem 2rem; }
  .toolbar { flex-direction: column; align-items: flex-start; }
  .head-actions { flex-wrap: wrap; }
  .data-table { min-width: 680px; }
}

.status--submitted { background: #EEF4FF; color: var(--blue); }
.status--under_review { background: #FFF5E6; color: var(--warning); }
.status--accepted { background: #E8F7EF; color: var(--success); }
.status--rejected { background: #FFF1F0; color: var(--error); }
.status--withdrawn { background: #F1F3F6; color: var(--muted); }
.abstract-text {
  white-space: pre-line;
  margin: 0 0 1rem;
  font-size: .88rem;
  line-height: 1.75;
  color: var(--navy-2);
}

.panel-cta { margin-top: .8rem; }
