:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: rgba(255, 255, 255, 0.82);
    --text: #0f172a;
    --text-soft: #475569;
    --line: #dbe4f0;
    --line-strong: #c7d5e6;
    --primary: #2563eb;
    --primary-strong: #1d4ed8;
    --primary-soft: rgba(37, 99, 235, 0.12);
    --success: #16a34a;
    --success-soft: rgba(22, 163, 74, 0.14);
    --warning: #d97706;
    --warning-soft: rgba(217, 119, 6, 0.14);
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.12);
    --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 28px 64px rgba(15, 23, 42, 0.14);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 30px;
    --container: 1180px;
    --topbar-height: 82px;
    --transition: 180ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 22%), radial-gradient(circle at top right, rgba(29, 78, 216, 0.08), transparent 24%), linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
    line-height: 1.55;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

main {
    padding: 36px 0 64px;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

/* Topbar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(12px);
    background: rgba(248, 251, 255, 0.88);
    border-bottom: 1px solid rgba(203, 213, 225, 0.70);
}

.topbar-admin {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: rgba(51, 65, 85, 0.60);
}

.topbar-inner {
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 14px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    min-width: 0;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
    flex: 0 0 auto;
}

.brand strong {
    display: block;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.2;
}

.brand small {
    display: block;
    color: var(--text-soft);
    font-size: 0.85rem;
    margin-top: 3px;
}

.topbar-admin .brand strong,
.topbar-admin .topbar-link,
.topbar-admin .topbar-link-button {
    color: #f8fafc;
}

.topbar-admin .brand small {
    color: rgba(226, 232, 240, 0.78);
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    border: 1px solid transparent;
    transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

    .topbar-link:hover,
    .topbar-link:focus-visible {
        background: rgba(15, 23, 42, 0.05);
        border-color: rgba(148, 163, 184, 0.28);
        outline: none;
        transform: translateY(-1px);
    }

.topbar-link-button {
    background: transparent;
    cursor: pointer;
}

.inline-form {
    margin: 0;
}

/* Layout helpers */

.page-shell,
.landing-shell,
.stack-xl,
.stack-lg {
    display: flex;
    flex-direction: column;
}

.page-shell {
    gap: 24px;
}

.landing-shell {
    gap: 28px;
}

.stack-xl {
    gap: 24px;
}

.stack-lg {
    gap: 18px;
}

.mt {
    margin-top: 16px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 16px;
}

.mt-4 {
    margin-top: 24px;
}

.mt-xl {
    margin-top: 32px;
}

.right {
    text-align: right;
}

.muted,
.form-help,
.text-secondary {
    color: var(--text-soft);
}

.text-danger,
.err {
    color: var(--danger);
}

.strong {
    font-weight: 800;
}

.small {
    font-size: 0.9rem;
}

/* Headings */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.10);
    color: var(--primary-strong);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    width: fit-content;
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

    .section-heading.compact {
        margin-bottom: 14px;
    }

    .section-heading h1,
    .section-heading h2,
    .section-heading h3,
    .hero-card h1,
    .hero-card h2,
    .panel-card h2,
    .panel-card h3,
    .bolao-card h3 {
        margin: 0;
        line-height: 1.15;
    }

    .section-heading p,
    .hero-card p,
    .panel-card p,
    .bolao-card p {
        margin: 0;
        color: var(--text-soft);
    }

/* Hero */

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 28px;
    padding: 34px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.92)), #fff;
    border: 1px solid rgba(203, 213, 225, 0.75);
    box-shadow: var(--shadow-md);
}

    .hero-card > div {
        min-width: 0;
    }

.hero-home,
.user-hero,
.payment-hero,
.admin-hero {
    position: relative;
    overflow: hidden;
}

    .hero-home::after,
    .user-hero::after,
    .payment-hero::after,
    .admin-hero::after {
        content: "";
        position: absolute;
        inset: auto -60px -80px auto;
        width: 260px;
        height: 260px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(37, 99, 235, 0.10), transparent 68%);
        pointer-events: none;
    }

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
}

    .hero-copy h1,
    .hero-card h1 {
        font-size: clamp(2rem, 4vw, 3.15rem);
        font-weight: 900;
        letter-spacing: -0.03em;
    }

.hero-form-card,
.auth-panel,
.qr-panel {
    border: 1px solid rgba(203, 213, 225, 0.75);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
}

.hero-form-card {
    padding: 26px;
    align-self: stretch;
}

.hero-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-content: start;
}

