/* ═══════════════════════════════════════════════════════════════════════════════
   ZeusBot - Painel Administrativo
   Estilos Globais
   ═══════════════════════════════════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    min-height: 100vh;
}

/* ─── Login Screen ──────────────────────────────────────────────────────────── */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
}

.login-box {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 40px;
    width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 24px;
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-box p {
    text-align: center;
    color: #888;
    margin-bottom: 24px;
    font-size: 14px;
}

/* ─── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #aaa;
    font-size: 13px;
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #7b2ff7;
    box-shadow: 0 0 0 3px rgba(123,47,247,0.2);
}

.form-group textarea { min-height: 80px; resize: vertical; }
.form-group select option { background: #1a1a2e; color: #fff; }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #7b2ff7, #00d4ff);
    color: #fff;
    width: 100%;
    padding: 12px;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(123,47,247,0.4); }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-success { background: #2ecc71; color: #fff; }
.btn-success:hover { background: #27ae60; }
.btn-warning { background: #f39c12; color: #fff; }
.btn-warning:hover { background: #e67e22; }
.btn-info { background: #3498db; color: #fff; }
.btn-info:hover { background: #2980b9; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.error-msg { color: #e74c3c; font-size: 13px; margin-top: 8px; text-align: center; }
.hidden { display: none !important; }

/* ─── Admin Interface ───────────────────────────────────────────────────────── */
.admin-container { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    background: rgba(255,255,255,0.03);
    border-right: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    flex-shrink: 0;
}

.sidebar-logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 16px;
}

.sidebar-logo h2 {
    font-size: 18px;
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-logo span { color: #666; font-size: 12px; }

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #888;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }

.nav-item.active {
    background: rgba(123,47,247,0.1);
    color: #7b2ff7;
    border-left-color: #7b2ff7;
}

.nav-item .icon { margin-right: 10px; font-size: 16px; }

.nav-item .badge {
    margin-left: auto;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.main-content { flex: 1; padding: 24px; overflow-y: auto; }
.tab-content { display: none; }
.tab-content.active { display: block; }

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

.page-header h1 { font-size: 22px; color: #fff; }
.page-header .subtitle { color: #888; font-size: 13px; margin-top: 4px; }

.logout-btn {
    background: rgba(255,255,255,0.1);
    color: #e74c3c;
    border: 1px solid rgba(231,76,60,0.3);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.logout-btn:hover { background: rgba(231,76,60,0.2); }

/* ─── Cards ─────────────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-card .value { font-size: 28px; font-weight: 700; color: #fff; }
.stat-card .label { font-size: 12px; color: #888; margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }
.stat-card .icon { font-size: 24px; margin-bottom: 8px; }

/* ─── Tables ────────────────────────────────────────────────────────────────── */
.table-container {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.table-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 { font-size: 16px; color: #fff; }

.table-search input {
    padding: 8px 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    width: 200px;
}

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

th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
}

td {
    padding: 10px 16px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

tr:hover td { background: rgba(255,255,255,0.03); }

/* ─── Status Badges ─────────────────────────────────────────────────────────── */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-active { background: rgba(46,204,113,0.2); color: #2ecc71; }
.status-expired { background: rgba(231,76,60,0.2); color: #e74c3c; }
.status-blocked { background: rgba(231,76,60,0.3); color: #e74c3c; }
.status-trial { background: rgba(243,156,18,0.2); color: #f39c12; }
.status-paid { background: rgba(52,152,219,0.2); color: #3498db; }
.status-open { background: rgba(243,156,18,0.2); color: #f39c12; }
.status-resolved { background: rgba(46,204,113,0.2); color: #2ecc71; }

/* ─── Section ───────────────────────────────────────────────────────────────── */
.section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.section h3 { font-size: 16px; color: #fff; margin-bottom: 16px; }
.section .description { color: #888; font-size: 13px; margin-bottom: 16px; }

/* ─── Toast ─────────────────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
    max-width: 400px;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.toast-error { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.toast-info { background: linear-gradient(135deg, #3498db, #2980b9); }
.toast-warning { background: linear-gradient(135deg, #f39c12, #e67e22); }

/* ─── Modal ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
}

.modal {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 24px;
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal h2 { margin-bottom: 16px; color: #fff; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ─── Loading ───────────────────────────────────────────────────────────────── */
.loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #7b2ff7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ─── Log Container ─────────────────────────────────────────────────────────── */
.log-container {
    background: #1a1a2e;
    color: #00ff88;
    padding: 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* ─── Upload Cards (DLLs) ──────────────────────────────────────────────────── */
.upload-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.upload-card:hover {
    border-color: rgba(255,255,255,0.15);
}
.upload-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.upload-card-icon {
    font-size: 28px;
    line-height: 1;
}
.upload-card-header strong {
    font-size: 15px;
    color: #e0e0e0;
}
.upload-card-desc {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-top: 2px;
}
.upload-card-body {
    padding: 16px 20px;
}

/* ─── File Info ────────────────────────────────────────────────────────────── */
.file-info-loading {
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    padding: 8px 0;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}
.file-info-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 13px;
}
.file-info-details {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 12px 16px;
}
.file-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.file-info-row:last-child {
    border-bottom: none;
}
.file-info-label {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}
.file-info-value {
    color: #e0e0e0;
    font-size: 13px;
    text-align: right;
    max-width: 60%;
}

/* ─── Progress Bar ─────────────────────────────────────────────────────────── */
.upload-progress {
    margin-top: 12px;
}
.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #7b2ff7);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

/* ─── Button Warning ───────────────────────────────────────────────────────── */
.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243,156,18,0.3);
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar-logo h2, .sidebar-logo span, .nav-item span:not(.icon) { display: none; }
    .nav-item { justify-content: center; padding: 12px; }
    .nav-item .icon { margin-right: 0; }
    .main-content { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
