/* ═══════════════════════════════════════════════════════════════════════
   Shotokan Victoria — Diseño profesional, paleta suave
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --primary:        #1E40AF;   /* azul profundo */
    --primary-light:  #3B82F6;   /* azul medio */
    --primary-dark:   #1E3A8A;   /* azul oscuro */
    --accent:         #D97706;   /* dorado cálido */
    --accent-light:   #FCD34D;
    --bg:             #F1F5F9;   /* gris azulado muy claro */
    --surface:        #FFFFFF;
    --border:         #E2E8F0;
    --text:           #1E293B;
    --text-muted:     #64748B;
    --text-soft:      #94A3B8;
    --success:        #059669;
    --danger:         #DC2626;
    --warning:        #D97706;
    --info:           #0891B2;
    --sidebar-bg:     #1E293B;   /* slate-800 */
    --sidebar-hover:  #334155;
    --sidebar-active: #1E40AF;
    --sidebar-text:   #CBD5E1;
    --sidebar-active-text: #FFFFFF;
    --radius:         10px;
    --radius-lg:      14px;
    --shadow-sm:      0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow:         0 4px 12px rgba(0,0,0,.08);
    --shadow-lg:      0 10px 30px rgba(0,0,0,.12);
    --transition:     all .2s ease;
}

/* ── Base ──────────────────────────────────────────────────────────────── */
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

/* ── Animaciones ───────────────────────────────────────────────────────── */
.fade-in {
    opacity: 0;
    animation: fadeIn .45s ease forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

.slide-up {
    transform: translateY(16px);
    opacity: 0;
    animation: slideUp .5s ease forwards;
}
@keyframes slideUp { to { transform: translateY(0); opacity: 1; } }

/* ── Sidebar ───────────────────────────────────────────────────────────── */
.sidebar {
    background: var(--sidebar-bg) !important;
    min-height: 100vh;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff !important;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: .6rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.sidebar-link {
    color: var(--sidebar-text) !important;
    padding: .7rem 1.25rem;
    border-radius: var(--radius);
    margin: .15rem .5rem;
    font-size: .875rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: var(--sidebar-hover) !important;
    color: #fff !important;
}

.sidebar-item.active > .sidebar-link {
    background: var(--sidebar-active) !important;
    color: var(--sidebar-active-text) !important;
    font-weight: 600;
}

.sidebar-header {
    color: var(--text-soft) !important;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 1.25rem 1.25rem .4rem;
}

/* ── Navbar ────────────────────────────────────────────────────────────── */
.navbar-bg {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* ── Botones ───────────────────────────────────────────────────────────── */
.btn {
    border-radius: var(--radius);
    font-weight: 500;
    font-size: .875rem;
    padding: .5rem 1.1rem;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(30,64,175,.3);
    transform: translateY(-1px);
}
.btn-primary:focus, .btn-primary:active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-success   { background: var(--success); border-color: var(--success); }
.btn-danger    { background: var(--danger);  border-color: var(--danger);  }
.btn-warning   { background: var(--warning); border-color: var(--warning); color:#fff; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card-header {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--text);
}

/* Tarjetas de estadísticas */
.stat-card {
    border-left: 4px solid var(--primary) !important;
    border-radius: var(--radius-lg) !important;
}
.stat-card.success { border-left-color: var(--success) !important; }
.stat-card.warning { border-left-color: var(--warning) !important; }
.stat-card.info    { border-left-color: var(--info)    !important; }
.stat-card.danger  { border-left-color: var(--danger)  !important; }
.stat-card.accent  { border-left-color: var(--accent)  !important; }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}
.stat-icon.primary { background: var(--primary); }
.stat-icon.success { background: var(--success); }
.stat-icon.warning { background: var(--warning); }
.stat-icon.info    { background: var(--info);    }
.stat-icon.danger  { background: var(--danger);  }
.stat-icon.accent  { background: var(--accent);  }

/* ── Formularios ───────────────────────────────────────────────────────── */
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .9rem;
    color: var(--text);
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
    outline: none;
}

.form-label {
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: .35rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary);
}

