/* ============================================================
   Task Monitor — Standard Professional Theme
   ============================================================ */

/* Google Fonts: Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand */
    --primary:       #2563eb;
    --primary-light: #eff6ff;
    --primary-dark:  #1d4ed8;
    --accent:        #7c3aed;

    /* Surfaces */
    --bg:            #f1f5f9;
    --surface:       #ffffff;
    --surface-2:     #f8fafc;
    --sidebar-bg:    #0f172a;
    --sidebar-text:  #94a3b8;
    --sidebar-hover: #1e293b;
    --sidebar-active:#2563eb;

    /* Text */
    --text-primary:  #0f172a;
    --text-secondary:#475569;
    --text-muted:    #94a3b8;

    /* Borders & Shadow */
    --border:        #e2e8f0;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:     0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:     0 10px 40px rgba(0,0,0,.14);

    /* Status */
    --pending:   #f59e0b;
    --progress:  #3b82f6;
    --completed: #10b981;
    --danger:    #ef4444;

    /* Sizes */
    --sidebar-w:    240px;
    --topbar-h:     64px;
    --radius:       12px;
    --radius-sm:    8px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,.25) 0%, transparent 70%);
    top: -100px; right: -100px;
    pointer-events: none;
}
.login-page::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(124,58,237,.18) 0%, transparent 70%);
    bottom: -50px; left: -50px;
    pointer-events: none;
}
.login-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 60px rgba(0,0,0,.4);
    position: relative;
    z-index: 1;
}
.login-logo {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #fff;
    margin: 0 auto 16px;
    box-shadow: 0 8px 20px rgba(37,99,235,.4);
}
.login-title { color: #fff; font-size: 24px; font-weight: 700; text-align: center; }
.login-subtitle { color: rgba(255,255,255,.5); font-size: 13px; text-align: center; margin-top: 4px; }
.login-form { margin-top: 32px; }
.login-form .form-label { color: rgba(255,255,255,.7); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.login-input {
    background: rgba(255,255,255,.06) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    color: #fff !important;
    border-radius: var(--radius-sm) !important;
    padding: 10px 14px !important;
    transition: all .2s;
}
.login-input:focus {
    background: rgba(255,255,255,.1) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,.25) !important;
    outline: none;
}
.login-input::placeholder { color: rgba(255,255,255,.3) !important; }
.login-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: #fff;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 4px 14px rgba(37,99,235,.4);
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,.5); }
.login-alert { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; }

/* ============================================================
   MAIN APP LAYOUT  (Sidebar + Content)
   ============================================================ */
