.admin-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 5%, rgba(171, 232, 204, .5), transparent 28rem),
    radial-gradient(circle at 92% 0%, rgba(177, 222, 255, .54), transparent 30rem),
    #f5faf8;
}

.admin-shell { width: min(1480px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 80px; }
.admin-topbar { min-height: 86px; display: flex; align-items: center; justify-content: space-between; }
.admin-topbar .brand { text-decoration: none; }
.login-panel { min-height: calc(100vh - 180px); display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: clamp(40px, 8vw, 130px); padding: 50px min(7vw, 100px); }
.login-copy h1 { max-width: 760px; margin: 8px 0 18px; font-size: clamp(40px, 6vw, 78px); line-height: 1.04; letter-spacing: -.055em; }
.login-copy p { max-width: 660px; color: var(--muted); font-size: 18px; line-height: 1.75; }
.login-copy ul { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 12px; }
.login-copy li { display: flex; align-items: center; gap: 10px; color: #3f5d52; }
.login-copy li::before { content: '✓'; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #dff5e9; color: #16774e; font-weight: 900; }
.login-card { background: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.92); box-shadow: 0 28px 80px rgba(45,87,73,.15); border-radius: 30px; padding: clamp(28px, 5vw, 52px); backdrop-filter: blur(20px); display: grid; gap: 18px; }
.login-card > .brand-mark { width: 54px; height: 54px; font-size: 25px; }
.login-card h2 { margin: 2px 0 10px; font-size: 30px; letter-spacing: -.035em; }
.login-card label, .editor-panel label, .submission-editor label { display: grid; gap: 8px; }
.login-card label > span, .editor-panel label > span, .submission-editor label > span { color: #51635d; font-size: 13px; font-weight: 750; }
.login-card input, .editor-panel input, .editor-panel select, .editor-panel textarea, .submission-editor input, .submission-editor select, .submission-editor textarea, .report-admin-filters input, .report-admin-filters select { width: 100%; border: 1px solid #d8e4df; border-radius: 14px; background: #fff; color: var(--ink); font: inherit; outline: none; padding: 13px 14px; transition: .2s ease; }
.login-card input:focus, .editor-panel input:focus, .editor-panel select:focus, .editor-panel textarea:focus, .submission-editor input:focus, .submission-editor select:focus, .submission-editor textarea:focus, .report-admin-filters input:focus, .report-admin-filters select:focus { border-color: #4aa984; box-shadow: 0 0 0 4px rgba(70,170,129,.12); }
.login-card .primary-button { justify-content: center; margin-top: 4px; }
.login-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: center; }
.admin-dashboard { padding-top: 34px; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.dashboard-heading h1 { margin: 8px 0 8px; font-size: clamp(38px, 5vw, 64px); line-height: 1; letter-spacing: -.055em; }
.dashboard-heading p { margin: 0; color: var(--muted); }
.account-chip { display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 16px; background: rgba(255,255,255,.75); border: 1px solid #e0ebe7; border-radius: 999px; color: #466056; font-size: 13px; }
.account-chip button { border: 0; border-radius: 999px; padding: 8px 12px; background: #edf4f1; color: #486057; cursor: pointer; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 30px 0 18px; }
.admin-stats article { min-height: 128px; padding: 24px; border: 1px solid rgba(218,233,227,.95); background: rgba(255,255,255,.8); border-radius: 22px; display: grid; align-content: center; }
.admin-stats span { color: var(--muted); font-size: 13px; }
.admin-stats strong { margin: 2px 0; font-size: 36px; letter-spacing: -.04em; }
.admin-stats small { color: #8a9994; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; background: rgba(255,255,255,.78); border: 1px solid #dfebe6; border-radius: 20px; }
.toolbar-note { margin-left: auto; color: var(--muted); font-size: 13px; }
.admin-workspace { display: grid; grid-template-columns: minmax(310px, .72fr) minmax(560px, 1.55fr); gap: 18px; margin-top: 18px; align-items: start; }
.admin-index, .editor-panel, .reports-admin-panel, .submissions-admin-panel { border: 1px solid #ddeae5; background: rgba(255,255,255,.88); border-radius: 24px; box-shadow: 0 14px 44px rgba(61,98,85,.07); }
.admin-index { position: sticky; top: 18px; padding: 16px; }
.search-control.compact { min-height: 48px; }
.admin-index-head { display: flex; justify-content: space-between; gap: 10px; margin: 16px 4px 10px; color: var(--muted); font-size: 11px; }
.admin-index-head strong { color: var(--ink); font-size: 13px; }
.admin-group-list { max-height: 780px; overflow: auto; display: grid; gap: 7px; padding-right: 4px; }
.admin-group-card { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 12px; text-align: left; padding: 13px 14px; border: 1px solid transparent; border-radius: 15px; background: #f6faf8; color: var(--ink); cursor: pointer; }
.admin-group-card:hover { border-color: #cde3da; background: #f0f8f5; }
.admin-group-card.active { border-color: #83c8ac; background: #eaf7f1; box-shadow: inset 3px 0 #2d9269; }
.admin-group-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-group-card small { color: var(--muted); }
.remote-dot { width: 8px; height: 8px; border-radius: 50%; background: #2fa06f; align-self: center; box-shadow: 0 0 0 4px rgba(47,160,111,.12); }
.editor-panel { padding: clamp(22px, 3vw, 36px); }
.editor-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.editor-heading h2 { margin: 4px 0 0; font-size: 30px; letter-spacing: -.04em; }
.editor-badge { padding: 7px 11px; border-radius: 999px; background: #f1f4f3; color: #6d7c77; font-size: 11px; font-weight: 800; }
.editor-badge.remote { background: #def4e9; color: #14704b; }
#group-editor-form { display: grid; gap: 17px; }
.admin-form-row { grid-template-columns: minmax(0,1fr) 130px; }
.admin-form-row.triple { grid-template-columns: repeat(3, 1fr); }
.editor-panel textarea { resize: vertical; min-height: 90px; line-height: 1.65; }
.editor-panel label small { color: #93a19c; font-weight: 500; }
.part-two-fields { display: grid; gap: 17px; padding: 20px; background: #f4f9f7; border: 1px solid #e2ece8; border-radius: 18px; }
.editor-meta { padding: 11px 13px; background: #f7faf9; border-radius: 12px; color: #73827d; font-size: 12px; word-break: break-all; }
.editor-actions { display: flex; align-items: center; gap: 10px; padding-top: 5px; }
.danger-button { border: 1px solid #efc9c9; border-radius: 999px; padding: 11px 18px; background: #fff6f6; color: #a93939; font: inherit; font-weight: 750; cursor: pointer; }
.danger-button:hover { background: #ffeaea; }
.reports-admin-panel { margin-top: 18px; padding: 22px; }
.report-admin-filters { display: flex; gap: 8px; }
.report-admin-filters input { width: 210px; }
.reports-table-wrap { overflow-x: auto; }
.reports-table-wrap table { width: 100%; border-collapse: collapse; min-width: 760px; }
.reports-table-wrap th, .reports-table-wrap td { padding: 13px 12px; text-align: left; border-top: 1px solid #e9efed; font-size: 13px; }
.reports-table-wrap th { color: #72817c; font-size: 11px; text-transform: uppercase; }
.reports-table-wrap td:first-child { font-weight: 750; }
.table-delete { border: 0; background: #fff0f0; color: #a74040; border-radius: 9px; padding: 7px 10px; cursor: pointer; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.table-heat { border: 0; border-radius: 9px; padding: 7px 10px; color: #24705e; background: #e5f5ee; cursor: pointer; }
.table-heat.down { color: #6f6250; background: #f2eee7; }
.empty-table { padding: 36px !important; color: var(--muted); text-align: center !important; }

.submissions-admin-panel { margin-top: 18px; padding: 22px; }
.submission-review-workspace { display: grid; grid-template-columns: minmax(280px,.7fr) minmax(520px,1.5fr); gap: 18px; }
.submission-list { max-height: 720px; padding-right: 4px; display: grid; align-content: start; gap: 8px; overflow: auto; }
.submission-card { width: 100%; padding: 14px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 10px; border: 1px solid #e1ece7; border-radius: 15px; color: var(--ink); background: #f7faf9; text-align: left; cursor: pointer; }
.submission-card:hover { border-color: #bdddcf; }
.submission-card.active { border-color: #6db995; background: #eaf7f1; box-shadow: inset 3px 0 #2d9269; }
.submission-card small { color: var(--muted); }
.submission-status { padding: 5px 8px; border-radius: 999px; color: #8a6824; background: #fff0c8; font-size: 10px; }
.submission-status.approved { color: #176b4b; background: #dff4e8; }
.submission-status.rejected { color: #8b4848; background: #f9e5e5; }
.submission-editor { display: grid; gap: 16px; padding: 24px; border: 1px solid #e2ece8; border-radius: 19px; background: #fbfdfc; }
.submission-editor h3 { margin: 4px 0 0; font-size: 25px; letter-spacing: -.035em; }
.submission-editor textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
.submission-editor label small { color: #93a19c; font-weight: 500; }

@media (max-width: 1050px) {
  .login-panel { grid-template-columns: 1fr; padding: 50px 5vw; }
  .login-copy { text-align: center; }
  .login-copy p { margin-inline: auto; }
  .login-copy ul { width: fit-content; margin-inline: auto; text-align: left; }
  .login-card { width: min(560px, 100%); margin-inline: auto; }
  .admin-workspace { grid-template-columns: 1fr; }
  .submission-review-workspace { grid-template-columns: 1fr; }
  .admin-index { position: static; }
  .admin-group-list { max-height: 380px; }
}

@media (max-width: 720px) {
  .admin-shell { width: min(100% - 24px, 1480px); }
  .admin-topbar { min-height: 72px; }
  .admin-topbar .secondary-button { padding-inline: 12px; font-size: 12px; }
  .login-panel { min-height: auto; padding: 45px 0; gap: 30px; }
  .dashboard-heading { align-items: start; flex-direction: column; }
  .admin-stats { grid-template-columns: 1fr; }
  .toolbar-note { width: 100%; margin: 4px 4px 0; }
  .admin-form-row, .admin-form-row.triple { grid-template-columns: 1fr; }
  .editor-actions { align-items: stretch; flex-direction: column; }
  .report-admin-filters { width: 100%; flex-wrap: wrap; }
  .report-admin-filters input { flex: 1; min-width: 170px; }
}
