/* ==========================================================
   BuySystem - Global CSS (public/css/global.css)
   Arquivo estático — referenciado via asset() sem precisar
   de npm run build ou Vite.
   ========================================================== */

/* ----------------------------------------------------------
   1. RESET
   ---------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ----------------------------------------------------------
   2. DESIGN TOKENS
   ---------------------------------------------------------- */
:root {
    --clr-bg-primary: #f8f9fa;
    --clr-bg-secondary: #ffffff;
    --clr-bg-tertiary: #f1f3f5;
    --clr-surface: #ffffff;
    --clr-surface-hover: #f8f9fa;

    --clr-text-primary: #1a1a1c;
    --clr-text-secondary: #4a5568;
    --clr-text-muted: #718096;

    --clr-accent: #4a7dff;
    --clr-accent-hover: #3b6de8;
    --clr-accent-soft: rgba(74, 125, 255, 0.08);

    --clr-success: #10b981;
    --clr-warning: #f59e0b;
    --clr-danger: #ef4444;

    --clr-border: #e2e8f0;
    --clr-border-subtle: #f1f3f5;

    --font-primary: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --sidebar-width: 260px;
    --header-height: 68px;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----------------------------------------------------------
   3. BASE / BODY
   ---------------------------------------------------------- */
body {
    font-family: var(--font-primary);
    background: var(--clr-bg-primary);
    color: var(--clr-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ----------------------------------------------------------
   4. LAYOUT
   ---------------------------------------------------------- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ----------------------------------------------------------
   5. SIDEBAR
   ---------------------------------------------------------- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--clr-bg-secondary);
    border-right: 1px solid var(--clr-border-subtle);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-base);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--clr-border-subtle);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--clr-text-primary);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--clr-accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav-item {
    margin-bottom: 4px;
    animation: slideInLeft var(--transition-base) backwards;
}

.sidebar-nav-item:nth-child(1) {
    animation-delay: 50ms;
}

.sidebar-nav-item:nth-child(2) {
    animation-delay: 100ms;
}

.sidebar-nav-item:nth-child(3) {
    animation-delay: 150ms;
}

.sidebar-nav-item:nth-child(4) {
    animation-delay: 200ms;
}

.sidebar-nav-item:nth-child(5) {
    animation-delay: 250ms;
}

.sidebar-nav-item:nth-child(6) {
    animation-delay: 300ms;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--clr-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar-nav-link:hover {
    background: var(--clr-surface);
    color: var(--clr-text-primary);
}

.sidebar-nav-link.active {
    background: var(--clr-accent-soft);
    color: var(--clr-accent);
}

.sidebar-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--clr-accent);
    border-radius: 0 2px 2px 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--clr-border-subtle);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--clr-surface);
    border-radius: var(--radius-md);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--clr-accent), #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--clr-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 12px;
    color: var(--clr-text-muted);
    font-family: var(--font-mono);
}

/* Accordion */
.sidebar-nav-item-parent {
    margin-bottom: 4px;
}

.sidebar-nav-parent {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--clr-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    position: relative;
}

.sidebar-nav-parent:hover {
    background: var(--clr-surface);
    color: var(--clr-text-primary);
}

.sidebar-nav-parent.active {
    background: var(--clr-accent-soft);
    color: var(--clr-accent);
}

.sidebar-nav-parent-text {
    flex: 1;
}

.sidebar-nav-chevron {
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

.sidebar-nav-parent.open .sidebar-nav-chevron {
    transform: rotate(180deg);
}

.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
    margin-left: 12px;
    margin-top: 4px;
}

.sidebar-submenu.open {
    max-height: 1000px;
}

.sidebar-submenu-item {
    list-style: none;
    margin-bottom: 2px;
}

.sidebar-submenu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 10px 30px;
    color: var(--clr-text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar-submenu-link:hover {
    background: var(--clr-surface);
    color: var(--clr-text-primary);
}

.sidebar-submenu-link.active {
    background: var(--clr-accent-soft);
    color: var(--clr-accent);
}

.sidebar-submenu-link.active::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--clr-accent);
    border-radius: 50%;
}

/* Scrollbar */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--clr-surface);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--clr-surface-hover);
}

/* ----------------------------------------------------------
   6. MAIN CONTENT
   ---------------------------------------------------------- */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--clr-border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
}

.main-header-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

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

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    color: var(--clr-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-btn:hover {
    background: var(--clr-surface-hover);
    color: var(--clr-text-primary);
}

.main-content {
    flex: 1;
    padding: 32px;
}

/* Toggle (mobile) */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--clr-text-primary);
    margin-right: 16px;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--clr-surface-hover);
}

