/* ======================================================
   THEME CSS - HypeCube Staff Panel
   Tema chiaro/scuro con gradienti blu/cyan
   ====================================================== */

:root {
    /* Colori base - Light Mode */
    --bg-primary: #f0f4f8;
    --bg-secondary: #e8ecf0;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: #f5f7fa;
    
    --text-primary: #1a2634;
    --text-secondary: #445566;
    --text-muted: #8899aa;
    --text-inverse: #ffffff;
    
    --border-color: #e0e4e8;
    --input-border: #d0d4d8;
    
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    
    --gradient-start: #4fc3f7;
    --gradient-end: #0d47a1;
    --gradient: linear-gradient(135deg, #4fc3f7, #0d47a1);
    
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    
    --radius: 12px;
    --radius-lg: 20px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2333;
    --bg-input: #0d1117;
    --bg-hover: #252d3f;
    
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #5c6b7a;
    --text-inverse: #0d1117;
    
    --border-color: #30363d;
    --input-border: #30363d;
    
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    min-height: 100vh;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0d47a1, #4fc3f7);
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 71, 161, 0.35);
}

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.35);
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.35);
}

.btn-warning {
    background: var(--warning);
    color: #333;
}
.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.35);
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 12px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--gradient-start);
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}
.card-header h3 {
    font-size: 18px;
    color: var(--text-primary);
}

/* ===== FORM ===== */
.form-group {
    margin-bottom: 1.2rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    font-weight: 500;
}
.form-group .help-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--input-border);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
    font-size: 14px;
}
.form-control:focus {
    border-color: var(--gradient-start);
    outline: none;
    box-shadow: 0 0 0 4px rgba(79, 195, 247, 0.2);
}
.form-control::placeholder {
    color: var(--text-muted);
}
select.form-control {
    appearance: auto;
    cursor: pointer;
}
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* ===== TABLE ===== */
.table-responsive {
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table thead th {
    background: var(--gradient);
    color: white;
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}
.table tbody td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
}
.table tbody tr:hover {
    background: var(--bg-hover);
}
.table .status-badge {
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}
.status-pending {
    background: #fff3cd;
    color: #856404;
}
.status-approved {
    background: #d4edda;
    color: #155724;
}
.status-rejected {
    background: #f8d7da;
    color: #721c24;
}
.status-active {
    background: #d4edda;
    color: #155724;
}
.status-inactive {
    background: #e2e3e5;
    color: #383d41;
}
.status-depexed {
    background: #f8d7da;
    color: #721c24;
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
}
.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: var(--success);
}
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left-color: var(--danger);
}
.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: var(--warning);
}
.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: var(--info);
}

/* ===== DARK MODE TOGGLE ===== */
.dark-mode-toggle {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.dark-mode-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--gradient-start);
}
.dark-mode-toggle i {
    font-size: 16px;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    padding: 15px 25px;
    border-radius: var(--radius);
    color: white;
    animation: slideIn 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); color: #333; }
.toast-info { background: var(--info); }
.toast i { font-size: 18px; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        padding: 15px !important;
    }
    .table-responsive {
        font-size: 12px;
    }
    .table thead th,
    .table tbody td {
        padding: 0.5rem 0.6rem;
    }
    .card {
        padding: 1rem;
    }
    .btn {
        padding: 0.5rem 1rem;
        font-size: 13px;
    }
}