/* ============================================================
   PROJECT PULSE  —  site.css  (v2, fixed)
   Font: Plus Jakarta Sans
   Bootstrap 5 is loaded BEFORE this file — we only override
   and extend, we never re-declare Bootstrap utilities.
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --pp-primary:       #4F46E5;
    --pp-primary-lt:    #EEF2FF;
    --pp-primary-dk:    #3730A3;
    --pp-secondary:     #06B6D4;
    --pp-success:       #10B981;
    --pp-warning:       #F59E0B;
    --pp-danger:        #EF4444;
    --pp-info:          #3B82F6;
    --pp-purple:        #8B5CF6;

    --pp-bg:            #F0F4FF;
    --pp-card:          #FFFFFF;
    --pp-sidebar:       #1E1B4B;

    --pp-text:          #0F172A;
    --pp-text-2:        #475569;
    --pp-text-muted:    #94A3B8;
    --pp-border:        #E2E8F0;
    --pp-border-lt:     #F1F5F9;

    --pp-shadow-sm:     0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --pp-shadow:        0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --pp-shadow-md:     0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
    --pp-shadow-lg:     0 20px 25px -5px rgba(0,0,0,.10), 0 8px 10px -6px rgba(0,0,0,.06);

    --pp-sidebar-w:     260px;
    --pp-topbar-h:      64px;
    --pp-r:             12px;
    --pp-r-sm:          8px;
    --pp-transition:    .18s ease;

    /* ── Backward-compatible aliases (used in view inline styles) ── */
    --primary:          #4F46E5;
    --primary-light:    #EEF2FF;
    --primary-dark:     #3730A3;
    --secondary:        #06B6D4;
    --success:          #10B981;
    --warning:          #F59E0B;
    --danger:           #EF4444;
    --info:             #3B82F6;
    --purple:           #8B5CF6;
    --bg-page:          #F0F4FF;
    --bg-card:          #FFFFFF;
    --text-primary:     #0F172A;
    --text-secondary:   #475569;
    --text-muted:       #94A3B8;
    --border:           #E2E8F0;
    --border-light:     #F1F5F9;
    --radius:           12px;
    --radius-sm:        8px;
    --shadow-sm:        0 1px 3px rgba(0,0,0,.06);
    --shadow-md:        0 10px 15px -3px rgba(0,0,0,.08);
    --shadow-lg:        0 20px 25px -5px rgba(0,0,0,.10), 0 8px 10px -6px rgba(0,0,0,.06);
    --transition:       .18s ease;
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Auth layout (login page) ───────────────────────────────── */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 45%, #4338CA 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── App layout shell ───────────────────────────────────────── */
.app-body { background: var(--pp-bg); min-height: 100vh; }

/* ── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--pp-sidebar-w);
    background: var(--pp-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: transform var(--pp-transition);
    overflow: hidden;
}
.sidebar-header {
    padding: 18px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    border-radius: var(--pp-r-sm);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px;
    box-shadow: 0 4px 12px rgba(99,102,241,.4);
    flex-shrink: 0;
}
.brand-name { font-size: 18px; color: #fff; font-weight: 500; letter-spacing: -.3px; }
.brand-name strong { font-weight: 800; }
.sidebar-close-btn {
    background: none; border: none; color: rgba(255,255,255,.4);
    font-size: 18px; cursor: pointer; padding: 0;
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 14px 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.08) transparent;
}
.nav-section { margin-bottom: 22px; }
.nav-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    padding: 0 12px;
    margin-bottom: 6px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--pp-r-sm);
    color: rgba(255,255,255,.62);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--pp-transition);
    position: relative;
    margin-bottom: 1px;
}
.nav-link i { font-size: 16px; flex-shrink: 0; }
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active {
    background: linear-gradient(90deg, rgba(99,102,241,.28), rgba(99,102,241,.10));
    color: #fff;
    box-shadow: inset 2px 0 0 #818CF8;
}
.nav-badge {
    margin-left: auto;
    background: var(--pp-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center; justify-content: center;
    padding: 0 5px;
}

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff;
    flex-shrink: 0; text-transform: uppercase;
}
.user-details { min-width: 0; }
.user-name {
    font-size: 13px; font-weight: 700; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role { font-size: 11px; color: rgba(255,255,255,.38); }
.logout-btn {
    color: rgba(255,255,255,.35);
    font-size: 18px;
    transition: color var(--pp-transition);
    text-decoration: none;
    flex-shrink: 0;
}
.logout-btn:hover { color: var(--pp-danger); }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1039;
}
.sidebar-overlay.show { display: block; }

/* ── MAIN CONTENT ───────────────────────────────────────────── */
.main-content {
    margin-left: var(--pp-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── TOPBAR ─────────────────────────────────────────────────── */
.topbar {
    height: var(--pp-topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--pp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--pp-shadow-sm);
    flex-shrink: 0;
}
.topbar-left  { display: flex; align-items: center; gap: 14px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }

.menu-toggle {
    width: 36px; height: 36px;
    background: none; border: none;
    border-radius: var(--pp-r-sm);
    cursor: pointer;
    color: var(--pp-text-2);
    font-size: 22px;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--pp-transition);
}
.menu-toggle:hover { background: var(--pp-bg); color: var(--pp-text); }

.page-breadcrumb {
    font-size: 14px;
    font-weight: 600;
    color: var(--pp-text);
    display: flex;
    align-items: center;
    gap: 0;
}

/* Global Timer */
.global-timer {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #FFFBEB;
    border: 1.5px solid #FDE68A;
    border-radius: var(--pp-r);
    padding: 6px 14px;
    font-size: 13px;
    color: #92400E;
}
@keyframes pulseAnim { 0%,100%{opacity:1} 50%{opacity:.4} }
.pulse-anim { animation: pulseAnim 1.8s infinite; }
.timer-task-name { font-size: 11px; opacity: .7; max-width: 120px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Topbar icon button (bell) */
.topbar-icon-btn {
    width: 38px; height: 38px;
    background: none; border: none;
    border-radius: var(--pp-r-sm);
    cursor: pointer;
    color: var(--pp-text-2);
    font-size: 17px;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--pp-transition);
    position: relative;
}
.topbar-icon-btn:hover { background: var(--pp-primary-lt); color: var(--pp-primary); }
.notif-dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 9px; height: 9px;
    background: var(--pp-danger);
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Notification Panel dropdown */
.notif-panel {
    width: 360px !important;
    max-height: 480px;
    border: 1px solid var(--pp-border) !important;
    border-radius: var(--pp-r) !important;
    box-shadow: var(--pp-shadow-lg) !important;
    overflow: hidden;
    padding: 0 !important;
    margin-top: 8px !important;
}
.notif-panel-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--pp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
}
.notif-panel-body {
    overflow-y: auto;
    max-height: 340px;
    background: #fff;
}
.notif-panel-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--pp-border);
    text-align: center;
    background: var(--pp-bg);
    font-size: 13px;
}

/* Notification items */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--pp-border-lt);
    transition: background var(--pp-transition);
    cursor: pointer;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--pp-bg); }
