/* =========================================
   1. RESET Y VARIABLES
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, sans-serif; }
body { display: flex; background-color: #f8f9fa; color: #333; height: 100vh; overflow: hidden; justify-content: center; align-items: center;}

/* =========================================
   2. ESTILOS DEL LOGIN (INICIO DE SESIÓN)
   ========================================= */
.login-wrapper { width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; background-color: #f5f7f9; position: absolute; top: 0; left: 0; z-index: 1000; }
.login-container { background-color: #ffffff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); width: 100%; max-width: 420px; text-align: center; }
.login-container h1 { color: #0f172a; font-size: 26px; margin-bottom: 5px; }
.login-container h2 { color: #64748b; font-size: 14px; font-weight: normal; margin-bottom: 30px; }
.login-group { text-align: left; margin-bottom: 20px; }
.login-group label { display: block; font-size: 13px; font-weight: bold; color: #334155; margin-bottom: 8px; }
.login-group input { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; outline: none; transition: border 0.3s; }
.login-group input:focus { border-color: #1d4ed8; }
.btn-login { width: 100%; background-color: #0f172a; color: #ffffff; border: none; padding: 14px; border-radius: 6px; font-size: 15px; cursor: pointer; transition: background 0.3s; margin-top: 10px; font-weight: bold; }
.btn-login:hover { background-color: #1e293b; }
.usuarios-disp { margin-top: 25px; font-size: 12px; color: #64748b; line-height: 1.6; }
.error { color: #ef4444; font-size: 13px; margin-bottom: 15px; font-weight: bold; }

/* =========================================
   3. ESTILOS DEL DASHBOARD PREMIUM
   ========================================= */
body.dashboard-layout { justify-content: flex-start; align-items: stretch; } /* Ajuste para que el dashboard no se centre como el login */
.sidebar { width: 260px; background-color: #0f172a; color: #fff; display: flex; flex-direction: column; justify-content: space-between; z-index: 10;}
.sidebar-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #1e293b; }
.sidebar-header h2 { font-size: 1.1rem; color: #fff; }
.menu-btn { background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; }
.sidebar-menu { list-style: none; padding: 15px 10px; flex-grow: 1; }
.sidebar-menu li { margin-bottom: 5px; }
.sidebar-menu li a { display: flex; align-items: center; color: #cbd5e1; text-decoration: none; padding: 12px 15px; border-radius: 8px; font-size: 0.9rem; transition: 0.2s; font-weight: 500; }
.sidebar-menu li a i { width: 25px; font-size: 1.1rem; }
.sidebar-menu li a:hover { background-color: #1e293b; color: #fff; }
.sidebar-menu li a.active { background-color: #1d4ed8; color: #fff; }
.sidebar-profile { padding: 20px; border-top: 1px solid #1e293b; display: flex; align-items: center; gap: 15px; }
.profile-avatar { width: 40px; height: 40px; background-color: #334155; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; color: #94a3b8; }
.profile-info p { font-size: 0.85rem; font-weight: bold; margin: 0; color: #f8fafc; }
.profile-info span { font-size: 0.75rem; color: #64748b; }
.logout-btn-side { display: flex; align-items: center; gap: 10px; padding: 15px 20px; color: #cbd5e1; text-decoration: none; font-size: 0.9rem; transition: 0.2s; }
.logout-btn-side:hover { color: #ef4444; }

.content-wrapper { flex: 1; display: flex; flex-direction: column; overflow-y: auto; background-color: #f8f9fa;}
.topbar { height: 60px; background-color: #fff; display: flex; align-items: center; padding: 0 30px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.topbar-title { font-weight: 600; color: #0f172a; font-size: 1.2rem;}

.main-content { padding: 40px; width: 100%; max-width: 1000px; margin: 0 auto; }
.card { background-color: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 30px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }

/* SISTEMA DE PESTAÑAS (TABS) */
.tabs { display: flex; border-bottom: 1px solid #e2e8f0; margin-bottom: 25px; gap: 20px; }
.tab-link { background: none; border: none; padding: 10px 5px; font-size: 0.95rem; color: #64748b; cursor: pointer; font-weight: 500; position: relative; }
.tab-link:hover { color: #0f172a; }
.tab-link.active { color: #1d4ed8; }
.tab-link.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background-color: #1d4ed8; }
.tab-content { display: none; animation: fadeIn 0.3s; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* FORMULARIOS Y TABLAS */
.form-title { font-size: 1.1rem; color: #0f172a; margin-bottom: 20px; font-weight: 600; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; color: #334155; margin-bottom: 8px; }
.form-control { width: 100%; padding: 10px 15px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 0.95rem; outline: none; transition: 0.2s; color: #333; }
.form-control:focus { border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1); }
textarea.form-control { resize: vertical; min-height: 80px; }
.btn-primary { background-color: #0f172a; color: #fff; border: none; padding: 10px 25px; border-radius: 6px; cursor: pointer; font-size: 0.95rem; font-weight: 500; transition: 0.2s;}
.btn-primary:hover { background-color: #1e293b; }
.table-data { width: 100%; border-collapse: collapse; margin-top: 10px; }
.table-data th, .table-data td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #e2e8f0; font-size: 0.9rem; }
.table-data th { background-color: #f8fafc; color: #475569; font-weight: 600; }
.table-data tr:hover { background-color: #f1f5f9; }