.app-wrapper { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform .3s ease;
}
.sidebar-brand {
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    text-decoration: none;
}
.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff;
    flex-shrink: 0;
}
.brand-name { color: #fff; font-size: 16px; font-weight: 700; letter-spacing: -.3px; }
.brand-sub  { color: var(--sidebar-text); font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-section-label {
    color: rgba(148,163,184,.5);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 4px 8px 8px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all .2s;
    margin-bottom: 2px;
}
.sidebar-link i { font-size: 16px; flex-shrink: 0; }
.sidebar-link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-link.active { background: rgba(37,99,235,.2); color: var(--primary); border-left: 3px solid var(--primary); padding-left: 9px; }
.sidebar-link.admin-link { color: #fbbf24; }
.sidebar-link.admin-link:hover { background: rgba(251,191,36,.1); color: #fbbf24; }

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.user-info-sidebar {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
}
.user-avatar {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: #fff; font-weight: 700;
    flex-shrink: 0;
}
.user-name-sidebar { color: #fff; font-size: 13px; font-weight: 600; line-height: 1.2; }
.user-role-sidebar { color: var(--sidebar-text); font-size: 11px; }
.logout-btn-sidebar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    background: none; border: none;
    color: var(--sidebar-text);
    font-size: 13px; font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-sm);
    width: 100%;
    transition: all .2s;
    cursor: pointer;
}
.logout-btn-sidebar:hover { background: rgba(239,68,68,.1); color: #ef4444; }

/* ---------- Main Content ---------- */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- Topbar ---------- */
.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: var(--shadow-sm);
}
.topbar-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.topbar-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Page Body ---------- */
.page-body { flex: 1; padding: 24px; }

/* ============================================================
   COMPONENTS
   ============================================================ */

/* --- Cards --- */
.card-std {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-std-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-std-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.card-std-body { padding: 20px; }

/* --- Stat Cards --- */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.stat-icon.blue   { background: #eff6ff; color: var(--primary); }
.stat-icon.green  { background: #ecfdf5; color: var(--completed); }
.stat-icon.amber  { background: #fffbeb; color: var(--pending); }
.stat-icon.red    { background: #fef2f2; color: var(--danger); }
.stat-icon.purple { background: #f5f3ff; color: var(--accent); }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

/* --- Filter Bar --- */
.filter-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.filter-input, .filter-select {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--surface);
    font-family: 'Inter', sans-serif;
    transition: all .2s;
    height: 36px;
}
.filter-input:focus, .filter-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.filter-select { cursor: pointer; min-width: 130px; }

/* --- Buttons --- */
.btn-primary-std {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    height: 36px;
}
.btn-primary-std:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.3); color: #fff; }

.btn-secondary-std {
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
    font-family: 'Inter', sans-serif;
    height: 36px;
}
.btn-secondary-std:hover { background: var(--bg); border-color: #cbd5e1; }

/* --- Task Cards --- */
.task-card-std {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    cursor: pointer;
    transition: all .2s;
    border-left: 4px solid transparent;
    box-shadow: var(--shadow-sm);
    animation: fadeUp .3s ease forwards;
}
.task-card-std:hover { box-shadow: var(--shadow-md); transform: translateX(3px); border-color: var(--primary) transparent transparent transparent; }
.task-card-std.company  { border-left-color: #3b82f6; }
.task-card-std.personal { border-left-color: #f59e0b; }
.task-card-title { font-size: 14px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.task-card-meta  { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.task-card-remarks { font-size: 12px; color: var(--text-secondary); background: var(--surface-2); border-radius: 6px; padding: 6px 10px; margin-top: 8px; border-left: 3px solid var(--border); }
.task-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }

/* --- Status Badges --- */
.badge-std {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.badge-pending   { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge-progress  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-completed { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-longterm  { background: #f5f3ff; color: #5b21b6; border: 1px solid #ddd6fe; }
.badge-single    { background: #f8fafc; color: #64748b; border: 1px solid var(--border); }
.badge-company   { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-personal  { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Dot indicators */
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-pending   { background: var(--pending); }
.dot-progress  { background: var(--progress); }
.dot-completed { background: var(--completed); }

/* --- Section Headers --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.section-title { font-size: 14px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.section-count {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

/* --- Priority Banner --- */
.priority-banner {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}
.priority-banner-title {
    font-size: 13px;
    font-weight: 700;
    color: #c2410c;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.priority-count-badge {
    background: #ea580c;
    color: #fff;
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 11px;
}

/* --- Modal Overrides (Bootstrap) --- */
.modal-content {
    border-radius: var(--radius) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-lg) !important;
}
.modal-header {
    border-bottom: 1px solid var(--border) !important;
    padding: 16px 20px !important;
}
.modal-body { padding: 20px !important; }
.modal-title { font-size: 15px !important; font-weight: 700 !important; color: var(--text-primary) !important; }
.modal-form-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.modal-input {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 13px !important;
    color: var(--text-primary) !important;
    background: var(--surface) !important;
    font-family: 'Inter', sans-serif !important;
    transition: all .2s !important;
}
.modal-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12) !important;
}
.modal-input:disabled, .modal-input[readonly] { background: var(--surface-2) !important; color: var(--text-muted) !important; }
.btn-close { color: var(--text-muted) !important; }

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    background: var(--surface-2);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}
.empty-state i { font-size: 36px; display: block; margin-bottom: 8px; opacity: .5; }
.empty-state p { font-size: 13px; }

/* --- Animations --- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Reports Page --- */
.report-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all .2s;
}
.report-stat-card:hover { box-shadow: var(--shadow-md); }
.report-stat-value { font-size: 36px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.report-stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* --- Scrollbar (webkit) --- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

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