/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    /* Estas variables serán sobreescritas por PHP según configuración */
    --color-primario: #7C193C; 
    --color-secundario: #BC955C;
    --bg-dark: #1e1e2f;
    --text-light: #f3f4f6;
    --surface: #2a2a3c;
    --border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--bg-dark), #10101c);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =======================================
   LOGIN 
   ======================================= */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: rgba(42, 42, 60, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-brand {
    text-align: center;
    margin-bottom: 30px;
}

.login-brand .logo {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--color-secundario);
    padding: 5px;
    background: #fff;
    margin-bottom: 15px;
    box-shadow: 0 0 15px rgba(188, 149, 92, 0.3);
}

.login-brand h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-secundario);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #cbd5e1;
}

.form-group input, 
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus, 
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-secundario);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 8px rgba(188, 149, 92, 0.3);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--color-primario);
    color: #fff;
}

.btn-primary:hover {
    background: #5a1129;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(124, 25, 60, 0.4);
}

.btn-secondary {
    background: var(--color-secundario);
    color: #fff;
}

.btn-secondary:hover {
    background: #967545;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(188, 149, 92, 0.4);
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

/* =======================================
   DASHBOARD & ESTRUCTURA GLOBAL
   ======================================= */
.wrapper {
    display: flex;
    flex: 1;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.sidebar-header img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    padding: 3px;
    margin-bottom: 10px;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-secundario);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    flex: 1;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-left-color: var(--color-secundario);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.sidebar-footer .btn {
    width: 100%;
    padding: 10px;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 70px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.topbar-title h2 {
    margin: 0;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info .role-badge {
    background: var(--color-primario);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.content-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

/* CARDS GERENCIALES */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.stat-title {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-secundario);
}

/* TABLAS */
.table-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.table-header-box {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header-box h3 {
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

th {
    background: rgba(0,0,0,0.2);
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    font-size: 0.85rem;
}

tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* BADGES DE ESTADO Y PRIORIDAD */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-pendiente { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-asignado { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-resuelto { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-alta { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-media { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-baja { background: rgba(107, 114, 128, 0.2); color: #d1d5db; border: 1px solid rgba(107, 114, 128, 0.3); }

/* UTILIDADES */
.text-right { text-align: right; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.gap-10 { gap: 10px; }
.w-auto { width: auto; display: inline-block; }
