/* ═══════════════════════════════════════════════════════════════════
    Estudio Pereira - Custom Styles
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --ep-primary: #1a3a5c;
    --ep-secondary: #2c6e9e;
    --ep-accent: #f0ad4e;
    --ep-success: #28a745;
    --ep-danger: #dc3545;
    --ep-light: #f8f9fa;
    --ep-dark: #212529;
    --ep-sidebar-width: 260px;
}

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

/* ─── Login Page ─────────────────────────────────────────────────── */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%);
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card .logo-text {
    color: var(--ep-primary);
    font-weight: 700;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-card .subtitle {
    color: #6c757d;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* ─── Sidebar ────────────────────────────────────────────────────── */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--ep-sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--ep-primary) 0%, #0d2137 100%);
    color: white;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar .brand {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .brand h4 {
    margin: 0;
    font-weight: 700;
    font-size: 1.3rem;
}

.sidebar .brand small {
    opacity: 0.7;
    font-size: 0.8rem;
}

.sidebar .nav-menu {
    padding: 1rem 0;
}

.sidebar .nav-item {
    padding: 0;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
    border-left-color: var(--ep-accent);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* ─── Main Content ──────────────────────────────────────────────── */

.main-content {
    margin-left: var(--ep-sidebar-width);
    padding: 0;
    min-height: 100vh;
}

.top-bar {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 500;
}

.top-bar .user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-content {
    padding: 2rem;
}

/* ─── Cards ──────────────────────────────────────────────────────── */

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid var(--ep-secondary);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ep-primary);
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card.warning { border-left-color: var(--ep-accent); }
.stat-card.danger { border-left-color: var(--ep-danger); }
.stat-card.success { border-left-color: var(--ep-success); }

.content-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

.content-card .card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.content-card .card-header-custom h5 {
    margin: 0;
    color: var(--ep-primary);
    font-weight: 600;
}

/* ─── Tables ─────────────────────────────────────────────────────── */

.table-custom {
    font-size: 0.9rem;
}

.table-custom th {
    background-color: var(--ep-light);
    color: var(--ep-primary);
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.table-custom td {
    vertical-align: middle;
}

/* ─── Portal Cliente (mobile-first) ───────────────────────────────── */

.portal-shell {
    min-height: 100vh;
    background-color: #eef2f7;
}

.portal-topbar {
    background: white;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 500;
}

/* ─── Badges ─────────────────────────────────────────────────────── */

.badge-estado {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
}

/* ─── Buttons ────────────────────────────────────────────────────── */

.btn-ep-primary {
    background-color: var(--ep-primary);
    border-color: var(--ep-primary);
    color: white;
}

.btn-ep-primary:hover {
    background-color: #142e4a;
    border-color: #142e4a;
    color: white;
}

/* ─── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}

/* ─── Animations ─────────────────────────────────────────────────── */

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Modal overrides ────────────────────────────────────────────── */

.modal-header {
    background-color: var(--ep-primary);
    color: white;
}

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

/* ─── Tabs ───────────────────────────────────────────────────────── */

.nav-tabs .nav-link {
    color: var(--ep-primary);
}

.nav-tabs .nav-link.active {
    color: var(--ep-primary);
    font-weight: 600;
}

/* ─── Empty state ────────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}
