/* SharePay admin — functional baseline styling; will be redesigned later. */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f3f4f6;
    color: #1f2430;
    font-size: 14px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111827;
    color: #ffffff;
    padding: 12px 24px;
}
.brand { color: #ffffff; text-decoration: none; font-weight: 800; font-size: 16px; }
.brand span { font-weight: 400; color: #9ca3af; font-size: 13px; }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a { color: #d1d5db; text-decoration: none; font-size: 13px; }
.topbar nav a:hover { color: #ffffff; }
.inline { display: inline; }
.linklike { background: none; border: none; color: #d1d5db; cursor: pointer; font-size: 13px; }
.linklike:hover { color: #ffffff; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
.footer { text-align: center; color: #9ca3af; font-size: 12px; padding: 16px; }

h1 { font-size: 20px; margin-bottom: 16px; }
h2 { font-size: 15px; margin-bottom: 12px; }
.mono-h { font-family: ui-monospace, Consolas, monospace; font-size: 16px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.muted { color: #6b7280; }
.small { font-size: 12px; }
.num { text-align: right; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.stat {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
}
.stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; color: #6b7280; text-transform: uppercase; }
.stat-value { font-size: 22px; font-weight: 800; margin-top: 4px; }
.stat-sub { font-size: 12px; color: #9ca3af; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters select, .filters input[type="text"] {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    font-size: 13px;
}
.filters input[type="text"] { min-width: 240px; }

.btn {
    display: inline-block;
    padding: 8px 16px;
    background: #4f46e5;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover { background: #4338ca; }
.btn-ghost { background: transparent; color: #4f46e5; border: 1px solid #c7d2fe; }
.btn-ghost:hover { background: #eef2ff; }
.btn-small { padding: 6px 12px; font-size: 12px; }

.table-wrap { overflow-x: auto; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f1f3; white-space: nowrap; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: #6b7280; background: #fafafa; }
tbody tr:hover { background: #f9fafb; }
td.empty { text-align: center; color: #9ca3af; padding: 28px; }

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.badge-ok { background: #dcfce7; color: #15803d; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-err { background: #fee2e2; color: #b91c1c; }
.badge-live { background: #dbeafe; color: #1d4ed8; }
.badge-test { background: #fef3c7; color: #92400e; }
.badge-muted { background: #f3f4f6; color: #6b7280; }

.detail-link { color: #4f46e5; text-decoration: none; font-weight: 600; }
.detail-link:hover { text-decoration: underline; }

.pagination { display: flex; gap: 6px; margin: 16px 0; flex-wrap: wrap; }
.pagination a {
    padding: 6px 11px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    font-size: 13px;
    background: #ffffff;
}
.pagination a.current { background: #4f46e5; color: #ffffff; border-color: #4f46e5; }

.panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.panel-head h2 { margin-bottom: 0; }

.detail-grid { display: grid; grid-template-columns: 180px 1fr; row-gap: 10px; }
.detail-grid dt { color: #6b7280; font-size: 13px; }
.detail-grid dd { font-size: 13.5px; word-break: break-all; }

.raw {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
}

.alert {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 360px;
}
.login-card h1 { margin-bottom: 4px; }
.login-card .muted { margin-bottom: 20px; }
.login-card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.login-card input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}
.login-card .btn { width: 100%; }
