* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f5f6f8;
    color: #16181d;
    font-family: Arial, sans-serif;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}

.card {
    background: white;
    border: 1px solid #e3e5e8;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 20px;
}

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

.dashboard-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

h1 {
    margin-top: 0;
    font-size: 32px;
}

h2 {
    margin-top: 0;
}

input {
    display: block;
    width: 100%;
    padding: 14px;
    margin: 12px 0;
    border: 1px solid #ccd0d5;
    border-radius: 10px;
    font-size: 16px;
}

button {
    width: 100%;
    padding: 14px 18px;
    margin-top: 10px;
    border: 0;
    border-radius: 10px;
    background: #005bff;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    opacity: .9;
}

button.secondary {
    width: auto;
    background: #e8ebef;
    color: #16181d;
}

.message {
    min-height: 22px;
    margin-top: 12px;
    font-size: 14px;
}

.hint,
.muted,
.empty {
    color: #6d737c;
}

.hint {
    font-size: 13px;
}

.account {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #eceef1;
}

.account:last-child {
    border-bottom: 0;
}

.status {
    background: #e8f7ed;
    padding: 7px 10px;
    border-radius: 20px;
    font-size: 13px;
}

[hidden] {
    display: none !important;
}

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

    .dashboard-head {
        align-items: flex-start;
        gap: 20px;
    }

    h1 {
        font-size: 27px;
    }
}

/* Dashboard analytics */

.analytics-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.analytics-toolbar h2 {
    margin-bottom: 4px;
}

.analytics-toolbar p {
    margin: 0;
}

#periodSelect {
    min-width: 130px;
    padding: 11px 14px;
    border: 1px solid #ccd0d5;
    border-radius: 10px;
    background: white;
    font-size: 15px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.metric-card {
    min-height: 135px;
    padding: 20px;
    background: white;
    border: 1px solid #e3e5e8;
    border-radius: 16px;
}

.metric-card span {
    display: block;
    margin-bottom: 14px;
    color: #6d737c;
    font-size: 14px;
}

.metric-card strong {
    display: block;
    font-size: 28px;
    line-height: 1.15;
}

.metric-card small {
    display: block;
    min-height: 16px;
    margin-top: 10px;
    color: #6d737c;
}

.change-positive {
    color: #16883e !important;
}

.change-negative {
    color: #c83232 !important;
}

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

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

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

    #periodSelect {
        width: 100%;
    }
}
