html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
    font-family: "Segoe UI", Tahoma, sans-serif;
}
*,
*::before,
*::after {
    box-sizing: border-box;
}
body.srm-app-body,
body.srm-login-page {
    background: #f3f4f6;
    color: #0f172a;
}
.srm-app {
    --srm-sidebar: #0b1220;
    --srm-sidebar-2: #111827;
    --srm-green: #22c55e;
    --srm-green-dark: #16a34a;
    --srm-bg: #f3f4f6;
    --srm-card: #fff;
    --srm-text: #0f172a;
    --srm-muted: #64748b;
    --srm-danger: #dc2626;
    --srm-border: #e5e7eb;
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    font-size: 15px;
}
.srm-sidebar-overlay { display: none; }
.srm-sidebar {
    width: 260px;
    flex: 0 0 260px;
    background: var(--srm-sidebar);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.srm-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 18px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.srm-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #22c55e;
    color: #052e16;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: .04em;
    flex: 0 0 42px;
}
.srm-sidebar-brand strong { display: block; color: #fff; font-size: 15px; }
.srm-sidebar-brand span { display: block; color: #94a3b8; font-size: 12px; }
.srm-nav { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; }
.srm-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 10px;
    font-weight: 600;
}
.srm-nav-link:hover { background: rgba(34,197,94,.12); color: #fff; }
.srm-nav-link.is-active { background: #22c55e; color: #052e16; }
.srm-quick-add {
    margin: auto 12px 16px;
    padding: 14px 12px;
    background: #111827;
    border-radius: 12px;
}
.srm-quick-add p {
    margin: 0 0 10px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.srm-quick-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d1fae5;
    text-decoration: none;
    padding: 8px 6px;
    border-radius: 8px;
    font-weight: 600;
}
.srm-quick-link:hover { background: rgba(34,197,94,.16); color: #fff; }
.srm-plus {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #22c55e;
    color: #052e16;
    font-weight: 800;
}
.srm-sidebar-footer {
    padding: 0 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #94a3b8;
    font-size: 13px;
}
.srm-sidebar-footer a { color: #94a3b8; text-decoration: none; }
.srm-sidebar-footer a:hover { color: #22c55e; }
.srm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #f3f4f6; }
.srm-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}
.srm-hamburger {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 10px 11px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}
.srm-hamburger span { display: block; height: 2px; background: #0f172a; border-radius: 2px; }
.srm-admin-badge {
    display: inline-flex;
    background: #22c55e;
    color: #052e16;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: .08em;
    padding: 7px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.srm-page-title { margin: 0; font-size: 22px; font-weight: 800; flex: 1; min-width: 0; }
.srm-view-site {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid #22c55e;
    color: #16a34a;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    white-space: nowrap;
    background: #fff;
}
.srm-view-site:hover { background: #f0fdf4; color: #052e16; }
.srm-content { padding: 20px 24px 40px; width: 100%; max-width: 1180px; }
.srm-notice { border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; font-weight: 600; }
.srm-notice-success { background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; }
.srm-notice-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.srm-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    margin: 0 0 20px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.srm-card h2 { margin: 0 0 16px; font-size: 18px; }
.srm-card h3 { margin: 16px 0 8px; font-size: 15px; }
.srm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.srm-card-head h2 { margin: 0; }
.srm-muted { color: #64748b; margin: 0 0 12px; }
.srm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.srm-stats-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.srm-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.srm-stat-card span { display: block; color: #64748b; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.srm-stat-card strong { font-size: 28px; font-weight: 800; }
.srm-actions-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.srm-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 12px;
    background: #22c55e;
    color: #052e16;
    text-decoration: none;
    font-weight: 800;
    border-radius: 10px;
    text-align: center;
}
.srm-action-btn:hover { background: #16a34a; color: #fff; }
.srm-action-btn-dark { background: #0b1220; color: #fff; }
.srm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.srm-search { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; min-width: 0; }
.srm-search input,
.srm-search select,
.srm-card input[type=text],
.srm-card input[type=date],
.srm-card input[type=number],
.srm-card input[type=password],
.srm-card input[type=file],
.srm-card input[type=email],
.srm-login-form input,
.srm-card select {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 8px 12px;
    background: #fff;
    font-size: 15px;
}
.srm-search input,
.srm-search select { width: auto; min-width: 160px; flex: 1; }
.srm-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.srm-grid-4 { grid-template-columns: 1.3fr 1fr 1.2fr 1.2fr; }
.srm-card label,
.srm-login-form label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; }
.srm-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; margin: 12px 0 18px; font-weight: 500 !important; }
.srm-form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.srm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    background: #fff;
    color: #0f172a;
}
.srm-btn-primary { background: #22c55e; color: #052e16; }
.srm-btn-primary:hover { background: #16a34a; color: #fff; }
.srm-btn-secondary { border-color: #e5e7eb; }
.srm-btn-ghost { color: #64748b; }
.srm-btn-danger { color: #dc2626; border-color: #fecaca; }
.srm-btn-block { width: 100%; }
.srm-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.srm-table { width: 100%; border-collapse: collapse; }
.srm-table th, .srm-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #e5e7eb; vertical-align: middle; }
.srm-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.srm-actions { white-space: nowrap; display: flex; gap: 8px; flex-wrap: wrap; }
.srm-badge { display: inline-flex; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.srm-badge-success { background: #dcfce7; color: #166534; }
.srm-badge-muted { background: #f1f5f9; color: #475569; }
.srm-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.srm-page-link {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #0f172a;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
}
.srm-page-link.is-active, .srm-page-link:hover { background: #22c55e; border-color: #22c55e; color: #052e16; }
.srm-csv-help { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.srm-csv-help pre { background: #0b1220; color: #d1fae5; padding: 12px; border-radius: 8px; overflow-x: auto; }
.srm-error-list { margin: 0; padding-left: 18px; color: #991b1b; }
.srm-chart-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.srm-chart-cell { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 10px 8px; text-align: center; }
.srm-chart-cell strong { display: block; font-size: 20px; color: #166534; }
.srm-chart-cell span { display: block; font-size: 11px; color: #64748b; margin-top: 4px; }
.srm-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #0b1220;
}
.srm-login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.srm-login-brand { text-align: center; margin-bottom: 20px; }
.srm-login-brand .srm-brand-mark { margin: 0 auto 12px; }
.srm-login-brand h1 { margin: 0 0 6px; font-size: 22px; }
.srm-login-brand p { margin: 0; color: #64748b; }
.srm-login-form { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 1100px) {
    .srm-stats, .srm-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .srm-grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
    .srm-hamburger { display: inline-flex; }
    .srm-sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform .2s ease;
        box-shadow: 8px 0 30px rgba(0,0,0,.2);
    }
    body.srm-sidebar-open .srm-sidebar { transform: translateX(0); }
    .srm-sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(2,6,23,.55);
        z-index: 30;
    }
    body.srm-sidebar-open .srm-sidebar-overlay { display: block; }
    body.srm-sidebar-open { overflow: hidden; }
    .srm-topbar, .srm-content { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 782px) {
    .srm-page-title { font-size: 18px; }
    .srm-admin-badge { display: none; }
    .srm-stats, .srm-actions-grid, .srm-grid, .srm-grid-4, .srm-stats-compact { grid-template-columns: 1fr; }
    .srm-card { padding: 14px; }
    .srm-search, .srm-toolbar, .srm-form-actions, .srm-card-head { flex-direction: column; align-items: stretch; }
    .srm-content .srm-btn, .srm-content .srm-action-btn { width: 100%; }
    .srm-topbar { flex-wrap: wrap; }
    .srm-view-site { width: auto; margin-left: auto; }
    .srm-search input, .srm-search select, .srm-card input, .srm-card select, .srm-login-form input { font-size: 16px; min-height: 46px; width: 100%; min-width: 0; }
    .srm-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .srm-table, .srm-table tbody, .srm-table tr, .srm-table td { display: block; width: 100%; }
    .srm-table tr { border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 12px; padding: 6px 10px; }
    .srm-table td { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #f1f5f9; padding: 10px 0; white-space: normal; }
    .srm-table td:last-child { border-bottom: 0; }
    .srm-table td::before { content: attr(data-label); font-weight: 700; color: #64748b; flex: 0 0 86px; }
    .srm-actions { justify-content: flex-end; }
    .srm-actions .srm-btn { width: auto; }
}
