* {
    box-sizing: border-box;
}

:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-hover: #f9fafb;

    --text: #17202a;
    --text-light: #6b7280;

    --border: #e5e7eb;

    --primary: #198754;
    --primary-hover: #157347;

    --danger: #dc3545;

    --radius: 14px;

    --shadow:
        0 4px 18px rgba(0, 0, 0, 0.06);
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}


/* LOGIN */

.login-body {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--surface);

    padding: 36px;

    border-radius: 20px;

    box-shadow: var(--shadow);
}

.login-logo {
    display: flex;
    justify-content: center;

    margin-bottom: 20px;
}

.logo-icon {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: var(--primary);
    color: #fff;

    font-size: 28px;
    font-weight: 800;
}

.login-card h1 {
    margin: 0;

    text-align: center;

    font-size: 25px;
}

.login-subtitle {
    text-align: center;
    color: var(--text-light);

    margin: 8px 0 28px;
}


/* FORMS */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    font-weight: 600;
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;

    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #fff;

    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(25, 135, 84, 0.12);
}


/* BUTTONS */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 42px;

    border: none;
    border-radius: 10px;

    padding: 10px 18px;

    cursor: pointer;

    font-weight: 700;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-block {
    width: 100%;
}


/* ALERTS */

.alert {
    padding: 12px 14px;

    margin-bottom: 18px;

    border-radius: 10px;

    font-size: 14px;
}

.alert-danger {
    color: #842029;
    background: #f8d7da;
}


/* TOPBAR */

.topbar {
    min-height: 64px;

    padding: 0 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: var(--surface);

    border-bottom: 1px solid var(--border);
}

.topbar-user {
    display: flex;
    align-items: center;

    gap: 12px;
}

.badge {
    padding: 5px 9px;

    background: #e9f5ee;
    color: var(--primary);

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;

    text-transform: capitalize;
}

.logout-link {
    color: var(--danger);
    font-weight: 600;
    font-size: 14px;
}


/* PAGE */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 32px 0 24px;
}

.page-header h1 {
    margin: 0 0 5px;

    font-size: 27px;
}

.page-header p {
    margin: 0;

    color: var(--text-light);
}


/* DASHBOARD */

.dashboard-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;
}

.stat-card {
    display: flex;
    flex-direction: column;

    padding: 20px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    transition: 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);

    box-shadow: var(--shadow);
}

.stat-title {
    color: var(--text-light);

    font-size: 14px;
    font-weight: 600;
}

.stat-value {
    margin: 10px 0 4px;

    font-size: 30px;
}

.stat-value.money {
    font-size: 24px;
}

.stat-description {
    color: var(--text-light);

    font-size: 13px;
}


/* MENU */

.menu-section {
    margin: 34px 0;
}

.menu-section h2 {
    margin-bottom: 15px;

    font-size: 19px;
}

.menu-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px;
}

.menu-card {
    min-height: 110px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    gap: 7px;

    padding: 18px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    transition: 0.15s ease;
}

.menu-card:hover {
    border-color: #b9dcca;

    transform: translateY(-2px);

    box-shadow: var(--shadow);
}

.menu-card strong {
    font-size: 16px;
}

.menu-card span {
    color: var(--text-light);

    font-size: 13px;

    line-height: 1.5;
}


/* RESPONSIVO */

@media (max-width: 900px) {

    .dashboard-grid,
    .menu-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {

    .container {
        width: min(100% - 22px, 1200px);
    }

    .topbar {
        padding: 0 14px;
    }

    .topbar-user > span:first-child {
        display: none;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-header .btn {
        width: 100%;
    }

    .dashboard-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 28px 22px;
    }
}