:root {
    --admin-bg: #050505;
    --admin-panel: #141414;
    --admin-panel-soft: #101010;
    --admin-border: rgba(200, 161, 74, 0.28);
    --admin-gold: #c8a14a;
    --admin-text: #f7f7f7;
    --admin-muted: #bfc5cf;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    background: linear-gradient(180deg, #111 0%, #050505 100%);
    color: var(--admin-text);
}

main.container,
main.container-fluid {
    width: min(100%, 1120px);
}

.box {
    background: var(--admin-panel);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
}

.form-label,
label {
    color: #e6e6e6;
    font-size: 0.9rem;
}

.form-control,
.form-select,
.form-check-input {
    min-height: 40px;
}

.btn {
    border-radius: 8px;
    font-weight: 600;
}

.btn-sm {
    border-radius: 7px;
}

.table-responsive {
    border-radius: 10px;
}

.table {
    font-size: 0.9rem;
}

.table .form-control,
.table .form-select {
    min-height: 34px;
}

.table .btn-sm {
    min-height: 32px;
}

.indicador {
    min-height: 100%;
}

.alert {
    border-radius: 10px;
}

.admin-page-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.admin-page-header h1 {
    margin-bottom: 0;
}

.admin-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
    margin-left: auto;
}

.admin-page-actions .btn {
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    body {
        background: var(--admin-bg);
    }

    main.container,
    main.container-fluid {
        padding: 0.65rem 0.45rem 1rem !important;
    }

    main > .d-flex:first-child,
    .admin-page-header {
        align-items: stretch !important;
        gap: 0.5rem !important;
        margin-bottom: 0.6rem !important;
    }

    main > .d-flex:first-child h1,
    .admin-page-header h1 {
        font-size: 1rem;
        line-height: 1.15;
    }

    main > .d-flex:first-child > div:last-child,
    .admin-page-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem !important;
        margin-left: 0;
        width: 100%;
    }

    main > .d-flex:first-child > div:last-child .btn,
    .admin-page-actions .btn {
        font-size: 0.72rem;
        line-height: 1.15;
        padding: 0.34rem 0.4rem;
        white-space: normal;
    }

    .box {
        border-radius: 10px;
        padding: 0.65rem !important;
    }

    .box.p-3,
    section.box.p-3,
    div.box.p-3 {
        padding: 0.65rem !important;
    }

    .box.p-4,
    section.box.p-4,
    div.box.p-4 {
        padding: 0.75rem !important;
    }

    .mb-3 {
        margin-bottom: 0.65rem !important;
    }

    h2.h6,
    .h6 {
        font-size: 0.86rem;
        margin-bottom: 0.45rem !important;
    }

    .row {
        --bs-gutter-x: 0.45rem;
        --bs-gutter-y: 0.45rem;
    }

    .form-label,
    label {
        font-size: 0.78rem;
        margin-bottom: 0.2rem !important;
    }

    .form-control,
    .form-select {
        font-size: 0.84rem;
        min-height: 36px;
        padding: 0.32rem 0.48rem;
    }

    textarea.form-control {
        min-height: 70px;
    }

    .form-check {
        margin-bottom: 0;
    }

    .form-check-label {
        font-size: 0.8rem;
    }

    .form-check-input {
        min-height: 1rem;
        width: 1rem;
        height: 1rem;
    }

    .btn {
        font-size: 0.78rem;
        min-height: 34px;
        padding: 0.34rem 0.55rem;
    }

    .btn-sm {
        font-size: 0.7rem;
        min-height: 30px;
        padding: 0.24rem 0.42rem;
    }

    .d-flex.gap-2,
    .d-flex.gap-3 {
        gap: 0.4rem !important;
    }

    .indicador {
        border-radius: 8px;
        padding: 0.5rem !important;
    }

    .indicador .titulo {
        font-size: 0.72rem !important;
        line-height: 1.15;
    }

    .indicador .valor {
        font-size: 1rem !important;
        line-height: 1.15;
    }

    .table-responsive {
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 9px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        font-size: 0.78rem;
        margin-bottom: 0;
    }

    .table th,
    .table td {
        padding: 0.42rem 0.5rem;
        white-space: nowrap;
    }

    .table td input.form-control,
    .table td select.form-select {
        min-width: 120px;
        font-size: 0.76rem;
        min-height: 30px;
        padding: 0.22rem 0.35rem;
    }

    .table td .btn {
        font-size: 0.68rem;
        min-height: 28px;
        padding: 0.2rem 0.35rem;
    }

    .table .badge {
        font-size: 0.68rem;
    }

    .login-box {
        width: min(100%, calc(100vw - 0.9rem)) !important;
        border-width: 1px !important;
        padding: 0.85rem !important;
    }

    .login-box legend {
        font-size: 0.82rem;
        margin-bottom: 0.25rem;
    }

    .login-box .btn {
        font-size: 0.8rem;
        min-height: 34px;
        padding: 0.34rem 0.5rem;
    }

    .login-box hr {
        margin: 0.55rem 0;
    }
}
