* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --yellow: #ffe600;
    --blue: #3483fa;
    --blue-dark: #2968c8;
    --text: #333;
    --muted: #777;
    --border: #e5e5e5;
    --bg: #ebebeb;
    --white: #fff;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: var(--blue);
    text-decoration: none;
}

.top-strip {
    height: 70px;
    background: var(--yellow);
}

.login-header,
.main-header {
    background: var(--yellow);
}

.login-header {
    padding: 14px 24px 24px;
}

.main-header {
    padding: 16px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.header-inner,
.login-header .brand,
.dashboard {
    max-width: 1180px;
    margin: 0 auto;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #2d3277;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 22px;
    box-shadow: 0 6px 16px rgba(45, 50, 119, .18);
}

.brand strong {
    display: block;
    font-size: 18px;
    letter-spacing: -.3px;
}

.brand span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: rgba(0,0,0,.58);
}

.login-body {
    min-height: 100vh;
    background: linear-gradient(to bottom, var(--yellow) 0 220px, var(--bg) 220px 100%);
}

.login-wrap {
    min-height: calc(100vh - 108px);
    display: flex;
    justify-content: center;
    padding: 42px 20px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--white);
    border-radius: 12px;
    padding: 34px;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    align-self: flex-start;
}

.login-badge {
    display: inline-block;
    margin-bottom: 16px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff7cc;
    color: #8a7200;
    font-size: 11px;
    font-weight: 700;
}

.login-card h1 {
    font-size: 26px;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 26px;
    line-height: 1.5;
}

form {
    display: grid;
    gap: 10px;
}

label {
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    height: 48px;
    border: 1px solid #bfbfbf;
    border-radius: 6px;
    padding: 0 14px;
    font-size: 15px;
    outline: none;
    margin-bottom: 8px;
}

input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(52,131,250,.12);
}

button {
    border: 0;
    cursor: pointer;
}

form button,
.primary-action {
    background: var(--blue);
    color: #fff;
    border-radius: 6px;
    font-weight: 700;
}

form button {
    height: 48px;
    font-size: 15px;
    margin-top: 6px;
}

form button:hover,
.primary-action:hover {
    background: var(--blue-dark);
}

.alert {
    background: #fff0f0;
    border: 1px solid #ffd0d0;
    color: #b42318;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
}

.demo-box {
    margin-top: 24px;
    padding: 14px;
    border-radius: 8px;
    background: #f5f5f5;
    display: grid;
    gap: 4px;
    font-size: 13px;
}

.demo-box strong {
    margin-bottom: 3px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

.logout {
    padding: 9px 14px;
    border-radius: 6px;
    background: rgba(255,255,255,.7);
    color: #333;
    font-weight: 700;
}

.dashboard {
    padding: 28px 20px 48px;
}

.hero {
    background: linear-gradient(135deg, #2d3277, #3483fa);
    color: #fff;
    border-radius: 14px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 8px 24px rgba(45,50,119,.16);
}

.hero-tag {
    font-size: 11px;
    font-weight: 700;
    opacity: .8;
}

.hero h1 {
    margin: 8px 0;
    font-size: 30px;
}

.hero p {
    color: rgba(255,255,255,.82);
}

.primary-action {
    padding: 14px 18px;
    white-space: nowrap;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.stat-card,
.panel-card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.stat-card {
    padding: 22px;
    border-top: 4px solid var(--yellow);
}

.stat-title {
    font-size: 13px;
    color: var(--muted);
}

.stat-card strong {
    display: block;
    font-size: 25px;
    margin: 12px 0 7px;
}

.stat-card small {
    color: #7d7d7d;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.panel-card {
    padding: 22px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.panel-head h2 {
    font-size: 18px;
}

.panel-head a {
    font-size: 13px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 13px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

th {
    color: #777;
    font-size: 12px;
}

.status {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.status.paid {
    background: #e8f8ef;
    color: #1f7a45;
}

.status.pending {
    background: #fff7df;
    color: #8a6500;
}

.status.sent {
    background: #eaf3ff;
    color: #276bc4;
}

.quick-card {
    display: flex;
    flex-direction: column;
}

.quick-card .panel-head {
    margin-bottom: 8px;
}

.quick-card > a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
}

@media (max-width: 850px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .login-card {
        padding: 24px 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .header-inner {
        align-items: flex-start;
    }

    .header-actions span {
        display: none;
    }

    .hero h1 {
        font-size: 24px;
    }
}