/* Sem evento no header — texto no desktop, só ícone no mobile */
a.header-select-evento,
.header-select-evento {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: #2563eb;
    color: #fff !important;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

/* Lucide vira <svg> — esconder no desktop junto com o <i> */
.header-select-evento__icon { display: none; }
.header-select-evento > svg { display: none; }
.header-select-evento .header-select-evento__text { white-space: nowrap; }

/* Overlay (mobile) */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    backdrop-filter: blur(2px);
    display: none;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ----------------------------------------------------------
   7. BOTÕES
   ---------------------------------------------------------- */
.btn-primary {
    padding: 12px 24px;
    background: var(--clr-accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--clr-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 125, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::before {
    width: 300px;
    height: 300px;
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    color: var(--clr-text-secondary);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--clr-surface-hover);
    color: var(--clr-text-primary);
    border-color: var(--clr-accent);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    font-family: var(--font-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--clr-border);
    background: transparent;
    color: var(--clr-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    min-width: fit-content;
}

.btn-sm:hover {
    background: var(--clr-surface);
    border-color: var(--clr-accent);
    color: var(--clr-accent);
}

.btn-danger {
    color: var(--clr-danger);
    border-color: var(--clr-danger);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #dc2626;
    color: #dc2626;
}

.btn-group {
    display: flex;
    gap: 8px;
}

/* ----------------------------------------------------------
   8. ALERTAS
   ---------------------------------------------------------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 24px;
    border: 1px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--clr-success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--clr-warning);
}

/* ----------------------------------------------------------
   9. TABELA
   ---------------------------------------------------------- */
.table-container {
    background: var(--clr-bg-secondary);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.table thead {
    background: var(--clr-bg-tertiary);
    border-bottom: 1px solid var(--clr-border);
}

.table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--clr-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--clr-border-subtle);
    color: var(--clr-text-primary);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: var(--clr-surface-hover);
}

/* ----------------------------------------------------------
   10. BADGE
   ---------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.badge-primary {
    background: var(--clr-accent-soft);
    color: var(--clr-accent);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--clr-success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--clr-danger);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--clr-warning);
}

/* ----------------------------------------------------------
   11. FORMULÁRIOS
   ---------------------------------------------------------- */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--clr-text-secondary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.form-input-wrapper {
    position: relative;
}

.form-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--clr-text-muted);
    pointer-events: none;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    color: var(--clr-text-primary);
    font-size: 15px;
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
}

.form-input.with-icon {
    padding-left: 44px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 3px rgba(74, 125, 255, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--clr-text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--clr-accent);
    cursor: pointer;
}

.form-checkbox-label {
    font-size: 14px;
    color: var(--clr-text-secondary);
    cursor: pointer;
    user-select: none;
}

.form-card {
    background: var(--clr-bg-secondary);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 800px;
    margin-bottom: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: var(--radius-md);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--clr-accent);
    cursor: pointer;
}

.checkbox-item label {
    font-size: 14px;
    color: var(--clr-text-primary);
    cursor: pointer;
}

.error-message {
    color: var(--clr-danger);
    font-size: 13px;
    margin-top: 4px;
}

.help-text {
    font-size: 13px;
    color: var(--clr-text-muted);
    margin-top: 4px;
}

.form-label-required::after {
    content: '*';
    color: var(--clr-danger);
    margin-left: 4px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.form-file-label {
    display: block;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px dashed var(--clr-border);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-file-label:hover {
    border-color: var(--clr-accent);
    background: rgba(74, 125, 255, 0.05);
}

.form-file-input {
    display: none;
}

.form-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #e9ecef;
}

/* ----------------------------------------------------------
   14. CARDS DE EVENTOS / GENÉRICOS
   ---------------------------------------------------------- */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.event-card {
    background: var(--clr-bg-secondary);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--clr-accent);
}

.event-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--clr-accent), #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-body {
    padding: 20px;
}

.event-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--clr-text-primary);
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--clr-text-secondary);
}

.event-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--clr-border-subtle);
}

/* ----------------------------------------------------------
   12. CABEÇALHO DE SEÇÃO
   ---------------------------------------------------------- */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.content-header h2,
.section-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.content-subtitle {
    color: var(--clr-text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* ----------------------------------------------------------
   13. EMPTY STATE
   ---------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--clr-text-muted);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.3;
}

