/* OliveGiving Admin — chrome on top of the brand tokens in styles.css. */
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Geist', system-ui, sans-serif; background: var(--cream, #FFF8F1); color: var(--ink-900, #1c1430); }

.admin-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

.admin-side { background: var(--purple-700, #391D66); color: #fff; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; }
.admin-side .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.admin-side .brand img { width: 30px; height: 30px; }
.admin-side .brand .wm { font-weight: 600; font-size: 18px; }
.admin-side .brand .wm em { color: var(--olive-200, #D6E458); font-style: normal; }
.admin-side a { color: rgba(255,255,255,.78); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-size: 14px; display: flex; justify-content: space-between; }
.admin-side a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-side a.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 500; }
.admin-side .side-foot { margin-top: auto; font-size: 12px; color: rgba(255,255,255,.5); }

/* min-width:0 lets the 1fr column shrink so wide content (log tails, big tables)
   scrolls inside its own box instead of stretching the page horizontally. */
.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px; border-bottom: 1px solid rgba(0,0,0,.08); background: #fff; }
.admin-top h1 { font-size: 20px; margin: 0; }
.admin-user { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.admin-user .av { width: 34px; height: 34px; border-radius: 50%; background: var(--purple-300, #9C89CF); color: #fff; display: grid; place-items: center; font-weight: 600; }
.admin-body { padding: 28px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.tile { background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 14px; padding: 18px; }
.tile .k { font-size: 12px; color: var(--ink-500, #6b6480); text-transform: uppercase; letter-spacing: .04em; }
.tile .v { font-size: 30px; font-weight: 600; margin-top: 6px; font-family: 'Geist Mono', monospace; }
.tile .s { font-size: 12px; color: var(--ink-500, #6b6480); margin-top: 2px; }

.panel { background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 14px; padding: 20px; margin-bottom: 24px; }
.panel h2 { font-size: 16px; margin: 0 0 14px; }

table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-500, #6b6480); padding: 8px 10px; border-bottom: 1px solid rgba(0,0,0,.08); }
table.grid td { padding: 10px; border-bottom: 1px solid rgba(0,0,0,.05); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: none; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.pill.ok { background: #e7f3d6; color: #4d6b16; }
.pill.warn { background: #fde9c8; color: #8a5a12; }
.pill.bad { background: #fbdcdc; color: #8a1f1f; }

.btn-a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--purple-700, #391D66); background: var(--purple-700, #391D66); color: #fff; font-size: 13px; cursor: pointer; text-decoration: none; }
.btn-a.ghost { background: transparent; color: var(--purple-700, #391D66); }
.btn-a.sm { padding: 5px 10px; font-size: 12px; }
.btn-a.danger { border-color: #8a1f1f; background: #8a1f1f; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid label { font-size: 13px; display: block; }
.form-grid input, .form-grid select { width: 100%; padding: 9px 11px; border: 1px solid rgba(0,0,0,.15); border-radius: 9px; margin-top: 4px; font-family: inherit; }
.full { grid-column: 1 / -1; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--purple-700, #391D66); }
.login-card { background: #fff; border-radius: 18px; padding: 34px; width: 380px; max-width: 92vw; }
.login-card h1 { font-size: 22px; margin: 0 0 4px; }
.login-card .sub { color: var(--ink-500, #6b6480); font-size: 13px; margin-bottom: 20px; }
.login-card .err { background: #fbdcdc; color: #8a1f1f; padding: 10px 12px; border-radius: 9px; font-size: 13px; margin-bottom: 14px; }
pre.tail { background: #160f28; color: #d7cff0; padding: 16px; border-radius: 12px; font-size: 12px; overflow: auto; max-height: 420px; font-family: 'Geist Mono', monospace; }

/* ── Pastel dashboard tiles (light backgrounds, dark text) ── */
.tile.t-lilac { background: #F1ECFB; border-color: #E4DAF6; }
.tile.t-mint  { background: #E9F6EC; border-color: #D6EBDB; }
.tile.t-peach { background: #FDEEE3; border-color: #F6DFCF; }
.tile.t-sky   { background: #E7F1FB; border-color: #D5E5F6; }
.tile.t-lilac .k, .tile.t-mint .k, .tile.t-peach .k, .tile.t-sky .k { color: #5b5570; }
.tile .v { color: #1c1430; }

/* ── Chart panels ── */
.chart-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 1000px) { .chart-row { grid-template-columns: 1fr; } }
.chart-panel { background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 14px; padding: 18px 20px; }
.chart-panel h2 { font-size: 15px; margin: 0 0 4px; }
.chart-panel .hint { font-size: 12px; color: var(--ink-500, #6b6480); margin-bottom: 8px; }

/* ── DataTables theming to match the admin chrome ── */
table.dataTable { width: 100% !important; border-collapse: collapse; font-size: 14px; }
table.dataTable thead th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-500, #6b6480); border-bottom: 1px solid rgba(0,0,0,.10); padding: 8px 10px; }
table.dataTable tbody td { padding: 10px; border-bottom: 1px solid rgba(0,0,0,.05); }
table.dataTable tbody tr.odd  > * { box-shadow: none !important; }
table.dataTable tbody tr:nth-child(odd)  { background: #ffffff; }
table.dataTable tbody tr:nth-child(even) { background: #faf8fc; }
.dt-buttons .dt-button { background: #fff; border: 1px solid rgba(0,0,0,.15); color: var(--purple-700, #391D66); border-radius: 8px; padding: 5px 11px; font-size: 12px; margin-right: 6px; cursor: pointer; }
.dt-buttons .dt-button:hover { background: #f4f0fa; }
.dt-container .dt-search input, .dt-container .dt-length select { border: 1px solid rgba(0,0,0,.15); border-radius: 8px; padding: 5px 9px; font-family: inherit; }
div.dt-container div.dt-paging button.dt-paging-button.current,
div.dt-container div.dt-paging button.dt-paging-button.current:hover,
div.dt-container div.dt-paging a.dt-paging-button.current,
div.dt-container div.dt-paging a.dt-paging-button.current:hover {
    background: var(--purple-700, #391D66) !important;
    border-color: var(--purple-700, #391D66) !important;
    color: #fff !important;
    border-radius: 8px;
}
.dt-container { margin-top: 6px; }
.dt-container .dt-info, .dt-container .dt-length, .dt-container .dt-search { font-size: 12px; color: var(--ink-500, #6b6480); }

/* ── Panel header row (title + action button) ── */
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,12,40,.5); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 60; overflow: auto; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 16px; padding: 24px 26px; width: 680px; max-width: 100%; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-close { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-500, #6b6480); }

/* ── Profile layout ── */
.profile-hero { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: stretch; margin-bottom: 24px; }
@media (max-width: 900px) { .profile-hero { grid-template-columns: 1fr; } }
.profile-cover { border-radius: 14px; overflow: hidden; min-height: 200px; position: relative; }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-meta .row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-500, #6b6480); margin-bottom: 8px; }
.profile-progress { height: 10px; border-radius: 999px; background: #ece7f4; overflow: hidden; margin: 12px 0 6px; }
.profile-progress > span { display: block; height: 100%; background: var(--olive-500, #89972A); }
