:root {
  --bg: #07111f;
  --panel: rgba(11, 22, 39, 0.82);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #eaf2ff;
  --muted: #99a6c0;
  --primary: #ffbe0b;
  --danger: #e63946;
  --success: #1faa74;
  --accent: #3a86ff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: linear-gradient(135deg, #03070f 0%, #081422 45%, #1e142d 100%);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--panel-border);
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}
.brand { font-size: 1.15rem; font-weight: 800; letter-spacing: .02em; }
.nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.nav a, .nav button {
  background: rgba(255,255,255,.06);
  color: var(--text);
  border: 1px solid var(--panel-border);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: .95rem;
  cursor: pointer;
}
.nav a.active { background: rgba(58, 134, 255, .18); border-color: rgba(58, 134, 255, .5); }
.hero {
  padding: 36px 0 14px;
}
.hero h1 { margin: 0 0 8px; font-size: 2rem; }
.hero p { margin: 0; color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .26);
}
.card h2, .card h3 { margin-top: 0; }
.kpi {
  display: flex; flex-direction: column; gap: 8px;
}
.kpi .label { color: var(--muted); font-size: .95rem; }
.kpi .value { font-size: 2rem; font-weight: 800; }

.flash {
  padding: 14px 18px;
  border-radius: 16px;
  margin: 16px 0;
  border: 1px solid transparent;
}
.flash.success { background: rgba(31, 170, 116, .16); border-color: rgba(31, 170, 116, .45); }
.flash.error { background: rgba(230, 57, 70, .16); border-color: rgba(230, 57, 70, .45); }

form.inline { display: inline; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: .92rem; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,.04);
  color: var(--text);
}

select, input[type="date"] {
  background-color: rgba(255,255,255,.04);
  color: var(--text);
}

select option,
select optgroup {
  background: #0b1526;
  color: #eaf2ff;
}

select:focus,
input[type="date"]:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(58, 134, 255, .65);
  box-shadow: 0 0 0 3px rgba(58, 134, 255, .18);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.2);
  cursor: pointer;
}
textarea { min-height: 100px; resize: vertical; }
button, .btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: var(--primary); color: #111; }
.btn-accent { background: var(--accent); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-muted { background: rgba(255,255,255,.08); color: var(--text); border: 1px solid var(--panel-border); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.table-wrap { overflow: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}
th, td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-align: left;
  vertical-align: top;
}
th { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
}
.badge.pending { background: rgba(255,190,11,.18); color: #ffd166; }
.badge.approved { background: rgba(31,170,116,.18); color: #9ff0ca; }
.badge.rejected { background: rgba(230,57,70,.18); color: #ff9ea7; }
.list { display: grid; gap: 12px; }
.notice {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--panel-border);
}
.small { font-size: .9rem; color: var(--muted); }
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
}
.login-aside {
  padding: 48px;
  background: radial-gradient(circle at top left, rgba(255,190,11,.18), transparent 30%),
              radial-gradient(circle at bottom right, rgba(58,134,255,.18), transparent 25%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-card {
  max-width: 520px;
  margin: 48px auto;
  width: calc(100% - 32px);
}
.event-card {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,.03);
}
.event-meta { color: var(--muted); font-size: .92rem; }
.event-title { font-size: 1.08rem; font-weight: 800; margin-bottom: 4px; }
.time-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.time-pills span {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: .85rem;
}

.quick-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}
.quick-date {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,.05);
  color: var(--text);
  font-size: .88rem;
}
.quick-date.active {
  background: rgba(58, 134, 255, .18);
  border-color: rgba(58, 134, 255, .55);
}

.footer-space { height: 28px; }

@media (max-width: 960px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .form-grid, .form-grid.cols-3, .login-shell, .template-grid {
    grid-template-columns: 1fr;
  }
  .topbar .container { align-items: flex-start; flex-direction: column; }
}


.template-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 18px;
}
.upload-card {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  border-radius: 22px;
  padding: 18px;
}
.upload-card h3 { margin: 0 0 14px; }
.field-help {
  margin-top: 6px;
  font-size: .82rem;
  color: var(--muted);
}
input[type="file"] {
  padding: 10px 12px;
}
.notice-soft {
  background: rgba(58,134,255,.10);
  border-color: rgba(58,134,255,.28);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.tag-accent {
  background: rgba(255,190,11,.16);
  color: #ffd166;
  border: 1px solid rgba(255,190,11,.28);
}


.prompt-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 6px 0 20px;
}
.prompt-card {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prompt-card strong { font-size: .95rem; }
.prompt-card span { color: var(--muted); font-size: .86rem; line-height: 1.35; }
.prompt-card.active {
  border-color: rgba(58, 134, 255, .55);
  box-shadow: inset 0 0 0 1px rgba(58, 134, 255, .18);
}

.mode-switch {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.mode-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 4px;
  min-height: 54px;
}
.mode-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.mode-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  transition: .2s ease;
}
.mode-pill input:checked + span {
  background: rgba(58, 134, 255, .16);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(58, 134, 255, .35);
}