/* ── Tablas ────────────────────────────────────────────────────────────── */
.table {
    font-size: .875rem;
    color: var(--text);
}

.table thead th {
    background: var(--bg);
    color: var(--text-muted);
    font-weight: 600;
    font-size: .78rem;
    letter-spacing: .5px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--border);
    padding: .85rem 1rem;
}

.table tbody tr:hover {
    background: #EFF6FF;
}

.table tbody td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table-responsive {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
    border-radius: 6px;
    padding: .35em .65em;
    font-size: .75rem;
    font-weight: 600;
}

.badge.bg-success { background: #DCFCE7 !important; color: #166534 !important; }
.badge.bg-danger  { background: #FEE2E2 !important; color: #991B1B !important; }
.badge.bg-warning { background: #FEF3C7 !important; color: #92400E !important; }
.badge.bg-info    { background: #E0F2FE !important; color: #075985 !important; }
.badge.bg-primary { background: #DBEAFE !important; color: #1E40AF !important; }
.badge.bg-secondary { background: var(--bg) !important; color: var(--text-muted) !important; }
.badge.bg-dark    { background: var(--text) !important; color: #fff !important; }

/* ── Alertas ───────────────────────────────────────────────────────────── */
.alert {
    border: none;
    border-radius: var(--radius);
    font-size: .875rem;
    border-left: 4px solid;
    padding: .9rem 1.1rem;
}
.alert-success { background: #F0FDF4; border-left-color: var(--success); color: #166534; }
.alert-danger  { background: #FEF2F2; border-left-color: var(--danger);  color: #991B1B; }
.alert-warning { background: #FFFBEB; border-left-color: var(--warning); color: #92400E; }
.alert-info    { background: #F0F9FF; border-left-color: var(--info);    color: #075985; }

/* ── Modales ───────────────────────────────────────────────────────────── */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--primary);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1rem 1.25rem;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 1rem 1.25rem;
}

/* ── Paginación ────────────────────────────────────────────────────────── */
.pagination .page-link {
    border: 1px solid var(--border);
    color: var(--primary);
    border-radius: var(--radius) !important;
    margin: 0 2px;
    font-size: .85rem;
}
.pagination .page-link:hover { background: var(--bg); }
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ── Páginas públicas (login, registro, verificación) ──────────────────── */
.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #EFF6FF 0%, #F1F5F9 50%, #E0F2FE 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(30,64,175,.12);
    padding: 2.5rem;
    width: 100%;
    max-width: 460px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo .logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: .75rem;
    box-shadow: 0 8px 24px rgba(30,64,175,.3);
}

.auth-logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: .85rem;
    margin: .25rem 0 0;
}

/* Indicador de fuerza de contraseña */
.password-strength {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin-top: .5rem;
    overflow: hidden;
}
.password-strength-bar {
    height: 100%;
    border-radius: 2px;
    width: 0;
    transition: width .3s ease, background .3s ease;
}

/* Input de código de verificación */
.otp-input {
    letter-spacing: 12px;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    padding: .75rem;
    border-radius: var(--radius);
}

/* Pasos del proceso de registro */
.steps-indicator {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 1.75rem;
}
.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    transition: var(--transition);
}
.step-dot.active  { background: var(--primary); transform: scale(1.25); }
.step-dot.done    { background: var(--success); }

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }

/* ── Utilidades ────────────────────────────────────────────────────────── */
.text-primary  { color: var(--primary)   !important; }
.text-muted    { color: var(--text-muted) !important; }
.bg-surface    { background: var(--surface) !important; }
.border-soft   { border-color: var(--border) !important; }
.rounded-xl    { border-radius: var(--radius-lg) !important; }
.shadow-soft   { box-shadow: var(--shadow) !important; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .auth-card { padding: 1.75rem 1.25rem; }
}
