:root {
    --white: #ffffff;
    --yellow: #f2b12d;
    --yellow-dark: #dd9b17;
    --black: #14161c;
    --black-soft: #1e2129;
    --text-dark: #1a1d24;
    --text-muted: #606674;
    --line: #cfd3dc;
    --error-bg: #fff1f1;
    --error-line: #d57c7c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    background: var(--white);
    color: var(--text-dark);
}

.auth-page,
.dashboard-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.hero-block {
    position: relative;
    background: var(--yellow);
    border-bottom: 2px solid var(--black);
    padding-bottom: 34px;
    overflow: hidden;
}

.hero-block::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: min(280px, 34vw);
    height: 100%;
    background: linear-gradient(130deg, #252935 0%, #101319 100%);
    border-top-right-radius: 130px 85px;
    border-bottom-right-radius: 130px 85px;
}

.hero-block::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 22px solid var(--white);
    background: var(--black-soft);
}

.simple-header {
    position: relative;
    z-index: 2;
    height: 74px;
    padding: 0 clamp(16px, 4vw, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    color: var(--white);
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.badge {
    border: 1px solid var(--black);
    background: rgba(255, 255, 255, 0.5);
    color: var(--black);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(900px, 92vw);
    margin: 30px auto 0;
    padding-left: clamp(120px, 16vw, 200px);
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: 0.02em;
}

.hero-content p {
    margin: 10px 0 0;
    font-size: 18px;
    color: rgba(20, 22, 28, 0.9);
}

.auth-main,
.dashboard-main {
    background: #f8f8f8;
    padding: 44px 0 52px;
}

.auth-card,
.dashboard-card,
.module-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.auth-card {
    width: min(520px, 92vw);
    margin: 0 auto;
    padding: 28px;
}

.auth-card h1,
.dashboard-card h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.08;
}

.subtitle,
.dashboard-card p,
.module-card p {
    margin: 10px 0 0;
    color: var(--text-muted);
    line-height: 1.45;
}

.auth-form {
    display: grid;
    margin-top: 20px;
    gap: 10px;
}

.auth-form label {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    height: 44px;
    border: 1px solid #b5bbc8;
    border-radius: 10px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 15px;
    padding: 0 12px;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(242, 177, 45, 0.22);
}

.auth-form button,
.logout-button {
    border: 0;
    border-radius: 999px;
    background: var(--yellow);
    color: var(--black);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.auth-form button {
    margin-top: 12px;
    height: 44px;
    font-size: 14px;
}

.logout-button {
    height: 38px;
    padding: 0 18px;
    font-size: 13px;
}

.auth-form button:hover,
.logout-button:hover {
    background: var(--yellow-dark);
}

.form-error {
    border: 1px solid var(--error-line);
    background: var(--error-bg);
    border-radius: 10px;
    padding: 10px 12px;
}

.form-error p {
    margin: 0;
    color: #882727;
    font-size: 14px;
}

.dashboard-main {
    padding-inline: clamp(14px, 4vw, 48px);
}

.dashboard-card {
    padding: 26px;
    border-left: 6px solid var(--yellow);
}

.dashboard-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
}

.stats-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 12px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-card span {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
}

.stat-card strong {
    font-size: 22px;
    line-height: 1;
}

.stat-card-wide {
    grid-column: span 2;
    border-left: 5px solid var(--yellow);
}

.reports-layout {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 14px;
}

.report-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
}

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

.report-head h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

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

.report-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.report-table th,
.report-table td {
    padding: 9px 8px;
    border-bottom: 1px solid #e9ecf3;
    text-align: left;
    font-size: 13px;
}

.report-table th {
    color: var(--text-muted);
    font-weight: 600;
}

.report-table td {
    color: var(--text-dark);
}

.value-positive {
    color: #17733f;
    font-weight: 700;
}

.value-negative {
    color: #ba2d2d;
    font-weight: 700;
}

.empty-text {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.deadline-list,
.event-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.deadline-list li,
.event-list li {
    border: 1px solid #ecedf1;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.deadline-list li strong,
.event-list li strong {
    display: block;
    font-size: 14px;
}

.deadline-list li span,
.event-list li span,
.event-list li small {
    color: var(--text-muted);
    font-size: 12px;
}

.event-list li {
    display: grid;
    justify-content: normal;
    gap: 3px;
}

.deadline-overdue,
.deadline-soon,
.deadline-ok {
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.deadline-overdue {
    color: #b52121;
    background: #ffe9e9;
}

.deadline-soon {
    color: #9b6100;
    background: #fff2d5;
}

.deadline-ok {
    color: #1c6e37;
    background: #e8f8ef;
}

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

.module-card h2 {
    margin: 0;
    font-size: 20px;
}

.module-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--yellow);
    color: var(--text-dark);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.module-link:hover {
    background: #fff5dc;
}

.site-footer {
    background: var(--black);
    color: var(--white);
    padding: 24px clamp(14px, 4vw, 48px) 30px;
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 20px;
    margin-top: auto;
}

.site-footer h3 {
    margin: 0 0 8px;
    color: #ffcf6f;
    font-size: 14px;
    font-weight: 600;
}

.site-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
}

@media (max-width: 860px) {
    .hero-content {
        padding-left: clamp(14px, 4vw, 26px);
    }

    .hero-block::before,
    .hero-block::after {
        opacity: 0.22;
    }

    .brand {
        color: var(--black);
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .stat-card-wide {
        grid-column: span 2;
    }

    .reports-layout {
        grid-template-columns: 1fr;
    }
}