/* ----------------------------------------------------------
   14. PAGINAÇÃO
   ---------------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    list-style: none;
}

.page-link {
    padding: 8px 12px;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    color: var(--clr-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.page-link:hover {
    background: var(--clr-surface);
    border-color: var(--clr-accent);
    color: var(--clr-accent);
}

.page-item.active .page-link {
    background: var(--clr-accent);
    border-color: var(--clr-accent);
    color: white;
}

/* ----------------------------------------------------------
   15. ANIMAÇÕES
   ---------------------------------------------------------- */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------------------------------------
   16. RESPONSIVIDADE
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .sidebar-overlay {
        display: block;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        min-width: 40px;
        min-height: 40px;
        background: var(--clr-surface);
        border: 1px solid var(--clr-border);
        border-radius: var(--radius-md);
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .main-content {
        padding: 20px 16px;
    }

    a.header-select-evento,
    .header-select-evento {
        padding: 10px;
        min-width: 40px;
        min-height: 40px;
    }

    a.header-select-evento .header-select-evento__text {
        display: none !important;
    }

    .header-select-evento__icon,
    .header-select-evento > svg {
        display: flex !important;
    }
}

/* ----------------------------------------------------------
   17. DASHBOARD E ESTATÍSTICAS
   ---------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--clr-bg-secondary);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.stat-card:nth-child(1) {
    animation-delay: 0ms;
}

.stat-card:nth-child(2) {
    animation-delay: 100ms;
}

.stat-card:nth-child(3) {
    animation-delay: 200ms;
}

.stat-card:nth-child(4) {
    animation-delay: 300ms;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card.blue {
    --accent-color: #4a7dff;
    --accent-bg: rgba(74, 125, 255, 0.2);
}

.stat-card.purple {
    --accent-color: #8b5cf6;
    --accent-bg: rgba(139, 92, 246, 0.2);
}

.stat-card.green {
    --accent-color: #10b981;
    --accent-bg: rgba(16, 185, 129, 0.2);
}

.stat-card.orange {
    --accent-color: #f59e0b;
    --accent-bg: rgba(245, 158, 11, 0.2);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--clr-text-muted);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    color: var(--accent-color);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--clr-text-primary);
    margin-bottom: 8px;
}

.stat-change {
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--clr-text-muted);
}

.recent-activity {
    background: var(--clr-bg-secondary);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.activity-item {
    padding: 20px 24px;
    border-bottom: 1px solid var(--clr-border-subtle);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: background var(--transition-fast);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: var(--clr-surface);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--clr-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--clr-text-primary);
    margin-bottom: 4px;
}

.activity-meta {
    font-size: 13px;
    color: var(--clr-text-muted);
    font-family: var(--font-mono);
}

.activity-time {
    font-size: 12px;
    color: var(--clr-text-muted);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.3;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.quick-action-btn {
    padding: 20px;
    background: var(--clr-bg-secondary);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    color: var(--clr-text-primary);
    text-decoration: none;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--clr-accent), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.quick-action-btn:hover {
    border-color: var(--clr-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-action-btn:hover::before {
    opacity: 0.05;
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    background: var(--clr-surface);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.quick-action-content {
    position: relative;
    z-index: 1;
}

.quick-action-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.quick-action-desc {
    font-size: 12px;
    color: var(--clr-text-muted);
}

/* ----------------------------------------------------------
   18. PÁGINA DE ATIVIDADES
   ---------------------------------------------------------- */
.activities-container {
    max-width: 900px;
}

.activities-container .activity-item {
    background: var(--clr-bg-secondary);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
    align-items: start;
    transition: all var(--transition-fast);
}

.activities-container .activity-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-color: var(--clr-accent);
}

.activities-container .activity-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activities-container .activity-icon.blue {
    background: rgba(74, 125, 255, 0.15);
    color: #4a7dff;
}

.activities-container .activity-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.activities-container .activity-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.activities-container .activity-icon.orange {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.activities-container .activity-content {
    flex: 1;
}

.activities-container .activity-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--clr-text-primary);
    margin-bottom: 4px;
}

.activities-container .activity-description {
    font-size: 14px;
    color: var(--clr-text-secondary);
    margin-bottom: 8px;
}

.activities-container .activity-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--clr-text-muted);
}

.activities-container .activity-user {
    display: flex;
    align-items: center;
    gap: 6px;
}

.activities-container .activity-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
}

.activities-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.activities-count {
    font-size: 14px;
    color: var(--clr-text-muted);
}

/* =========================
   TICKETS PAGE (tkt_pag)
========================= */

.tkt_pag table {
    width: 100%;
}

.tkt_pag td {
    padding: 12px 10px;
    vertical-align: middle;
}

