/* ============================================================
   Loja Downloader - Tema Escuro Premium
   ============================================================ */

:root {
    --bg: #0a0e1a;
    --surface: #111827;
    --card: rgba(17, 24, 39, 0.85);
    --border: rgba(59, 130, 246, 0.15);
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --accent: #8b5cf6;
    --gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --sidebar-width: 250px;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 14, 26, 0.95);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    transition: transform 0.3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.brand-icon {
    font-size: 28px;
}

.brand-name {
    font-size: 17px;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text);
}

.nav-item.active {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 15px -3px rgba(59, 130, 246, 0.4);
}

.nav-icon {
    font-size: 17px;
    width: 22px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 4px;
}

.admin-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.admin-name {
    font-weight: 600;
    font-size: 14px;
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 200;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
}

/* Conteúdo principal */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 28px;
    max-width: calc(100% - var(--sidebar-width));
}

/* ============================================================
   CABEÇALHO DE PÁGINA
   ============================================================ */

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 26px;
    font-weight: 700;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 22px;
}

/* ============================================================
   STATS GRID
   ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.4);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon-blue {
    background: rgba(59, 130, 246, 0.15);
}

.stat-icon-purple {
    background: rgba(139, 92, 246, 0.15);
}

.stat-icon-green {
    background: rgba(16, 185, 129, 0.15);
}

.stat-icon-amber {
    background: rgba(245, 158, 11, 0.15);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 12.5px;
    color: var(--text-secondary);
}

/* ============================================================
   GRIDS DE CONTEÚDO
   ============================================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   BOTÕES
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    color: var(--text);
    background: transparent;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 15px -3px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(59, 130, 246, 0.5);
}

.btn-outline {
    border-color: var(--border);
    background: rgba(59, 130, 246, 0.06);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.15);
}

.btn-ghost {
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn-copy {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    color: var(--text);
}

.btn-copy:hover {
    background: rgba(59, 130, 246, 0.25);
    transform: scale(1.08);
}

.btn-copy.copied {
    background: rgba(16, 185, 129, 0.25);
    border-color: var(--success);
}

/* ============================================================
   FORMULÁRIOS
   ============================================================ */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    background: rgba(10, 14, 26, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-group input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.filters-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filters-form input,
.filters-form select {
    padding: 9px 13px;
    background: rgba(10, 14, 26, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}

.filters-form .filter-search {
    flex: 1;
    min-width: 220px;
}

.filters-form input:focus,
.filters-form select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Color scheme para inputs date no tema escuro */
input[type="date"] {
    color-scheme: dark;
}

/* ============================================================
   UPLOAD ZONES
   ============================================================ */

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    background: rgba(59, 130, 246, 0.03);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
}

.upload-zone-small {
    padding: 20px;
}

.upload-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.upload-zone-small .upload-icon {
    font-size: 26px;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--gradient);
    border-radius: 99px;
    transition: width 0.3s;
}

.current-file-info {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 18px;
}

.current-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.file-icon {
    font-size: 26px;
}

/* ============================================================
   TABELAS
   ============================================================ */

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    text-align: left;
    padding: 12px 14px;
    color: var(--text-muted);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 13px 14px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.07);
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.15s;
}

.table tbody tr:nth-child(even) {
    background: rgba(59, 130, 246, 0.025);
}