.kpi-card,
.stat {
    padding: 20px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

    .kpi-card span,
    .stat-label {
        display: block;
        color: var(--text-soft);
        font-weight: 700;
        font-size: 0.88rem;
    }

    .kpi-card strong,
    .stat-value {
        display: block;
        margin-top: 8px;
        font-size: 1.8rem;
        font-weight: 900;
        color: var(--text);
    }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.grid-2,
.form-grid-2,
.col-md-4 {
    display: grid;
    gap: 18px;
}

.grid-2,
.form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.col-md-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Panels & cards */

.panel-card,
.card,
.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
    box-shadow: var(--shadow-sm);
}

.panel-card,
.panel {
    padding: 24px;
}

.card {
    padding: 20px;
}

.compact-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.bolao-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.bolao-card-approved {
    border-color: rgba(22, 163, 74, 0.28);
    background: linear-gradient(180deg, rgba(22, 163, 74, 0.04), rgba(255, 255, 255, 0.96));
}

.bolao-card-pending {
    border-color: rgba(217, 119, 6, 0.28);
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.04), rgba(255, 255, 255, 0.96));
}

.bolao-card-head,
.header-row,
.row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.bolao-card-body,
.info-chip-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.empty-state,
.table-empty,
.small-empty {
    padding: 18px;
    border-radius: 16px;
    border: 1px dashed var(--line-strong);
    background: rgba(248, 250, 252, 0.86);
    color: var(--text-soft);
}

.small-empty {
    padding: 14px 16px;
}

/* Chips, pills, alerts */

.info-chip,
.badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    width: fit-content;
}

    .info-chip-success,
    .badge.ok,
    .status-pill-success {
        background: var(--success-soft);
        border-color: rgba(22, 163, 74, 0.24);
        color: #166534;
    }

.status-pill-warning,
.warn {
    background: var(--warning-soft);
    border-color: rgba(217, 119, 6, 0.24);
    color: #92400e;
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-weight: 700;
}

.alert-error {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.20);
}

.alert-success {
    color: #166534;
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.20);
}

/* Buttons */

.actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.actions-row-start {
    justify-content: flex-start;
}

.actions-row-end {
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), border-color var(--transition), color var(--transition);
}

    .btn:hover,
    .btn:focus-visible {
        transform: translateY(-1px);
        outline: none;
    }

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.20);
}

    .btn-primary:hover,
    .btn-primary:focus-visible {
        box-shadow: 0 18px 36px rgba(37, 99, 235, 0.24);
    }

.btn-secondary,
.btn-outline-secondary {
    color: var(--primary-strong);
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(37, 99, 235, 0.22);
}

.btn-ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(148, 163, 184, 0.22);
}

.btn-danger-soft {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.16);
}

.btn-block {
    width: 100%;
}

.btn-eye {
    min-width: 46px;
    padding: 0;
}

/* Forms */

.form-grid {
    display: grid;
    gap: 18px;
}

.col,
.field-span-2 {
    min-width: 0;
}

.field-span-2 {
    grid-column: 1 / -1;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .field-group label,
    .form-label {
        color: var(--text);
        font-weight: 800;
        font-size: 0.95rem;
    }

.field-check,
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
}

    input:focus,
    select:focus,
    textarea:focus {
        outline: none;
        border-color: rgba(37, 99, 235, 0.55);
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    }

.password-wrap {
    position: relative;
}

.form-text {
    color: var(--text-soft);
    font-size: 0.9rem;
}

/* Tables */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
}

.table,
.table-premium {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

    .table th,
    .table td,
    .table-premium th,
    .table-premium td {
        padding: 14px 16px;
        text-align: left;
        border-bottom: 1px solid var(--line);
        vertical-align: middle;
    }

    .table th,
    .table-premium th {
        color: var(--text-soft);
        font-size: 0.84rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        background: rgba(248, 250, 252, 0.96);
    }

    .table tr:last-child td,
    .table-premium tr:last-child td {
        border-bottom: 0;
    }

/* Payment */

.payment-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    gap: 22px;
    align-items: start;
}

.qr-panel {
    min-height: 100%;
    padding: 20px;
    display: grid;
    place-items: center;
}

.qr-image {
    width: min(100%, 260px);
    height: auto;
    border-radius: 18px;
    background: #fff;
    padding: 10px;
    border: 1px solid var(--line);
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
}

/* Existing lottery/result components preserved */

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

    .tab.active {
        background: rgba(37, 99, 235, 0.12);
        border-color: rgba(37, 99, 235, 0.28);
        color: var(--primary-strong);
    }

.draw-input {
    width: 120px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid var(--line);
    background: #fff;
}

.chip-draw {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.20);
}

.chip-hit {
    background: rgba(22, 163, 74, 0.14);
    border-color: rgba(22, 163, 74, 0.32);
    color: #166534;
}

.chip-miss {
    background: #fff;
    color: var(--text);
}

.entries {
    display: grid;
    gap: 14px;
}

.entry {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.78);
}

.entry-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.lotteries {
    display: grid;
    gap: 18px;
}

.lottery-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    overflow: hidden;
}

