/* SIFAZ MASTER STYLESHEET v3.0 - Refactored */
:root {
    --sidebar-width: 270px;
    --header-height: 64px;
    --primary-navy: #0f1b2d;
    --primary-accent: #0ea5e9;
    --surface-light: #f8fafc;
    --text-dark: #1e293b;
    --border-color: #e2e8f0;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --transition: all 0.2s ease;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--surface-light);
    color: var(--text-dark);
    margin: 0; padding: 0;
    overflow-x: hidden;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* === SIDEBAR === */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0; left: 0;
    background: linear-gradient(180deg, #0f1b2d 0%, #0a1220 100%);
    color: #fff;
    z-index: 1000;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
    transition: var(--transition);
}

.sidebar-brand { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.08); }
.brand-logo { width: 100%; max-width: 140px; height: auto; filter: brightness(0) invert(1); margin-bottom: 6px; }
.brand-subtitle { font-size: 0.6rem; letter-spacing: 1.5px; opacity: 0.5; font-weight: 700; text-transform: uppercase; }

.nav-header { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,0.3); padding: 22px 22px 8px; font-weight: 700; }
.nav-link { color: rgba(255,255,255,0.65) !important; padding: 10px 22px; display: flex; align-items: center; text-decoration: none; border-left: 3px solid transparent; font-size: 0.85rem; transition: var(--transition); }
.nav-link:hover { background: rgba(255,255,255,0.05); color: #fff !important; }
.nav-link.active { background: rgba(14,165,233,0.12); color: #fff !important; border-left-color: var(--primary-accent); font-weight: 600; }
.nav-link i { width: 20px; text-align: center; margin-right: 10px; font-size: 1rem; opacity: 0.8; }
.submenu { background: rgba(0,0,0,0.2); }
.submenu .nav-link { padding-left: 52px; font-size: 0.8rem; }
.submenu .nav-link i { font-size: 0.85rem; }

/* === MAIN CONTENT === */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.top-header {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0; z-index: 900;
    box-shadow: var(--shadow-sm);
}

.content-wrapper { padding: 24px 28px; flex: 1; }

/* === CARDS === */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header { border-bottom: 1px solid var(--border-color); border-radius: var(--radius-md) var(--radius-md) 0 0 !important; }

/* Shortcut Cards */
.shortcut-card { border-radius: var(--radius-md) !important; transition: var(--transition); }
.shortcut-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* === TABLES === */
.table { font-size: 0.85rem; }
.table th { font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; border-bottom-width: 1px; }
.table td { vertical-align: middle; }

/* === BADGES === */
.badge { font-weight: 500; letter-spacing: 0.3px; }

/* === BUTTONS === */
.btn { font-weight: 500; font-size: 0.85rem; border-radius: var(--radius-sm); transition: var(--transition); }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary-accent); border-color: var(--primary-accent); }
.btn-primary:hover { background: #0284c7; border-color: #0284c7; }
.rounded-pill { border-radius: 50px !important; }

/* === FORMS === */
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--border-color); font-size: 0.85rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary-accent); box-shadow: 0 0 0 3px rgba(14,165,233,0.12); }
.form-label { font-size: 0.8rem; font-weight: 600; color: #475569; }

/* === ALERTS === */
.alert { border-radius: var(--radius-md); font-size: 0.85rem; border: none; }

/* === FOOTER === */
.demo-footer { margin-top: auto; padding: 16px 0; background: #fff; border-top: 1px solid var(--border-color); text-align: center; }
.powered-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 50px; background: #fff; border: 1px solid #e2e8f0; color: #0f172a; text-decoration: none; font-weight: 600; font-size: 0.7rem; box-shadow: var(--shadow-sm); transition: var(--transition); }
.powered-pill:hover { border-color: var(--primary-accent); transform: translateY(-1px); }
.paneo-logo { height: 18px; width: auto; }

/* === MODALS === */
.modal-backdrop { z-index: 1040 !important; }
.modal { z-index: 1050 !important; }
.modal-content { border-radius: var(--radius-lg); border: none; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); z-index: 2000; }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; }
    .content-wrapper { padding: 16px; }
    .top-header { padding: 0 16px; }
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }

/* === UTILITY === */
.font-monospace { font-family: 'JetBrains Mono', monospace; }
.hover-shadow:hover { box-shadow: var(--shadow-md) !important; }
.transition { transition: var(--transition); }
