.admin-mode {
    background:
        radial-gradient(circle at top right, rgba(253, 118, 1, 0.18), transparent 30%),
        linear-gradient(180deg, #012830 0%, #013d47 100%);
    color: var(--color-white);
}

.admin-login-mode #main-content {
    opacity: 1;
    visibility: visible;
}

.admin-login-mode .footer-actions,
.admin-login-mode .fab-whatsapp-wrapper,
.admin-login-mode #fab-whatsapp,
.admin-login-mode #audio-toggle {
    display: none !important;
}

.admin-shell {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 48px 0 80px;
}

.admin-container {
    max-width: 1280px;
}

.admin-topbar,
.admin-card-header,
.admin-modal-header,
.admin-filter-actions,
.admin-modal-actions,
.admin-login-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--color-orange);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.admin-title,
.admin-card h2,
.admin-modal-card h2 {
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1.1;
}

.admin-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 8px;
}

.admin-subtitle {
    max-width: 760px;
    color: var(--color-text-muted);
}

.admin-stats-grid,
.admin-summary-list,
.admin-form-grid {
    display: grid;
    gap: 18px;
}

.admin-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 28px 0 22px;
}

.admin-stat-card,
.admin-summary-card,
.admin-card,
.admin-modal-card {
    background: rgba(22, 14, 25, 0.78);
    border: 1px solid rgba(253, 118, 1, 0.18);
    border-radius: 24px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.3);
}

.admin-stat-card,
.admin-summary-card,
.admin-card {
    padding: 24px;
}

.admin-stat-label {
    display: block;
    margin-bottom: 10px;
    color: var(--color-text-dimmed);
    font-size: 0.95rem;
}

.admin-stat-value {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.9rem);
    color: var(--color-orange);
}

.admin-summary-card {
    margin-bottom: 22px;
}

.admin-summary-card h2 {
    margin-bottom: 16px;
}

.admin-summary-list {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.admin-summary-list span {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text-muted);
}

.admin-card + .admin-card {
    margin-top: 22px;
}

.admin-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
}

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

.admin-form-group-full {
    grid-column: 1 / -1;
}

.admin-form-group label,
.admin-checkbox span {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-offwhite);
}

.admin-form-group input:not([type="checkbox"]),
.admin-form-group select {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.28);
    color: var(--color-white);
    font-size: 1rem;
}

.admin-form-group input:not([type="checkbox"]):focus,
.admin-form-group select:focus {
    outline: none;
    border-color: rgba(253, 118, 1, 0.8);
    box-shadow: 0 0 0 3px rgba(253, 118, 1, 0.16);
}

.admin-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    width: auto;
    max-width: fit-content;
}

.admin-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    flex: 0 0 auto;
}

.admin-filter-actions,
.admin-login-actions,
.admin-modal-actions {
    margin-top: 20px;
}

.admin-filter-actions {
    justify-content: flex-start;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 20px;
    border: none;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.admin-btn:hover {
    transform: translateY(-2px);
}

.admin-btn-primary {
    background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-orange-light) 100%);
    color: var(--color-white);
    box-shadow: 0 10px 26px rgba(253, 118, 1, 0.28);
}

.admin-btn-secondary,
.admin-btn-inline {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-btn-danger {
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.32);
}

.admin-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 16px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table th {
    color: var(--color-orange);
    font-family: var(--font-heading);
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.admin-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(253, 118, 1, 0.1);
    color: #ffd9b0;
    font-size: 0.88rem;
    font-weight: 700;
}

.admin-status-pill-ok {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.admin-status-pill-pendente {
    background: rgba(107, 114, 128, 0.12);
    color: #cbd5e1;
    border: 1px solid rgba(107, 114, 128, 0.25);
}

.admin-empty-state {
    padding: 28px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text-muted);
    margin-top: 20px;
}

.admin-feedback {
    margin: 0 0 22px;
    padding: 16px 18px;
    border-radius: 16px;
    font-weight: 700;
}

.admin-feedback.sucesso {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #a7f3d0;
}

.admin-feedback.info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #bfdbfe;
}

.admin-feedback.erro {
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.42);
    color: #fecaca;
}