.lottery-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.lottery-title {
    font-size: 1.05rem;
    font-weight: 800;
}

.lottery-body {
    padding: 20px;
}

.sub {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sub-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
}

.receipt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: #fff;
}

.receipt-meta .title {
    font-weight: 700;
}

.receipt-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.balls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ball {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.16);
}

.kv {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

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

.k {
    color: var(--text-soft);
    font-weight: 700;
}

.v {
    color: var(--text);
    font-weight: 700;
}

/* Responsive */

@media (max-width: 1100px) {
    .hero-card,
    .payment-grid,
    .cards-grid,
    .grid-2,
    .form-grid-2,
    .col-md-4 {
        grid-template-columns: 1fr;
    }

    .hero-kpis {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    main {
        padding: 24px 0 48px;
    }

    .container {
        width: min(100% - 20px, var(--container));
    }

    .hero-card,
    .panel-card,
    .panel,
    .card,
    .hero-form-card {
        padding: 20px;
    }

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

    .topbar-nav {
        width: 100%;
    }

    .compact-bar,
    .header-row,
    .row {
        flex-direction: column;
        align-items: stretch;
    }

    .actions-row,
    .actions-row-start,
    .actions-row-end {
        justify-content: stretch;
    }

        .actions-row .btn,
        .actions-row a.btn,
        .actions-row button.btn {
            width: 100%;
        }

    .kv {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

@media (max-width: 540px) {
    .brand {
        align-items: flex-start;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .hero-copy h1,
    .hero-card h1 {
        font-size: 1.8rem;
    }

    .table,
    .table-premium {
        min-width: 640px;
    }
}


/* Admin and auth layout fixes */
.form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid {
    display: grid;
    gap: 18px;
}

.soft {
    background: rgba(255, 255, 255, 0.86);
}

.title {
    margin: 0;
    font-size: 1.9rem;
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-weight: 800;
    width: fit-content;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
    gap: 24px;
    align-items: stretch;
}

.auth-shell-admin {
    margin-top: 8px;
}

.auth-panel-brand,
.auth-panel-form {
    padding: 28px;
}

.auth-panel-brand {
    display: flex;
    flex-direction: column;
    gap: 22px;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(29, 78, 216, 0.08), rgba(255, 255, 255, 0.96));
}

.auth-feature-list {
    display: grid;
    gap: 12px;
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-left,
.nav-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page-shell > *,
.grid-2 > *,
.cards-grid > *,
.form-grid > * {
    min-width: 0;
}

.hero-card.admin-hero {
    align-items: center;
}

.panel-card > .table-wrap:last-child {
    margin-top: 8px;
}

.table-premium td .actions-row {
    justify-content: flex-end;
}

.table-premium td .inline-form {
    display: inline-flex;
}

@media (max-width: 1100px) {
    .form-grid-3,
    .auth-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .nav-row,
    .nav-left,
    .nav-form {
        align-items: stretch;
        flex-direction: column;
    }
}


.admin-edit-layout {
    display: grid;
    gap: 18px;
}

.compact-section {
    gap: 14px;
}

.compact-grid {
    gap: 14px;
}

.table-compact-admin {
    min-width: 620px;
}

.lottery-row-editor {
    display: grid;
    gap: 10px;
}

.lottery-row-editor-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1.6fr) repeat(2, minmax(100px, 0.7fr));
    gap: 10px;
}

.compact-check {
    align-items: flex-start;
}

.entry-actions {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
}

.entry-actions-end {
    justify-content: flex-end;
}

.entry-extra-list {
    display: grid;
    gap: 6px;
}

.field-span-3 {
    grid-column: span 3;
}

#entry-editor {
    scroll-margin-top: 110px;
}

@media (max-width: 1100px) {
    .lottery-row-editor-grid,
    .field-span-3 {
        grid-template-columns: 1fr;
    }

    .field-span-3 {
        grid-column: span 1;
    }
}


/* 2026-03 UI refinement patch */
.info-chip-row,
.entry-extra-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cards-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card {
    padding: 22px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
}

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.shortcut-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 132px;
    padding: 20px;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.shortcut-card strong {
    font-size: 1rem;
}

.shortcut-card span {
    color: var(--text-soft);
}

.shortcut-card:hover,
.shortcut-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.22);
    outline: none;
}

.admin-edit-layout-xl {
    gap: 22px;
}

.lottery-row-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(120px, 0.4fr));
    gap: 10px;
}

.entry-actions,
.entry-actions-end {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.entry-actions-end {
    justify-content: flex-end;
}

.table-compact-admin td,
.table-compact-admin th {
    white-space: normal;
}

.trevo-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.trevo-chip {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), background-color var(--transition), color var(--transition);
}

.trevo-chip:hover,
.trevo-chip:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.32);
    outline: none;
}