.table tbody tr:hover {
    background: rgba(59, 130, 246, 0.07);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Célula do app */
.app-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.app-icon-placeholder {
    background: rgba(59, 130, 246, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.app-cell-info {
    display: flex;
    flex-direction: column;
}

.app-name {
    font-weight: 600;
}

.app-package {
    color: var(--text-muted);
    font-size: 12px;
}

/* ============================================================
   BADGES E CÓDIGOS
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.14);
    color: #93c5fd;
}

.badge-purple {
    background: rgba(139, 92, 246, 0.14);
    color: #c4b5fd;
}

.badge-green {
    background: rgba(16, 185, 129, 0.14);
    color: #6ee7b7;
}

.badge-amber {
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
}

.badge-red {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
}

.badge-gray {
    background: rgba(100, 116, 139, 0.18);
    color: #cbd5e1;
}

.badge-clickable {
    border: none;
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s;
    font-family: inherit;
}

.badge-clickable:hover {
    transform: scale(1.06);
    filter: brightness(1.2);
}

.code-chip {
    font-family: 'Consolas', 'Courier New', monospace;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: #c4b5fd;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 13px;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.code-large {
    font-size: 15px;
    padding: 5px 13px;
}

.code-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-key-display {
    margin: 14px 0 18px;
    flex-wrap: wrap;
}

.api-key-display .code-chip {
    word-break: break-all;
    letter-spacing: 0.04em;
    font-size: 13px;
}

.category-icon {
    font-size: 22px;
}

.action-buttons {
    display: flex;
    gap: 6px;
}

/* ============================================================
   ALERTAS
   ============================================================ */

.alert {
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.alert-info {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 4px;
}

.alert-close:hover {
    opacity: 1;
}

/* ============================================================
   MODAIS
   ============================================================ */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 16, 0.75);
    backdrop-filter: blur(6px);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.25s ease;
}

.modal-content h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

/* ============================================================
   PAGINAÇÃO
   ============================================================ */

.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 22px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.page-link:hover {
    border-color: var(--primary);
    color: var(--text);
}

.page-link.active {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */

.empty-state {
    text-align: center;
    padding: 44px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 52px;
    margin-bottom: 14px;
    opacity: 0.7;
}

.empty-state .btn {
    margin-top: 16px;
}

/* ============================================================
   TOP APPS
   ============================================================ */

.top-apps-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.top-app-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.top-app-item:hover {
    background: rgba(59, 130, 246, 0.06);
}

.top-app-rank {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    background: rgba(100, 116, 139, 0.18);
    color: var(--text-secondary);
}

.rank-1 {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.rank-2 {
    background: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

.rank-3 {
    background: rgba(180, 120, 60, 0.2);
    color: #d9a06b;
}

.top-app-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.top-app-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-app-count {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.chart-legend {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--gradient);
    display: inline-block;
}

/* ============================================================
   LOGIN
   ============================================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.login-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.22;
}

.login-glow-1 {
    width: 480px;
    height: 480px;
    background: #3b82f6;
    top: -140px;
    right: -100px;
    animation: float 9s ease-in-out infinite;
}

.login-glow-2 {
    width: 420px;
    height: 420px;
    background: #8b5cf6;
    bottom: -120px;
    left: -100px;
    animation: float 11s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

.login-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 44px 40px;
    max-width: 420px;
    width: 100%;
    backdrop-filter: blur(24px);
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 1;
}

.login-logo {
    font-size: 52px;
    text-align: center;
    margin-bottom: 14px;
}

.login-title {
    font-size: 24px;
    text-align: center;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
}

.login-form .btn-block {
    padding: 13px;
    font-size: 15px;
    margin-top: 6px;
}

/* ============================================================
   TELA DE SUCESSO DO UPLOAD
   ============================================================ */

.success-card {
    max-width: 560px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 14px;
    animation: popIn 0.4s ease;
}

@keyframes popIn {
    0% {
        transform: scale(0);
    }

    70% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

.big-code-display {
    margin: 26px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.big-code-display code {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 0.25em;
    padding: 18px 34px 18px 44px;
    background: rgba(139, 92, 246, 0.1);
    border: 2px dashed rgba(139, 92, 246, 0.4);
    border-radius: var(--radius);
    color: #c4b5fd;
}

.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   TOASTS
   ============================================================ */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 13px 20px;
    font-size: 14px;
    box-shadow: var(--shadow);
    animation: toastIn 0.3s ease;
    max-width: 340px;
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

@keyframes toastIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.hiding {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* ============================================================
   ANIMAÇÕES E UTILITÁRIOS
   ============================================================ */

.fade-in {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shake {
    animation: shake 0.4s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-7px);
    }

    40%,
    80% {
        transform: translateX(7px);
    }
}

.text-muted {
    color: var(--text-muted);
    font-size: 13px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.25);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.45);
}

/* ============================================================
   RESPONSIVO
   ============================================================ */

@media (max-width: 860px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 30px 0 60px rgba(0, 0, 0, 0.5);
    }

    .sidebar-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 70px 16px 24px;
    }

    .big-code-display code {
        font-size: 30px;
        letter-spacing: 0.18em;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
}