/* ============================================================
   PINTRACK SOLUTION - Custom Styles
   ============================================================ */
:root {
    --primary: #1a3a5c;
    --primary-dark: #0f2540;
    --accent: #f0a500;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --bg-main: #f0f4f8;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-main);
    color: #333;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ---- SIDEBAR ---- */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--primary);
    overflow-y: auto;
    z-index: 1000;
    transition: width .25s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .user-info,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-nav a span { display: none; }

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    gap: 12px;
}
.brand-logo {
    width: 42px; height: 42px;
    background: var(--accent);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    flex-shrink: 0;
}
.brand-name { display: block; color: #fff; font-weight: 700; font-size: 1rem; line-height: 1; }
.brand-sub { display: block; color: var(--accent); font-size: .65rem; font-weight: 600; letter-spacing: 1.5px; }

.sidebar-user {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    gap: 10px;
}
.user-avatar { color: rgba(255,255,255,.5); font-size: 1.8rem; }
.user-name { color: #fff; font-size: .85rem; font-weight: 600; }
.user-role { font-size: .65rem; }

.nav-label {
    color: rgba(255,255,255,.35);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 14px 18px 4px;
}

.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: .88rem;
    transition: all .2s;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: #fff; border-left-color: var(--accent); }
.sidebar-nav a.active { background: rgba(255,255,255,.1); color: #fff; border-left-color: var(--accent); font-weight: 600; }
.sidebar-nav a i { font-size: 1.1rem; width: 20px; text-align: center; }

/* ---- MAIN CONTENT ---- */
#main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left .25s ease;
    display: flex;
    flex-direction: column;
}
#main-content.expanded { margin-left: var(--sidebar-collapsed); }

/* ---- TOPBAR ---- */
.topbar {
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,.07);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 999;
}
.topbar-title { font-weight: 700; color: var(--primary); font-size: 1.05rem; }
.topbar-breadcrumb { color: #888; font-size: .8rem; }
#sidebarToggle { border: none; background: none; font-size: 1.2rem; cursor: pointer; color: var(--primary); }

/* ---- CONTENT AREA ---- */
.content-area { padding: 24px; flex: 1; }

/* ---- CARDS ---- */
.card { border: none; box-shadow: var(--card-shadow); border-radius: 12px; }
.card-header { background: #fff; border-bottom: 1px solid #eee; font-weight: 600; border-radius: 12px 12px 0 0 !important; }

/* ---- STAT CARDS ---- */
.stat-card {
    border-radius: 14px;
    padding: 20px 22px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--card-shadow);
}
.stat-icon { width: 54px; height: 54px; border-radius: 12px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: .8rem; opacity: .85; margin-top: 2px; }

.bg-stat-blue { background: linear-gradient(135deg, #1a3a5c, #2e6da4); }
.bg-stat-green { background: linear-gradient(135deg, #1a7a4a, #2ead6e); }
.bg-stat-red { background: linear-gradient(135deg, #9b2226, #c1464a); }
.bg-stat-orange { background: linear-gradient(135deg, #b05a00, #f0a500); }
.bg-stat-purple { background: linear-gradient(135deg, #4a1680, #7b33c0); }
.bg-stat-teal { background: linear-gradient(135deg, #0d6e6e, #1ab5b5); }

/* ---- TABLES ---- */
.table { font-size: .875rem; }
.table th { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #666; background: #f8f9fa; }
.table tbody tr:hover { background: #f0f7ff; }

/* ---- FORMS ---- */
.form-label { font-weight: 600; font-size: .85rem; color: #444; }
.form-control, .form-select { border-radius: 8px; border: 1.5px solid #e0e0e0; font-size: .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,58,92,.1); }

/* ---- BUTTONS ---- */
.btn { border-radius: 8px; font-size: .87rem; font-weight: 500; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* ---- BADGES ---- */
.badge { font-size: .72rem; padding: .35em .65em; border-radius: 6px; }

/* ---- LOGIN PAGE ---- */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #2e6da4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-logo { width: 70px; height: 70px; background: var(--accent); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--primary); margin: 0 auto 16px; }

/* ---- PRINT STYLES ---- */
@media print {
    .sidebar, .topbar, .no-print, .btn { display: none !important; }
    #main-content { margin-left: 0 !important; }
    .content-area { padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .sidebar { width: var(--sidebar-collapsed); }
    .sidebar .brand-text, .sidebar .user-info, .sidebar .nav-label { display: none; }
    #main-content { margin-left: var(--sidebar-collapsed); }
}