.trevo-chip.is-selected {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.compact-check {
    align-items: center;
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
}

.checkbox-inline input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    border-radius: 6px;
    accent-color: var(--primary);
    box-shadow: none;
}

.checkbox-inline span {
    font-weight: 700;
    color: var(--text);
}

.admin-lotteries-grid {
    align-items: start;
}

@media (max-width: 1100px) {
    .cards-grid-2,
    .shortcut-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .lottery-row-editor-grid {
        grid-template-columns: 1fr;
    }
}


.hero-home {
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
}

.hero-home .hero-copy {
    gap: 20px;
}

.hero-home .hero-copy p {
    max-width: 62ch;
    font-size: 1.04rem;
}

.hero-home .hero-form-card {
    position: relative;
}

.hero-home .hero-form-card::before {
    content: "Acesso rápido";
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bolao-card-head,
.bolao-card-body {
    width: 100%;
}

.bolao-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.entry-head-between {
    justify-content: space-between;
    align-items: center;
}

.entry-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.entry-meta-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.82);
}

.dashboard-band {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
}

.dashboard-panel-dark {
    color: #e2e8f0;
    background: linear-gradient(135deg, #0f172a, #111827);
    border-color: rgba(51, 65, 85, 0.9);
}

.dashboard-panel-dark h2,
.dashboard-panel-dark p,
.dashboard-panel-dark .stat-label,
.dashboard-panel-dark .shortcut-card span,
.dashboard-panel-dark .small-empty {
    color: rgba(226, 232, 240, 0.82);
}

.dashboard-panel-dark .stat-card,
.dashboard-panel-dark .shortcut-card,
.dashboard-panel-dark .small-empty {
    background: rgba(15, 23, 42, 0.52);
    border-color: rgba(100, 116, 139, 0.32);
    box-shadow: none;
}

.dashboard-panel-dark .shortcut-card strong,
.dashboard-panel-dark .stat-value {
    color: #f8fafc;
}

@media (max-width: 1100px) {
    .dashboard-band,
    .entry-meta-grid {
        grid-template-columns: 1fr;
    }
}

/* Password security flows */
.narrow-shell {
    max-width: 760px;
    margin: 0 auto;
}

.security-card {
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: var(--shadow-md);
}

.password-checklist {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.compact-checklist {
    margin-top: 12px;
}

.check-item {
    position: relative;
    padding-left: 28px;
    color: var(--text-soft);
    font-weight: 600;
}

.check-item::before {
    content: "•";
    position: absolute;
    left: 8px;
    top: 0;
    color: var(--text-soft);
}

.check-item.ok {
    color: var(--success);
}

.check-item.ok::before {
    content: "✔";
    color: var(--success);
}

.check-item.fail {
    color: var(--danger);
}

.check-item.fail::before {
    content: "✖";
    color: var(--danger);
}

.password-status {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-weight: 700;
}

.password-status.valid {
    background: var(--success-soft);
    color: var(--success);
}

.password-status.invalid {
    background: var(--danger-soft);
    color: var(--danger);
}


.alert-info {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.10);
    border-color: rgba(37, 99, 235, 0.20);
}

.site-footer {
    margin-top: 28px;
    border-top: 1px solid rgba(203, 213, 225, 0.85);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
}

.site-footer-inner,
.site-footer-bottom {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 0;
    flex-wrap: wrap;
}

.site-footer-main {
    max-width: 720px;
}

.site-footer-main strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.site-footer-main p,
.site-footer-bottom {
    color: var(--text-soft);
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer-links a,
.legal-note a,
.legal-copy a {
    color: var(--primary-strong);
    font-weight: 700;
    text-decoration: none;
}

.site-footer-links a:hover,
.legal-note a:hover,
.legal-copy a:hover,
.site-footer-links a:focus-visible,
.legal-note a:focus-visible,
.legal-copy a:focus-visible {
    text-decoration: underline;
    outline: none;
}

.site-footer-bottom {
    padding-top: 0;
    border-top: 1px solid rgba(219, 228, 240, 0.75);
    font-size: 0.92rem;
}

.legal-note {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(219, 228, 240, 0.92);
    background: rgba(248, 250, 252, 0.78);
    color: var(--text-soft);
}

.legal-copy h2 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.legal-copy p {
    margin: 0;
}

.legal-copy section {
    display: grid;
    gap: 8px;
}

.card-section-soft {
    padding: 18px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.82);
}

@media (max-width: 860px) {
    .site-footer-inner,
    .site-footer-bottom {
        flex-direction: column;
    }
}


.countdown-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.countdown-box .countdown-value {
    font-weight: 800;
}

.countdown-expired {
    border-color: rgba(217, 119, 6, 0.28);
    background: rgba(217, 119, 6, 0.08);
}
