* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f7fb;
    color: #172033;
}

a {
    color: inherit;
}

.topbar {
    background: #0f766e;
    color: white;
    padding: 18px 24px;
}

.topbar-inner {
    max-width: 1100px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: white;
    text-decoration: none;
}

.main-nav,
.nav-links {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav a,
.nav-links a {
    color: white;
    font-weight: 700;
    text-decoration: none;
    opacity: .85;
}

.main-nav a:hover,
.main-nav a.active,
.nav-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.user-box {
    color: white;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.user-box a {
    color: white;
    text-decoration: underline;
}

.container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card {
    background: white;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.card h2,
.card h3 {
    margin-top: 0;
}

.form-row {
    margin-bottom: 14px;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

input,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d6dde8;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 15px;
}

select {
    max-width: 220px;
}

button {
    border: 0;
    border-radius: 12px;
    background: #0f766e;
    color: white;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

button:hover {
    background: #115e59;
}

.summary {
    display: grid;
    gap: 12px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eef2f7;
    padding: 10px 0;
}

.result {
    margin-top: 15px;
    padding: 12px;
    background: #f1f5f9;
    border-radius: 10px;
    font-size: 14px;
}

.big-total {
    margin-top: 10px;
    padding: 16px;
    border-radius: 14px;
    background: #dcfce7;
    color: #166534;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.danger {
    background: #fef2f2;
    color: #991b1b;
}

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

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

th,
td {
    padding: 12px;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
}

th {
    color: #64748b;
    font-size: 13px;
    text-transform: uppercase;
}

/* Auth pages */

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, .25), transparent 35%),
        linear-gradient(135deg, #0f172a, #020617);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: white;
    color: #172033;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.brand {
    font-size: 24px;
    font-weight: 900;
    color: #0f766e;
    margin-bottom: 20px;
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 32px;
}

.muted {
    color: #64748b;
    margin-bottom: 24px;
}

.auth-card label {
    margin-top: 14px;
}

.auth-card input {
    margin-bottom: 14px;
}

.auth-card button {
    width: 100%;
    margin-top: 10px;
}

.alert {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #64748b;
}

.auth-link a {
    color: #0f766e;
    font-weight: 800;
    text-decoration: none;
}

/* Responsive */

@media (max-width: 800px) {
    .grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 600px) {
    .topbar {
        padding: 16px;
    }

    .nav-links,
    .main-nav {
        width: 100%;
        gap: 10px;
        font-size: 14px;
    }

    .nav-links a {
        background: rgba(255, 255, 255, 0.14);
        padding: 8px 10px;
        border-radius: 10px;
        font-size: 14px;
    }

    .user-box {
        width: 100%;
        font-size: 13px;
    }

    .container {
        margin: 18px auto;
        padding: 0 12px;
    }

    .card {
        padding: 18px;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px;
        border-radius: 20px;
    }

    .auth-card h1 {
        font-size: 28px;
    }
}
button {
    transition: all .2s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}