/* TH mais premium */
.tkt_pag thead th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 600;
    padding-bottom: 12px;
}

/* texto principal */
.tkt_pag .tkt_main {
    font-weight: 500;
}

/* texto secundário */
.tkt_pag .tkt_sub {
    font-size: 12px;
    color: #94a3b8;
}

/* Código */
.tkt_pag .ticket-code {
    font-weight: 600;
    font-size: 14px;
}

/* ID menor */
.tkt_pag .ticket-id {
    font-size: 12px;
    color: #94a3b8;
}

/* Status */
.tkt_pag .status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* cores */
.tkt_pag .status-ativo {
    background: #dcfce7;
    color: #166534;
}

.tkt_pag .status-utilizado {
    background: #dbeafe;
    color: #1e40af;
}

.tkt_pag .status-cancelado {
    background: #fee2e2;
    color: #991b1b;
}

.tkt_pag .status-devolvido {
    background: #fef3c7;
    color: #92400e;
}

.tkt_pag .status-antifraude {
    background: #fde68a;
    color: #78350f;
}

.tkt_pag .status-bloqueado {
    background: #e5e7eb;
    color: #374151;
}

/* Botões */
.tkt_pag .btn-mini {
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    text-decoration: none;
    color: #334155;
    margin-right: 5px;
}

.tkt_pag .btn-mini.success {
    background: #dcfce7;
    color: #166534;
}

/* Hover leve */
.tkt_pag tbody tr:hover {
    background: #f8fafc;
    transition: 0.2s;
}

/* TOOLBAR */
.tkt_toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tkt_toolbar_left,
.tkt_toolbar_right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* select padrão */
.tkt_select {
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    font-size: 13px;
}

/* label direita */
.tkt_toolbar_right label,
.tkt_toolbar_right span {
    font-size: 13px;
    color: #64748b;
}

/* ===== TICKETS TABLE REFINO ===== */

.tkt_pag th {
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 12px 12px;
}

.tkt_pag td {
    padding: 14px 16px;
    vertical-align: middle;
}

/* Código */
.ticket-code {
    font-weight: 600;
    font-size: 14px;
}

.ticket-id {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Texto principal */
.tkt_main {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

/* Texto secundário */
.tkt_sub {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Status */
.status-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
}

/* Ações */
.tkt_actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

/* Botões pequenos */
.btn-mini {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    text-decoration: none;
}

.btn-mini:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.btn-mini.success {
    background: rgba(16,185,129,0.1);
    color: #065f46;
    border-color: rgba(16,185,129,0.2);
}

/* ===== RELATÓRIO DASHBOARD ===== */

.relatorio-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.relatorio-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* tabela mais compacta */
.table-relatorio th {
    font-size: 12px;
    color: #888;
    font-weight: 600;
    padding: 10px;
}

.table-relatorio td {
    padding: 10px;
    font-size: 13px;
    vertical-align: middle;
}

/* barra */
.progress {
    background: #eee;
    border-radius: 6px;
    height: 6px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-bar {
    height: 100%;
    border-radius: 6px;
}

/* cores */
.progress-green { background: #22c55e; }
.progress-yellow { background: #f59e0b; }
.progress-red { background: #ef4444; }

/* número menor */
.relatorio-small {
    font-size: 12px;
    color: #666;
}

.evento-header {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.evento-card {
    min-width: 320px;
    max-width: 500px;
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.section-title {
    margin-top: 25px;
    margin-bottom: 10px;
    font-weight: 600;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.event-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    background: #fafafa;
}

.event-card.active {
    border-color: #4f46e5;
    background: #eef2ff;
}

.ingresso-card {
    border: 1px solid #eee;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
}

.actions-inline {
    margin: 10px 0;
    display: flex;
    gap: 10px;
}

.report-container {
    padding: 20px;
}

.report-header h1 {
    font-size: 24px;
    font-weight: bold;
}

.report-section {
    margin-top: 25px;
}

.report-section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* tabela */
.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.report-table th {
    padding: 10px;
    text-align: left;
    color: #fff;
}

.report-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

/* cores */
.report-purple th { background: #4b3f72; }
.report-green th { background: #6a8f7a; }
.report-yellow th { background: #d8cfa3; color: #000; }
.report-red th { background: #c97b7b; }
.report-blue th { background: #6fa3c8; }

/* totais */
.report-total.success { background: #d4edda; }
.report-total.warning { background: #fff3cd; }
.report-total.danger { background: #f8d7da; }
.report-total.info { background: #d1ecf1; }

.report-filters {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.report-filters label {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
}