.admin-body { min-height: 100vh; }
.login-screen { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: #eef4f0; }
.login-art { display: flex; flex-direction: column; justify-content: space-between; padding: 56px; color: #fff; background: linear-gradient(145deg,#0c6230,#1c984d); }
.login-art .brand-lockup { display: flex; align-items: center; gap: 14px; font-size: 20px; font-weight: 800; }
.login-art .brand-mark { width: 48px; height: 48px; margin: 0; border-radius: 14px; background: rgba(255,255,255,.18); }
.login-copy { max-width: 610px; }
.login-copy h1 { margin: 0; font-size: clamp(42px,6vw,72px); line-height: 1.08; letter-spacing: -.05em; }
.login-copy p { margin: 24px 0 0; color: rgba(255,255,255,.78); font-size: 17px; }
.login-features { display: flex; gap: 26px; color: rgba(255,255,255,.85); font-size: 13px; }
.login-panel { display: grid; place-items: center; padding: 30px; background: #fff; }
.login-form { width: min(420px,100%); }
.login-form h2 { margin: 0; color: var(--ink); font-size: 30px; }
.login-form > p { margin: 8px 0 30px; color: var(--muted); }
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { color: var(--ink); font-size: 13px; font-weight: 700; }
.field input,.field select,.field textarea { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #ccd8d0; border-radius: 9px; outline: none; transition: border .16s,box-shadow .16s; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.field input:focus,.field select:focus,.field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23,140,69,.12); }
.field small { color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.login-form .button { width: 100%; min-height: 48px; margin-top: 6px; }
.demo-account { margin-top: 18px; padding: 12px 14px; color: #58665d; background: #f2f6f3; border-radius: 9px; font-size: 13px; }
.admin-app { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 14px; color: #dcebe1; background: #17251d; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand .brand-mark { width: 38px; height: 38px; margin: 0; border-radius: 11px; font-size: 18px; }
.sidebar-brand strong { display: block; color: #fff; font-size: 15px; }
.sidebar-brand small { color: #91a99a; font-size: 11px; }
.nav-list { display: grid; gap: 3px; margin-top: 18px; }
.nav-item { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 12px; color: #aebfb4; background: transparent; border: 0; border-radius: 9px; text-align: left; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: var(--brand); }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 1.8; }
.sidebar-foot { margin-top: 22px; padding: 15px 10px 0; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-user { color: #fff; font-weight: 700; }
.sidebar-role { color: #91a99a; font-size: 12px; }
.sidebar-logout { margin-top: 10px; color: #c7d5cb; background: transparent; border: 0; padding: 0; }
.main-area { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 50; height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; background: rgba(255,255,255,.93); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar-title { color: var(--ink); font-size: 18px; font-weight: 800; }
.topbar-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.health-dot { width: 8px; height: 8px; background: #1fad5b; border-radius: 50%; }
.content { width: min(1520px,100%); margin: 0 auto; padding: 28px 30px 50px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1 { margin: 0; color: var(--ink); font-size: 26px; letter-spacing: -.03em; }
.page-head p { margin: 5px 0 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.metric { min-height: 126px; padding: 19px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 7px 22px rgba(24,49,31,.035); }
.metric-label { color: var(--muted); font-size: 13px; }
.metric-value { margin-top: 12px; color: var(--ink); font-size: 28px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.metric-note { margin-top: 5px; color: #7d8981; font-size: 12px; }
.metric.emphasis { color: #fff; background: linear-gradient(135deg,#10723a,#209c50); border-color: transparent; }
.metric.emphasis .metric-label,.metric.emphasis .metric-note { color: rgba(255,255,255,.72); }
.metric.emphasis .metric-value { color: #fff; }
.grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.panel { min-width: 0; margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 25px rgba(24,49,31,.035); }
.panel-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 19px; border-bottom: 1px solid #edf1ee; }
.panel-head h2 { margin: 0; color: var(--ink); font-size: 16px; }
.panel-body { padding: 19px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 12px 14px; color: #647168; background: #f7f9f7; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-weight: 700; }
td { padding: 13px 14px; color: var(--text); border-bottom: 1px solid #edf1ee; vertical-align: middle; }
tbody tr:hover { background: #fbfcfb; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.row-disabled { background: #fafbfa; }
tbody tr.row-disabled td:not(:last-child) { opacity: .62; }
.number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.status { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status.active,.status.success,.status.completed,.status.settled,.status.available,.status.paid { color: #08723a; background: #e6f6eb; }
.status.pending,.status.estimated,.status.pending_settlement,.status.withdrawing,.status.approved { color: #985909; background: #fff3d8; }
.status.failed,.status.refunded,.status.cancelled,.status.rejected,.status.frozen { color: #aa312b; background: #ffebe9; }
.status.inactive,.status.paused,.status.untested { color: #657069; background: #edf0ee; }
.table-actions { display: flex; gap: 7px; white-space: nowrap; }
.table-actions .button:disabled { opacity: .55; cursor: wait; }
.form-panel { padding: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
.form-grid .wide { grid-column: 1/-1; }
.switch-line { min-height: 44px; display: flex; align-items: center; gap: 10px; }
.switch-line input { width: 18px; height: 18px; accent-color: var(--brand); }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 6px; }
.tabs { display: flex; gap: 4px; padding: 5px; background: #eef3ef; border-radius: 10px; }
.tab { min-height: 34px; padding: 0 13px; color: var(--muted); background: transparent; border: 0; border-radius: 7px; }
.tab.active { color: var(--brand-strong); background: #fff; box-shadow: 0 2px 8px rgba(20,50,31,.06); font-weight: 700; }
.code-box { padding: 14px; overflow: auto; color: #d9ebdf; background: #17251d; border-radius: 9px; font: 12px/1.6 Consolas,monospace; white-space: pre-wrap; }
.callout { display: flex; gap: 10px; margin-bottom: 16px; padding: 13px 15px; color: #536159; background: #eef5f0; border-left: 4px solid var(--brand); border-radius: 8px; }
.callout.warning { background: #fff8e8; border-left-color: #d38a1b; }
.modal-layer { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 22px; background: rgba(15,29,20,.52); }
.modal { width: min(720px,100%); max-height: min(860px,90vh); overflow-y: auto; background: #fff; border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.24); }
.modal-head { min-height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; color: var(--ink); font-size: 18px; }
.modal-close { width: 38px; height: 38px; display: grid; place-items: center; color: var(--muted); background: #f3f6f4; border: 0; border-radius: 9px; font-size: 22px; }
.modal-body { padding: 22px; }
.poster-admin-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.poster-template-card { min-width:0; overflow:hidden; background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:0 8px 25px rgba(24,49,31,.045); }
.poster-card-preview { position:relative; overflow:hidden; aspect-ratio:3/4; background:#edf3ef; }
.poster-card-preview>img { width:100%; height:100%; display:block; object-fit:cover; }
.poster-qr-marker { position:absolute; z-index:2; aspect-ratio:1; display:grid; place-items:center; color:#18743e; background:rgba(255,255,255,.94); border:2px dashed #1c984d; border-radius:9px; font-size:clamp(8px,1vw,12px); font-style:normal; font-weight:800; box-shadow:0 4px 12px rgba(13,87,43,.12); }
.poster-state { position:absolute; top:12px; right:12px; min-height:28px; display:inline-flex; align-items:center; padding:0 10px; color:#fff; border-radius:99px; font-size:12px; font-weight:700; box-shadow:0 5px 14px rgba(0,0,0,.16); }
.poster-state.online { background:#168447; }
.poster-state.offline { background:#66716a; }
.poster-card-body { display:grid; gap:15px; padding:18px; }
.poster-card-body h3 { margin:0; color:var(--ink); font-size:17px; }
.poster-card-body p { min-height:42px; margin:5px 0 0; color:var(--muted); font-size:13px; line-height:1.6; }
.poster-card-body dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0; padding:12px; background:#f5f8f6; border-radius:10px; }
.poster-card-body dl div { min-width:0; }
.poster-card-body dt { color:var(--muted); font-size:11px; }
.poster-card-body dd { margin:4px 0 0; overflow:hidden; color:var(--ink); font-size:12px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.poster-empty { min-height:280px; display:grid; align-content:center; line-height:1.8; }
.poster-editor-layout { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:24px; align-items:start; }
.poster-editor-form .poster-form-fields { min-width:0; }
.poster-live-preview { position:sticky; top:0; display:grid; gap:9px; }
.poster-live-preview>span { color:var(--ink); font-size:13px; font-weight:700; }
.poster-live-preview .poster-card-preview { border:1px solid var(--line); border-radius:13px; box-shadow:0 9px 24px rgba(24,49,31,.08); }
.poster-live-empty { height:100%; display:grid; place-items:center; color:var(--muted); text-align:center; line-height:1.7; }
.poster-editor-actions { margin-top:12px; padding-top:18px; border-top:1px solid var(--line); }
.poster-editor-form input[type="file"] { padding:8px; }
.poster-editor-form input[type="file"]::file-selector-button { min-height:34px; margin-right:10px; padding:0 13px; color:var(--brand-strong); background:var(--brand-soft); border:0; border-radius:7px; font-weight:700; cursor:pointer; }
.poster-editor-form button:disabled { opacity:.55; cursor:wait; }
@media(max-width:1100px){.metrics{grid-template-columns:repeat(2,1fr)}.admin-app{grid-template-columns:214px minmax(0,1fr)}}
@media(max-width:1180px){.poster-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:780px){.login-screen{grid-template-columns:1fr}.login-art{display:none}.admin-app{display:block}.sidebar{position:relative;height:auto}.nav-list{grid-template-columns:repeat(2,1fr)}.topbar{position:relative;padding:0 18px}.content{padding:22px 16px 42px}.metrics,.grid-2,.field-row,.form-grid,.poster-admin-grid,.poster-editor-layout{grid-template-columns:1fr}.page-head{flex-direction:column}.form-grid .wide{grid-column:auto}.poster-live-preview{position:relative;width:min(280px,100%);margin:0 auto}}
