.admin-page { background: #f5f5f3; }
.admin-page .brand { text-decoration: none; }
.admin-page .topnav a.nav-link { display: flex; align-items: center; text-decoration: none; }
.admin-page .admin-current { display: flex; align-items: center; color: white; }
.admin-main { width: min(1320px, calc(100% - 40px)); margin: 0 auto; padding: 45px 0 90px; }
.admin-heading { margin-bottom: 30px; }
.admin-heading h1 { margin: 4px 0 8px; font-size: clamp(32px, 4vw, 50px); line-height: 1.05; letter-spacing: -.045em; }
.admin-heading > p:last-child { margin: 0; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card, .admin-panel { border: 1px solid #e1e1e3; border-radius: 10px; background: #fff; box-shadow: 0 4px 18px rgba(20,20,25,.035); }
.stat-card { padding: 20px; }
.stat-card b { display: block; margin-bottom: 5px; font-size: clamp(25px, 3vw, 37px); line-height: 1; }
.stat-card span { color: #66686e; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.admin-panel { margin-bottom: 18px; padding: 25px; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 24px; }
.panel-heading h2 { margin: 0 0 5px; font-size: 22px; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.secondary-button { border: 1px solid #d5d5d9; border-radius: 6px; background: #fff; padding: 10px 13px; font-weight: 700; font-size: 13px; cursor: pointer; }
.secondary-button:hover { background: #f1f1f2; }
.admin-page .primary-button { border: 0; border-radius: 6px; padding: 10px 16px; color: white; background: var(--red); font-weight: 800; cursor: pointer; }
.admin-page .primary-button:hover { background: var(--red-dark); }
.admin-page button:disabled { opacity: .55; cursor: wait; }
.usage-chart { min-height: 185px; display: flex; align-items: end; gap: 8px; padding: 8px 0; border-bottom: 1px solid #e7e7e9; }
.chart-day { flex: 1; min-width: 0; display: grid; grid-template-rows: 140px auto auto; gap: 5px; align-items: end; text-align: center; }
.chart-track { height: 140px; display: flex; align-items: end; justify-content: center; background: #f6f6f7; border-radius: 5px 5px 0 0; }
.chart-bar { width: min(100%, 34px); min-height: 3px; background: var(--red); border-radius: 4px 4px 0 0; }
.chart-day small { font-size: 10px; color: #777a80; }
.chart-day strong { font-size: 10px; font-weight: 700; }
.metric-note { margin: 18px 0 0; color: #777a80; font-size: 12px; line-height: 1.5; }
.create-form { display: grid; grid-template-columns: 1fr 1fr auto auto auto; align-items: end; gap: 10px; }
.invitation-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 10px; max-width: 720px; }
.invitation-form label { display: grid; gap: 7px; font-size: 12px; font-weight: 750; }
.invitation-form input { min-width: 0; height: 41px; padding: 0 12px; border: 1px solid #d2d2d6; border-radius: 6px; background: #fff; font: inherit; }
.invitation-form input:focus { outline: 2px solid rgba(226,50,40,.3); border-color: var(--red); }
.invitation-table { margin-top: 18px; }
.invitation-table .status-pill { margin-left: 0; }
.create-form label, .reset-dialog label { display: grid; gap: 7px; font-size: 12px; font-weight: 750; }
.create-form input, .reset-dialog input, .table-search input { min-width: 0; height: 41px; padding: 0 12px; border: 1px solid #d2d2d6; border-radius: 6px; background: #fff; font: inherit; }
.create-form input:focus, .reset-dialog input:focus, .table-search input:focus { outline: 2px solid rgba(226,50,40,.3); border-color: var(--red); }
.form-message { min-height: 20px; margin: 14px 0 0; font-size: 13px; color: #356e4b; }
.form-message.error, .admin-error { color: #b71f18; }
.admin-error { padding: 15px; background: #fff0ef; border-radius: 7px; }
.table-search { display: grid; gap: 6px; font-size: 12px; font-weight: 750; }
.table-search input { width: 220px; }
.table-scroll { overflow-x: auto; }
.user-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.user-table th { padding: 10px 12px; border-bottom: 1px solid #e5e5e8; color: #777a80; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.user-table td { padding: 14px 12px; border-bottom: 1px solid #efeff1; font-size: 13px; vertical-align: middle; }
.user-table tr:last-child td { border-bottom: 0; }
.user-table td small { display: block; margin-top: 4px; color: #777a80; }
.user-name { font-weight: 800; }
.status-pill { display: inline-block; margin-left: 7px; padding: 3px 7px; border-radius: 99px; background: #e4f4e8; color: #236941; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.status-pill.disabled { background: #f6e1df; color: #a32922; }
.status-pill.admin { background: #ebe5fb; color: #61419c; }
.row-actions { display: flex; gap: 5px; }
.row-actions button { padding: 7px 9px; border: 1px solid #dedee2; border-radius: 5px; background: white; cursor: pointer; font-size: 11px; font-weight: 700; }
.row-actions button:hover { border-color: #a9a9af; }
.row-actions .danger-action { color: #b71f18; border-color: #e8cac6; }
.row-actions .danger-action:hover { background: #fff1ef; }
.user-table th:last-child, .user-table td:last-child { position: sticky; right: 0; background: white; box-shadow: -7px 0 12px -10px rgba(0,0,0,.3); }
.admin-page .danger-button { background: #b71f18; }
.admin-page .danger-button:hover { background: #941a14; }
.reset-dialog { width: min(450px, calc(100% - 30px)); padding: 28px; border: 1px solid #dddde0; border-radius: 10px; box-shadow: 0 25px 70px rgba(0,0,0,.25); }
.reset-dialog::backdrop { background: rgba(10,10,12,.55); }
.reset-dialog h2 { margin: 0 0 4px; }
.reset-dialog p { color: #66686e; }
.reset-dialog input { width: 100%; }
.dialog-tools, .dialog-actions { display: flex; gap: 8px; margin-top: 14px; }
.dialog-actions { justify-content: end; margin-top: 20px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } .create-form { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } .admin-panel { padding: 18px; } .panel-heading { flex-direction: column; } .create-form { grid-template-columns: 1fr 1fr; } .create-form label { grid-column: 1 / -1; } .create-form .primary-button { grid-column: 1 / -1; } .usage-chart { gap: 3px; } .chart-day small { font-size: 8px; } }
@media (max-width: 700px) { .row-actions { max-width: 170px; flex-wrap: wrap; } .row-actions button { flex: 1 1 45%; } }
@media (max-width: 700px) { .invitation-form { grid-template-columns: 1fr; } }