.manual-assets {
  opacity: .55;
  transition: .25s ease;
}
.manual-assets:not(.is-visible) input[type="file"] {
  pointer-events: none;
}
.manual-assets.is-visible {
  opacity: 1;
}

@media (max-width: 980px) {
  .prompt-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .mode-switch,
  .prompt-strip {
    grid-template-columns: 1fr;
  }
}


.prompt-category-active {
  border-color: rgba(58, 134, 255, .55);
  box-shadow: inset 0 0 0 1px rgba(58, 134, 255, .18);
}
.prompt-editor-card {
  border-radius: 20px;
  padding: 18px;
}
.link-inline {
  color: #ffd166;
  text-decoration: underline;
}
.prompt-editor-card textarea {
  min-height: 140px;
}

@media (max-width: 980px) {
  .prompt-editor-card .form-grid.cols-3,
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }
}


.prompt-selector-stack {
  display: grid;
  gap: 18px;
  margin: 20px 0 8px;
}
.prompt-group {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  border-radius: 22px;
  padding: 18px;
}
.prompt-group-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.prompt-group-header h3 {
  margin: 0 0 6px;
}
.prompt-group-header p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}
.prompt-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.prompt-choice {
  display: block;
  cursor: pointer;
}
.prompt-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.prompt-choice-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,.04);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.prompt-choice:hover .prompt-choice-body {
  transform: translateY(-2px);
  border-color: rgba(255,190,11,.34);
}
.prompt-choice input:checked + .prompt-choice-body {
  border-color: rgba(58, 134, 255, .65);
  box-shadow: inset 0 0 0 1px rgba(58, 134, 255, .18), 0 12px 28px rgba(0,0,0,.20);
  background: linear-gradient(180deg, rgba(58,134,255,.11), rgba(255,255,255,.04));
}
.prompt-choice-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.prompt-choice-slot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: .82rem;
  font-weight: 800;
}
.prompt-choice-preset {
  color: var(--muted);
  font-size: .82rem;
  text-transform: capitalize;
}
.prompt-choice-description {
  color: #fff;
  font-size: .92rem;
  line-height: 1.4;
}
.prompt-choice-excerpt {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
  flex: 1;
}
.prompt-choice-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,190,11,.18);
  border: 1px solid rgba(255,190,11,.28);
  color: #ffd166;
  font-weight: 800;
  letter-spacing: .02em;
}
.prompt-choice input:checked + .prompt-choice-body .prompt-choice-action {
  background: rgba(58,134,255,.16);
  border-color: rgba(58,134,255,.35);
  color: #fff;
}
@media (max-width: 980px) {
  .prompt-selector-grid {
    grid-template-columns: 1fr;
  }
  .prompt-group-header {
    flex-direction: column;
  }
}