.notif-item.notif-unread { background: #FAFBFF; }

.notif-item-ic {
    width: 36px; height: 36px;
    border-radius: var(--pp-r-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.notif-item-txt { flex: 1; min-width: 0; }
.notif-item-title { font-size: 13px; font-weight: 700; color: var(--pp-text); }
.notif-item-msg   { font-size: 12px; color: var(--pp-text-2); margin-top: 2px; line-height: 1.4; }
.notif-item-ts    { font-size: 11px; color: var(--pp-text-muted); margin-top: 3px; }
.notif-unread-dot {
    width: 8px; height: 8px;
    background: var(--pp-primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

/* Topbar user button */
.topbar-user-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 10px 5px 6px;
    background: none; border: none;
    border-radius: var(--pp-r);
    cursor: pointer;
    transition: background var(--pp-transition);
}
.topbar-user-btn:hover { background: var(--pp-bg); }
.topbar-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff;
    text-transform: uppercase; flex-shrink: 0;
}
.topbar-uname { font-size: 13px; font-weight: 700; color: var(--pp-text); }

/* ── PAGE BODY ──────────────────────────────────────────────── */
.page-body {
    padding: 24px;
    flex: 1;
}

/* ── PAGE HEADER ────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-title   { font-size: 22px; font-weight: 800; color: var(--pp-text); margin: 0; }
.page-subtitle{ font-size: 13px; color: var(--pp-text-muted); margin: 2px 0 0; }

/* ── CARDS ──────────────────────────────────────────────────── */
/* Override Bootstrap card to match our design */
.card {
    border: 1px solid var(--pp-border) !important;
    border-radius: var(--pp-r) !important;
    box-shadow: var(--pp-shadow-sm) !important;
    background: var(--pp-card) !important;
}
.card-header {
    background: var(--pp-card) !important;
    border-bottom: 1px solid var(--pp-border-lt) !important;
    padding: 14px 20px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-body {
    padding: 20px !important;
}
.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--pp-text);
    margin: 0;
}

/* ── STAT CARDS ─────────────────────────────────────────────── */
.stat-card {
    background: var(--pp-card);
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-r);
    padding: 20px;
    box-shadow: var(--pp-shadow-sm);
    transition: transform var(--pp-transition), box-shadow var(--pp-transition);
    position: relative;
    overflow: hidden;
    height: 100%;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--pp-shadow-md); }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--pp-r) var(--pp-r) 0 0;
}
.stat-card.primary::before { background: linear-gradient(90deg, var(--pp-primary), var(--pp-purple)); }
.stat-card.success::before { background: linear-gradient(90deg, var(--pp-success), #34D399); }
.stat-card.warning::before { background: linear-gradient(90deg, var(--pp-warning), #FBBF24); }
.stat-card.danger::before  { background: linear-gradient(90deg, var(--pp-danger), #F87171); }
.stat-card.info::before    { background: linear-gradient(90deg, var(--pp-info), #60A5FA); }
.stat-card.purple::before  { background: linear-gradient(90deg, var(--pp-purple), #A78BFA); }

.stat-icon {
    width: 44px; height: 44px;
    border-radius: var(--pp-r-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}
.stat-icon.primary { background: var(--pp-primary-lt); color: var(--pp-primary); }
.stat-icon.success { background: #D1FAE5; color: var(--pp-success); }
.stat-icon.warning { background: #FEF3C7; color: var(--pp-warning); }
.stat-icon.danger  { background: #FEE2E2; color: var(--pp-danger); }
.stat-icon.info    { background: #DBEAFE; color: var(--pp-info); }
.stat-icon.purple  { background: #EDE9FE; color: var(--pp-purple); }

.stat-value { font-size: 28px; font-weight: 800; color: var(--pp-text); line-height: 1.1; }
.stat-label { font-size: 12.5px; color: var(--pp-text-2); margin-top: 4px; font-weight: 600; }
.stat-sub   { font-size: 11.5px; color: var(--pp-text-muted); margin-top: 6px; }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge { font-family: inherit; font-weight: 700; padding: .3em .65em; }

/* Project status badges */
.badge-planning   { background: #EDE9FE !important; color: #5B21B6 !important; }
.badge-inprogress { background: #DBEAFE !important; color: #1D4ED8 !important; }
.badge-onhold     { background: #FEF3C7 !important; color: #92400E !important; }
.badge-completed  { background: #D1FAE5 !important; color: #065F46 !important; }
.badge-cancelled  { background: #F1F5F9 !important; color: #475569 !important; }

/* Task status badges */
.status-todo       { background: #F1F5F9; color: #475569; }
.status-inprogress { background: #DBEAFE; color: #1D4ED8; }
.status-review     { background: #FEF3C7; color: #92400E; }
.status-approved   { background: #D1FAE5; color: #065F46; }
.status-blocked    { background: #FEE2E2; color: #991B1B; }
.status-cancelled  { background: #F1F5F9; color: #94A3B8; }

/* Task priority badges */
.priority-critical { background: #FEE2E2; color: #991B1B; }
.priority-high     { background: #FEF3C7; color: #92400E; }
.priority-medium   { background: #DBEAFE; color: #1D4ED8; }
.priority-low      { background: #F0FDF4; color: #166534; }

/* ── FORMS ──────────────────────────────────────────────────── */
.form-label { font-size: 13px; font-weight: 700; color: var(--pp-text); margin-bottom: 5px; }
.form-control, .form-select {
    font-family: inherit;
    font-size: 14px;
    border: 1.5px solid var(--pp-border);
    border-radius: var(--pp-r-sm);
    padding: .5rem .8rem;
    color: var(--pp-text);
    transition: border-color var(--pp-transition), box-shadow var(--pp-transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--pp-primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
    outline: none;
}
textarea.form-control { min-height: 90px; resize: vertical; }
.form-control-sm, .form-select-sm { font-size: 13px; padding: .3rem .65rem; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn { font-family: inherit; font-weight: 700; border-radius: var(--pp-r-sm); }
.btn-primary { background: var(--pp-primary) !important; border-color: var(--pp-primary) !important; }
.btn-primary:hover { background: var(--pp-primary-dk) !important; border-color: var(--pp-primary-dk) !important; }
.btn-outline-primary { color: var(--pp-primary); border-color: var(--pp-primary); }
.btn-outline-primary:hover { background: var(--pp-primary); color: #fff; }

/* Timer button */
.timer-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px;
    border-radius: var(--pp-r-sm);
    font-size: 13px; font-weight: 700;
    cursor: pointer;
    border: 2px solid;
    transition: all var(--pp-transition);
    background: none;
}
.timer-btn.start { border-color: var(--pp-success); color: #065F46; background: #D1FAE5; }
.timer-btn.start:hover { background: var(--pp-success); color: #fff; }
.timer-btn.stop  { border-color: var(--pp-danger);  color: #991B1B; background: #FEE2E2; }
.timer-btn.stop:hover  { background: var(--pp-danger);  color: #fff; }

/* ── KANBAN BOARD ────────────────────────────────────────────── */
.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: 520px;
    align-items: flex-start;
}
.kanban-col {
    min-width: 268px;
    max-width: 290px;
    flex-shrink: 0;
    background: #F8FAFD;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-r);
    padding: 12px;
}
.kanban-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 2px;
}
.kanban-col-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--pp-text);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.kanban-col-count {
    width: 22px; height: 22px;
    background: #fff;
    border: 1px solid var(--pp-border);
    border-radius: 50%;
    font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    color: var(--pp-text-2);
}

/* ── KANBAN CARD — clean, no thick left strips ─────────────── */
.kanban-card {
    background: #fff;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-r-sm);
    padding: 13px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform var(--pp-transition), box-shadow var(--pp-transition), border-color var(--pp-transition);
    display: block;
    text-decoration: none !important;
    color: inherit !important;
}
.kanban-card:hover {
    box-shadow: var(--pp-shadow-md);
    transform: translateY(-2px);
    border-color: var(--pp-primary);
}
/* Subtle left accent — only 3px, via box-shadow so it doesn't affect layout */
.kanban-card.blocked  { box-shadow: inset 3px 0 0 var(--pp-danger), var(--pp-shadow-sm); }
.kanban-card.overdue  { box-shadow: inset 3px 0 0 var(--pp-warning), var(--pp-shadow-sm); }

.kanban-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--pp-text);
    line-height: 1.45;
    margin-bottom: 0;
}
.kanban-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 4px;
}
.kanban-card-assignees { display: flex; }
.assignee-dot {
    width: 22px; height: 22px;
    border-radius: 50%;
    font-size: 9px; font-weight: 800; color: #fff;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
    margin-left: -5px;
    text-transform: uppercase;
}
.assignee-dot:first-child { margin-left: 0; }

/* ── PROJECT STAGE TIMELINE ─────────────────────────────────── */
.stage-timeline { padding: 0; }
.stage-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid var(--pp-border-lt);
}
.stage-item:last-child { border-bottom: none; }
.stage-dot {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800;
    flex-shrink: 0;
    border: 2px solid;
}
.stage-dot.completed { background: var(--pp-success); border-color: var(--pp-success); color: #fff; }
.stage-dot.active    { background: var(--pp-primary-lt); border-color: var(--pp-primary); color: var(--pp-primary); }
.stage-dot.overdue   { background: #FEE2E2; border-color: var(--pp-danger); color: var(--pp-danger); }
.stage-dot.upcoming  { background: #F8FAFC; border-color: var(--pp-border); color: var(--pp-text-muted); }
.stage-content { flex: 1; min-width: 0; }
.stage-name   { font-weight: 700; font-size: 14px; color: var(--pp-text); }
.stage-dates  { font-size: 12px; color: var(--pp-text-muted); margin-top: 2px; }
.stage-assignees { font-size: 12px; color: var(--pp-text-2); margin-top: 3px; }

/* ── AMC USAGE BAR ──────────────────────────────────────────── */
.amc-usage-bar {
    height: 8px;
    background: var(--pp-border);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 6px;
}
.amc-usage-fill {
    height: 100%;
    border-radius: 99px;
    transition: width .5s ease;
}

/* ── TABLE ──────────────────────────────────────────────────── */
.table { font-size: 13.5px; }
.table th {
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--pp-text-muted);
    border-bottom: 2px solid var(--pp-border) !important;
    padding: .65rem 1rem !important;
    background: var(--pp-bg);
}
.table td {
    padding: .72rem 1rem !important;
    border-color: var(--pp-border-lt) !important;
    vertical-align: middle;
}
.table-hover tbody tr:hover { background: #FAFBFF !important; }

/* ── VIEW TABS ──────────────────────────────────────────────── */
.view-tabs {
    display: flex;
    background: var(--pp-bg);
    border-radius: var(--pp-r-sm);
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--pp-border);
}
.view-tab {
    padding: 6px 14px;
    border-radius: 6px;
    border: none; background: none;
    font-family: inherit;
    font-size: 13px; font-weight: 700;
    color: var(--pp-text-2);
    cursor: pointer;
    transition: all var(--pp-transition);
    display: flex; align-items: center; gap: 5px;
}
.view-tab.active { background: #fff; color: var(--pp-primary); box-shadow: var(--pp-shadow-sm); }

/* ── TOAST ──────────────────────────────────────────────────── */
.pp-toast {
    position: fixed;
    top: 76px; right: 24px;
    background: #fff;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-r);
    padding: 13px 18px;
    box-shadow: var(--pp-shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    max-width: 360px;
    animation: toastIn .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes toastIn { from { transform: translateX(120%); opacity:0; } to { transform: translateX(0); opacity:1; } }
.pp-toast-success { border-left: 4px solid var(--pp-success); }
.pp-toast-success i { color: var(--pp-success); font-size: 18px; }
.pp-toast-error   { border-left: 4px solid var(--pp-danger); }
.pp-toast-error i  { color: var(--pp-danger); font-size: 18px; }
.pp-toast button { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--pp-text-muted); font-size: 18px; padding: 0; }

/* ── PROJECT CARDS ──────────────────────────────────────────── */
.project-card {
    transition: transform var(--pp-transition), box-shadow var(--pp-transition);
    display: flex !important;
    flex-direction: column;
    height: 100%;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--pp-shadow-md) !important; }
.project-card-top  { padding: 20px 20px 0; flex: 1; }
.project-card-body { padding: 14px 20px 0; }
.project-card-footer {
    padding: 13px 20px;
    border-top: 1px solid var(--pp-border-lt);
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.project-name   { font-size: 15px; font-weight: 800; color: var(--pp-text); margin: 0 0 4px; }
.project-client { font-size: 12px; color: var(--pp-text-2); margin: 0 0 8px; }
.project-desc   { font-size: 12.5px; color: var(--pp-text-muted); line-height: 1.55; margin: 0; }

.project-type-badge {
    font-size: 11px; font-weight: 700;
    padding: 3px 8px; border-radius: 5px;
    display: inline-flex; align-items: center; gap: 4px;
}
.project-type-badge.ongoing { background: #EEF2FF; color: var(--pp-primary); }
.project-type-badge.legacy  { background: #F1F5F9; color: #475569; }

.project-stats  { display: flex; gap: 12px; flex-wrap: wrap; }
.pstat { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--pp-text-2); }
.team-info { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--pp-text-muted); }

/* ── AMC CARDS ──────────────────────────────────────────────── */
.amc-card { transition: transform var(--pp-transition), box-shadow var(--pp-transition); }
.amc-card:hover { transform: translateY(-2px); box-shadow: var(--pp-shadow-md) !important; }
.amc-card.amc-critical { border-top: 3px solid var(--pp-danger) !important; }
.amc-card.amc-warning  { border-top: 3px solid var(--pp-warning) !important; }
.amc-card-name   { font-size: 15px; font-weight: 800; color: var(--pp-text); }
.amc-card-client { font-size: 12px; color: var(--pp-text-muted); }
.amc-stats-row   { display: flex; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--pp-border-lt); }
.amc-stat { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--pp-text-2); }
.amc-alert-chip {
    margin-top: 8px; padding: 5px 10px;
    border-radius: 6px; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; gap: 6px;
}
.amc-alert-chip.critical { background: #FEE2E2; color: #991B1B; }
.amc-alert-chip.warning  { background: #FFFBEB; color: #92400E; }

/* ── TASK DETAIL ─────────────────────────────────────────────── */
.comment-item { display: flex; gap: 12px; margin-bottom: 16px; }
.comment-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff;
    flex-shrink: 0; text-transform: uppercase;
}
.comment-body { flex: 1; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.comment-text {
    font-size: 13.5px; color: var(--pp-text);
    background: var(--pp-bg); padding: 8px 12px;
    border-radius: 0 8px 8px 8px; margin: 0;
}
.detail-list { display: flex; flex-direction: column; gap: 9px; }
.detail-row {
    display: flex; justify-content: space-between; align-items: flex-start;
    font-size: 13px; border-bottom: 1px solid var(--pp-border-lt); padding-bottom: 9px; gap: 8px;
}
.detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.detail-label { color: var(--pp-text-muted); font-weight: 600; flex-shrink: 0; }
.detail-val   { font-weight: 700; color: var(--pp-text); text-align: right; }

/* ── NOTIFICATION PAGE ──────────────────────────────────────── */
.notification-row {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--pp-border-lt);
    transition: background var(--pp-transition);
}
.notification-row:last-child { border-bottom: none; }
.notification-row:hover { background: var(--pp-bg); }
.notification-row.unread { background: #FAFBFF; }
.notif-icon-wrap {
    width: 40px; height: 40px;
    border-radius: var(--pp-r-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.notif-content { flex: 1; }
.notif-title   { font-size: 14px; font-weight: 700; color: var(--pp-text); }
.notif-message { font-size: 13px; color: var(--pp-text-2); margin-top: 2px; }
.notif-time    { font-size: 11px; color: var(--pp-text-muted); margin-top: 4px; }
.unread-dot    { width: 8px; height: 8px; background: var(--pp-primary); border-radius: 50%; flex-shrink: 0; margin-top: 4px; }

/* ── EMPTY STATE ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 56px 20px; color: var(--pp-text-muted); }
.empty-state i { font-size: 46px; opacity: .35; display: block; margin-bottom: 14px; }
.empty-state h5 { font-size: 16px; font-weight: 700; color: var(--pp-text-2); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; margin: 0; }

/* ── TEXT TRUNCATION ─────────────────────────────────────────── */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── HELPERS ─────────────────────────────────────────────────── */
.fw-600  { font-weight: 600 !important; }
.fw-700  { font-weight: 700 !important; }
.fw-800  { font-weight: 800 !important; }
.text-primary-pp { color: var(--pp-primary) !important; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin .8s linear infinite; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
    .sidebar-close-btn { display: flex !important; }
}
@media (max-width: 767.98px) {
    .page-body { padding: 16px; }
    .kanban-board { min-height: 400px; }
}

/* ── CHART CONTAINERS ────────────────────────────────────────── */
.chart-container { position: relative; }

/* ── PROGRESS ────────────────────────────────────────────────── */
.progress { border-radius: 99px !important; background: var(--pp-bg) !important; }
.progress-bar { border-radius: 99px !important; }

/* ── ASSIGNEE PICKER (Create Task) ──────────────────────────── */
.assignee-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.assignee-option input[type="checkbox"] { display: none; }
.assignee-card {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid var(--pp-border);
    border-radius: var(--pp-r);
    cursor: pointer;
    transition: all var(--pp-transition);
    background: var(--pp-card);
    user-select: none;
}
.assignee-option input:checked + .assignee-card {
    border-color: var(--pp-primary);
    background: var(--pp-primary-lt);
}
.assignee-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff;
    text-transform: uppercase; flex-shrink: 0;
}

/* ── STAGE FORM (Create Project) ────────────────────────────── */
.stage-form-item { display: flex; gap: 12px; align-items: flex-start; }
.stage-form-number {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--pp-primary-lt); color: var(--pp-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; flex-shrink: 0; margin-top: 5px;
}
.stage-form-fields { flex: 1; }

/* LOGIN PAGE ─────────────────────────────────────────────────── */
.login-wrapper {
    width: 100%;
    max-width: 460px;
    padding: 20px 16px;
}
.login-card {
    background: rgba(255,255,255,.97);
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 25px 50px rgba(0,0,0,.25);
}
.login-header { text-align: center; margin-bottom: 22px; }
.login-title  { font-size: 26px; font-weight: 800; color: var(--pp-text); margin: 0 0 4px; }
.login-sub    { color: var(--pp-text-2); font-size: 14px; }
.login-footer { text-align: center; color: rgba(255,255,255,.5); font-size: 12px; margin-top: 18px; }

/* Demo credentials box */
.demo-creds {
    background: #F8FAFF;
    border: 1.5px dashed #C7D2FE;
    border-radius: var(--pp-r);
    padding: 13px;
    margin-bottom: 20px;
}
.demo-creds-header {
    display: flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 700;
    color: var(--pp-primary); margin-bottom: 9px;
}
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 9px; }
.demo-item {
    display: flex; align-items: center; gap: 7px;
    background: #fff; border: 1px solid var(--pp-border);
    border-radius: var(--pp-r-sm);
    padding: 7px 10px; cursor: pointer;
    transition: all .15s; font-size: 12px;
}
.demo-item:hover { border-color: var(--pp-primary); background: var(--pp-primary-lt); }
.demo-item code { font-size: 12px; color: var(--pp-text); font-weight: 700; }
.demo-role { font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 4px; white-space: nowrap; }
.demo-role.admin { background: #EDE9FE; color: #5B21B6; }
.demo-role.pm    { background: #DBEAFE; color: #1D4ED8; }
.demo-role.dev   { background: #D1FAE5; color: #065F46; }
.demo-note { font-size: 11px; color: var(--pp-text-muted); margin: 0; }

.input-wrap { position: relative; }
.input-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--pp-text-muted); font-size: 16px; pointer-events: none; z-index: 1;
}
.ps-login { padding-left: 40px !important; }
.pw-toggle {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--pp-text-muted); font-size: 16px; z-index: 1;
}
.btn-login {
    height: 46px; font-size: 15px; font-weight: 800;
    background: linear-gradient(135deg, #4F46E5, #6366F1) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(79,70,229,.35) !important;
    transition: all .2s;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,70,229,.45) !important; }
