/* ============================================================================
   INFOSET PROJECT MANAGER - Stylesheet
   ============================================================================ */

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #1E293B;
    --sidebar-text: #CBD5E1;
    --sidebar-active: #3B82F6;
    --topbar-height: 60px;
    --primary: #3B82F6;
    --primary-dark: #2563EB;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    background: #F1F5F9;
    margin: 0;
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform .3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    gap: .75rem;
}

.sidebar-logo { height: 36px; }
.sidebar-brand { font-size: 1.1rem; font-weight: 600; color: #fff; }

.sidebar-nav {
    list-style: none;
    padding: .75rem 0;
    margin: 0;
    flex: 1;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.25rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: .9rem;
    transition: all .15s;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.sidebar-nav li.active a {
    background: rgba(59,130,246,.15);
    color: #fff;
    border-left-color: var(--sidebar-active);
    font-weight: 500;
}

.sidebar-nav li a i { font-size: 1.1rem; width: 22px; text-align: center; }

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,.1);
    margin: .5rem 1rem;
}

.sidebar-heading {
    padding: .25rem 1.25rem;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: rgba(255,255,255,.35);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.user-info i { font-size: 1.5rem; }
.user-name { font-size: .85rem; font-weight: 500; color: #fff; }
.user-role { font-size: .7rem; color: var(--sidebar-text); }

/* MAIN CONTENT */
#main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    transition: margin .3s ease;
}

.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    color: #1E293B;
}

.topbar-actions { display: flex; gap: .5rem; }

.sidebar-toggle {
    font-size: 1.3rem;
    color: #64748B;
    display: none;
}

.content-wrapper {
    padding: 1.5rem;
}

/* Sidebar collapse */
.sidebar-collapsed .sidebar { transform: translateX(-100%); }
.sidebar-collapsed #main-content { margin-left: 0; }
.sidebar-collapsed .sidebar-toggle { display: block; }

@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    #main-content { margin-left: 0; }
    .sidebar-toggle { display: block !important; }
    body:not(.sidebar-collapsed) .sidebar { transform: translateX(0); }
}

/* STAT CARDS */
.stat-card {
    background: #fff;
    border-radius: .75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px; height: 48px;
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
}

.stat-card-primary .stat-icon { background: #3B82F6; }
.stat-card-success .stat-icon { background: #10B981; }
.stat-card-warning .stat-icon { background: #F59E0B; }
.stat-card-danger .stat-icon  { background: #EF4444; }

.stat-value { font-size: 1.75rem; font-weight: 700; color: #1E293B; line-height: 1; }
.stat-label { font-size: .8rem; color: #64748B; }

/* CARDS */
.card {
    border: 1px solid #E2E8F0;
    border-radius: .75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    background: #fff;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #E2E8F0;
    padding: .85rem 1.25rem;
}

.card-header h5, .card-header h6 { color: #334155; }

/* PROJECT CARD */
.project-card {
    transition: transform .15s, box-shadow .15s;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

/* PHASE TIMELINE */
.phase-timeline {
    position: relative;
    padding-left: 2rem;
}

.phase-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #E2E8F0;
}

.phase-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.phase-dot {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .7rem;
    transform: translateX(-4px);
    z-index: 1;
}

.phase-content {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: .5rem;
    padding: .75rem 1rem;
}

/* TABLE */
.table { font-size: .875rem; }
.table th {
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #64748B;
    border-bottom: 2px solid #E2E8F0;
}

/* LOGIN PAGE */
.login-page {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container { width: 100%; max-width: 420px; padding: 1rem; }

.login-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.login-header { text-align: center; margin-bottom: 2rem; }
.login-header h2 { color: #1E293B; margin: .75rem 0 .25rem; }
.login-logo { height: 48px; }

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #E2E8F0;
    font-size: .8rem;
}

/* ANIMATIONS */
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* BADGES */
.badge { font-weight: 500; font-size: .75rem; }

/* RESPONSIVE TABLE */
@media (max-width: 768px) {
    .content-wrapper { padding: 1rem; }
    .stat-card { flex-direction: column; text-align: center; gap: .5rem; padding: 1rem; }
}
