:root {
    --premium-bg: #f7f7f4;
    --premium-surface: #ffffff;
    --premium-ink: #1d1d1b;
    --premium-muted: #62645f;
    --premium-line: #e5e1d7;
    --premium-gold: #b9903f;
    --premium-green: #174f43;
    --premium-danger: #9f2d2f;
    --premium-shadow: 0 18px 50px rgba(29, 29, 27, 0.08);
}

html {
    min-width: 320px;
}

body {
    background:
        radial-gradient(circle at top left, rgba(185, 144, 63, 0.08), transparent 34rem),
        linear-gradient(180deg, #ffffff 0%, var(--premium-bg) 100%) !important;
    color: var(--premium-ink);
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    color: var(--premium-green);
}

a:hover {
    color: var(--premium-gold);
}

.main-content,
.main-container {
    width: 100%;
}

.logo {
    filter: drop-shadow(0 16px 30px rgba(29, 29, 27, 0.13));
}

.navbar,
.card,
.login-box,
.modal-content,
.tab-content.card,
.status-votacao,
.alert {
    border: 1px solid var(--premium-line) !important;
    border-radius: 8px !important;
    box-shadow: var(--premium-shadow) !important;
}

.navbar,
.card,
.login-box,
.modal-content,
.tab-content.card {
    background: rgba(255, 255, 255, 0.94) !important;
}

.navbar {
    padding: 0.75rem 1rem;
}

.nav-link {
    color: var(--premium-muted);
    font-weight: 600;
}

.nav-link:hover,
.nav-tabs .nav-link.active {
    color: var(--premium-green) !important;
}

.nav-tabs {
    gap: 0.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    border-bottom-color: var(--premium-line);
    scrollbar-width: thin;
    background:
        linear-gradient(90deg, rgba(247, 247, 244, 1), rgba(247, 247, 244, 0)) left center / 1.25rem 100% no-repeat,
        linear-gradient(270deg, rgba(247, 247, 244, 1), rgba(247, 247, 244, 0)) right center / 1.25rem 100% no-repeat;
}

.nav-tabs .nav-link {
    white-space: nowrap;
    border-radius: 8px 8px 0 0;
}

.btn {
    border-radius: 7px;
    font-weight: 700;
}

.btn-primary,
.btn-success {
    background: var(--premium-green) !important;
    border-color: var(--premium-green) !important;
}

.btn-primary:hover,
.btn-success:hover {
    background: #103b32 !important;
    border-color: #103b32 !important;
}

.btn-info {
    background: #eef4f1 !important;
    border-color: #cbded8 !important;
    color: var(--premium-green) !important;
}

.btn-danger {
    background: var(--premium-danger) !important;
    border-color: var(--premium-danger) !important;
}

.btn-secondary {
    background: #343733 !important;
    border-color: #343733 !important;
}

.table {
    vertical-align: middle;
    min-width: 640px;
}

.table thead th {
    background: #f2f2ee;
    color: var(--premium-muted);
    font-size: 0.78rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.action-cell {
    min-width: 15rem;
    white-space: normal;
}

.action-cell .btn {
    margin: 0.15rem;
}

.img-thumbnail-small,
.jurado-info img,
.jurado-foto,
.candidata-foto,
.candidata-img {
    background: #ffffff;
    border-color: var(--premium-line) !important;
}

.candidata-foto,
.candidata-img {
    box-shadow: 0 18px 50px rgba(29, 29, 27, 0.14) !important;
}

.form-control {
    border-color: #d8d4ca;
    border-radius: 7px;
    min-height: 2.75rem;
}

.form-control:focus {
    border-color: var(--premium-gold);
    box-shadow: 0 0 0 0.2rem rgba(185, 144, 63, 0.18);
}

.metric-box {
    min-height: 6rem;
    padding: 1rem;
    border: 1px solid var(--premium-line);
    border-radius: 8px;
    background: #fff;
}

.metric-box span {
    display: block;
    color: var(--premium-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.metric-box strong {
    display: block;
    margin-top: 0.35rem;
    color: var(--premium-green);
    font-size: 1.4rem;
}

footer {
    border-top: 1px solid var(--premium-line);
    background: rgba(255, 255, 255, 0.78) !important;
}

@media (max-width: 768px) {
    .main-content.container,
    .main-content.container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    header.user-info {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 0.75rem;
    }

    header.user-info .text-end {
        text-align: left !important;
        width: 100%;
    }

    .tab-content.card {
        padding: 1rem !important;
    }

    .table-responsive {
        border: 1px solid var(--premium-line);
        border-radius: 8px;
    }

    .table-responsive .table {
        min-width: 0;
    }

    .table-responsive .table thead {
        display: none;
    }

    .table-responsive .table,
    .table-responsive .table tbody,
    .table-responsive .table tr,
    .table-responsive .table td {
        display: block;
        width: 100%;
    }

    .table-responsive .table tr {
        padding: 0.75rem;
        border-bottom: 1px solid var(--premium-line);
    }

    .table-responsive .table td {
        border: 0;
        padding: 0.35rem 0;
    }

    .action-cell {
        min-width: 12rem;
    }
}
