:root { --admin-bg: #f3f5f3; }
.admin-page { min-height: 100vh; margin: 0; color: var(--ink); background: var(--admin-bg); font-size: 16px; }
.admin-page [hidden] { display: none !important; }
.admin-page:not(.admin-loaded) .admin-header, .admin-page:not(.admin-loaded) .admin-title { display: none; }
.admin-page:not(.admin-loaded) .admin-shell { display: grid; place-items: center; width: 100%; min-height: 100vh; margin: 0; }
.admin-header { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 32px; border-bottom: 1px solid #dbe3dd; background: #fff; }
.admin-header .brand { font-size: 16px; }
.admin-header .brand-mark { width: 32px; height: 32px; }
.admin-header .button, .admin-title .button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 0 16px; line-height: 1; font-size: 12px; }
.admin-header .button { color: var(--green); border: 1px solid #c9d9cf; background: #edf5f0; }
.admin-shell { width: min(1160px, calc(100% - 56px)); margin: 44px auto; }
.admin-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.admin-title p { margin: 0 0 7px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.admin-title h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(34px, 3vw, 44px); font-weight: 500; letter-spacing: -.035em; }
.admin-title .button.primary { color: white; border-color: var(--green); background: var(--green); }
.admin-title .button.primary:hover { background: var(--green-dark); }
.admin-error { margin: 0; color: #a23e2d; font-size: 13px; }
.admin-error:empty { display: none; }
.admin-gate { display: grid; justify-items: center; gap: 20px; box-sizing: border-box; width: min(520px, calc(100% - 32px)); margin: 0; padding: 64px 48px; border: 1px solid #d7e1da; border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: 0 28px 80px rgba(28,69,49,.12); text-align: center; }
.admin-gate h2 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.admin-gate .button { min-height: 48px; padding: 0 24px; font-size: 14px; }
.admin-lock { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; color: white; background: var(--green); font-family: Georgia, serif; font-size: 28px; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.admin-stats div { display: grid; gap: 6px; padding: 20px 22px; border: 1px solid #d8e1db; border-radius: 11px; background: #fff; box-shadow: 0 5px 18px rgba(28,69,49,.04); }

.admin-stats strong { font-family: Georgia, serif; font-size: 32px; font-weight: 500; }
.admin-stats span { color: var(--muted); font-size: 12px; }
.admin-table-wrap { overflow-x: auto; border: 1px solid #d7e1da; border-radius: 11px; background: white; box-shadow: 0 6px 22px rgba(28,69,49,.04); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
.admin-table th { color: var(--muted); background: #f7faf7; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-user { display: grid; gap: 3px; }
.admin-user span { color: var(--muted); font-size: 11px; }
.admin-plan { min-width: 132px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 13px; }
#adminMore { margin-top: 14px; }
.admin-row-actions { width: 1%; min-width: 210px; text-align: right !important; }
.admin-row-actions > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.admin-row-actions button, .admin-row-actions a { display: inline-flex; min-height: 32px; box-sizing: border-box; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid #ced9d1; border-radius: 6px; color: var(--green); background: white; font: inherit; font-size: 11px; font-weight: 700; line-height: 1; text-decoration: none; cursor: pointer; }
.admin-row-actions button:hover, .admin-row-actions a:hover { border-color: var(--green); background: #edf5f0; }
.admin-row-actions button:disabled { opacity: .55; cursor: wait; }
.admin-delete { min-height: 32px; padding: 0 11px; border: 1px solid #e2b8b0; border-radius: 6px; color: #a23e2d; background: white; font-size: 11px; font-weight: 700; }
.admin-delete:hover { color: white; border-color: #a23e2d; background: #a23e2d; }
.admin-delete:disabled { opacity: .55; cursor: wait; }
@media (max-width: 700px) { .admin-header { min-height: 64px; padding: 0 18px; } .admin-stats { grid-template-columns: 1fr; } .admin-shell { width: calc(100% - 28px); margin-top: 30px; } .admin-gate { box-sizing: border-box; margin-top: 30px; padding: 42px 24px; } }