.admin-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    background: rgba(1, 11, 16, 0.78);
    backdrop-filter: blur(8px);
    z-index: 999999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-modal-overlay.is-open {
    display: flex;
}

.admin-modal-card {
    width: min(760px, 100%);
    padding: 28px;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-login-card {
    width: min(520px, 100%);
}

.admin-login-text,
.admin-delete-text {
    color: var(--color-text-muted);
    margin-top: 12px;
}

.admin-modal-close {
    color: var(--color-white);
    font-size: 2rem;
    line-height: 1;
}

.admin-edit-form,
.admin-login-form {
    margin-top: 18px;
}

.admin-pix-section {
    margin-top: 28px;
    padding: 22px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(50, 188, 173, 0.12) 0%, rgba(50, 188, 173, 0.04) 100%);
    border: 1px solid rgba(50, 188, 173, 0.25);
    position: relative;
    overflow: hidden;
}

.admin-pix-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #32bcad 0%, #00d2a8 100%);
}

.admin-pix-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
}

.admin-pix-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #32bcad 0%, #00d2a8 100%);
    color: #ffffff;
    font-size: 1.2rem;
    box-shadow: 0 8px 18px rgba(50, 188, 173, 0.28);
    flex-shrink: 0;
}

.admin-pix-section-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    color: var(--color-white);
}

.admin-pix-section .admin-kicker {
    margin-bottom: 4px;
    color: #32bcad;
}

.admin-pix-section .admin-form-grid {
    margin-top: 16px;
}

.admin-pix-section input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
    cursor: pointer;
}

.admin-money-input {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    color: #32bcad;
}

input[data-admin-money-input="1"] {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-white);
    letter-spacing: 0.02em;
}

@media (max-width: 900px) {
    .admin-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .admin-shell {
        padding-top: 28px;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-table thead {
        display: none;
    }

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

    .admin-table tr {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.04);
    }

    .admin-table td {
        padding: 10px 0;
        border-bottom: none;
    }

    .admin-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--color-orange);
        font-family: var(--font-heading);
        font-size: 0.78rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .admin-modal-card {
        padding: 22px 18px;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 20px;
    }

    .admin-modal-overlay {
        align-items: flex-start;
        padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .admin-edit-form,
    .admin-login-form {
        padding-bottom: 4px;
    }

    .admin-login-actions,
    .admin-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-modal-actions {
        position: sticky;
        bottom: 0;
        background: rgba(22, 14, 25, 0.96);
        padding-top: 12px;
        padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
        margin-top: 16px;
    }

    .admin-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-filter-actions .admin-btn,
    .admin-login-actions .admin-btn,
    .admin-modal-actions .admin-btn,
    .admin-modal-actions form,
    .admin-modal-actions form .admin-btn {
        width: 100%;
    }
}

/* ==========================================================================
   MENU SANDUÍCHE DA ÁREA ADMINISTRATIVA
   ========================================================================== */
.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-menu-wrapper {
    position: relative;
}

.admin-menu-toggle {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.admin-menu-toggle,
.admin-menu-toggle * {
    pointer-events: auto;
}

.admin-menu-icon {
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 300px;
    background: rgba(22, 14, 25, 0.98);
    border: 1px solid rgba(253, 118, 1, 0.22);
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.admin-menu-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--color-white);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-menu-item:hover {
    background: rgba(253, 118, 1, 0.14);
    color: var(--color-orange-light);
}

.admin-menu-item.is-active {
    background: rgba(253, 118, 1, 0.2);
    color: var(--color-orange);
}

.admin-menu-item-icon {
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    flex: 0 0 28px;
}

.admin-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 4px;
}

@media (max-width: 768px) {
    .admin-menu-dropdown {
        min-width: unset;
        width: min(88vw, 420px);
        left: 0;
        right: auto;
        top: calc(100% + 8px);
    }

    .admin-menu-wrapper {
        position: relative;
        z-index: 50;
    }

    .admin-topbar {
        overflow: visible;
    }

    .admin-topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-shell {
        overflow-anchor: none;
    }
}

@media (max-width: 480px) {
    .admin-menu-dropdown {
        width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);
        left: 0;
        right: auto;
    }

    .admin-menu-item {
        padding: 14px 14px;
        font-size: 1rem;
        min-height: 44px;
    }
}
