/* =========================================================
   BASE / RESET
   ========================================================= */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #111a2d;
}

body { background: #fff; }

button, input, select { font: inherit; }

.hidden { display: none; }

/* =========================================================
   SHARED MESSAGES
   ========================================================= */
.error-box {
    padding: 12px 14px;
    background: #fff0f0;
    border: 1px solid #f0b6b6;
    border-radius: 6px;
    color: #a11;
    margin-bottom: 15px;
}

.success-box {
    padding: 12px 14px;
    background: #eefaf1;
    border: 1px solid #a9d9b5;
    border-radius: 6px;
    color: #17652c;
    margin-bottom: 15px;
}

.field-error {
    font-size: 12px;
    color: #c62828;
    margin-top: 4px;
}

.notice {
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* =========================================================
   AUTH LAYOUT (legacy — login/register use .login-page now)
   ========================================================= */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 52% 48%;
    background: #fff;
}

.auth-hero {
    position: relative;
    min-height: 100vh;
    background-image:
        linear-gradient(180deg, rgba(4, 53, 105, .08), rgba(3, 39, 83, .45)),
        url('../images/railway-hero.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
    color: #fff;
}

.auth-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 47, 99, .18), transparent 55%, rgba(0, 31, 70, .25));
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 55px 9%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hero-brand { display: flex; align-items: center; gap: 20px; }

.emblem {
    width: 92px;
    height: 92px;
    border: 2px solid #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 45px;
    background: rgba(0, 32, 72, .28);
}

.hero-brand-hi { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.hero-brand-en { font-size: 29px; font-weight: 700; letter-spacing: .2px; }
.hero-sub      { font-size: 19px; margin-top: 13px; }

.hero-line {
    width: 135px;
    height: 4px;
    background: #1c9af1;
    border-radius: 5px;
    margin: 45px 0 40px;
}

.hero-title {
    font-size: 36px;
    line-height: 1.3;
    max-width: 390px;
    margin: 0 0 18px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .35);
}

.hero-tagline { font-size: 21px; color: #dcecff; }

.hero-features {
    margin-top: auto;
    margin-bottom: 4%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 26px 16px;
    background: rgba(5, 64, 126, .64);
    border: 1px solid rgba(100, 185, 255, .4);
    border-radius: 14px;
    backdrop-filter: blur(5px);
}

.hero-feature {
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, .25);
    padding: 0 8px;
}
.hero-feature:last-child { border-right: 0; }
.feature-icon  { font-size: 31px; }
.feature-title { font-size: 16px; margin-top: 8px; line-height: 1.25; }

.auth-panel {
    padding: 8% 9%;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 100% 0, rgba(226, 239, 255, .65), transparent 28%),
        radial-gradient(circle at 100% 100%, rgba(226, 239, 255, .5), transparent 30%);
}

.auth-card     { width: min(590px, 100%); margin: 0 auto; }
.auth-title    { font-size: 40px; margin: 0 0 10px; color: #12214a; }
.auth-subtitle { font-size: 21px; color: #596f93; margin: 0 0 56px; }

.auth-form { display: flex; flex-direction: column; gap: 22px; }

.input-wrap { position: relative; }

.input-wrap input,
.input-wrap select {
    width: 100%;
    height: 74px;
    border: 1.5px solid #bdcce1;
    border-radius: 11px;
    padding: 0 50px 0 82px;
    font-size: 20px;
    color: #15233e;
    background: rgba(255, 255, 255, .86);
    outline: none;
}
.input-wrap input:focus,
.input-wrap select:focus {
    border-color: #0b6edb;
    box-shadow: 0 0 0 3px rgba(11, 110, 219, .1);
}

.input-icon {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    color: #10233f;
}

.password-eye {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: #0c2244;
    cursor: pointer;
    font-size: 24px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 17px;
    color: #233a60;
}
.checkbox-row input { width: 20px; height: 20px; margin: 0; }
.checkbox-row a,
.auth-link { color: #075ec4; text-decoration: none; }

.primary-btn {
    height: 70px;
    border: 0;
    border-radius: 10px;
    background: #0b68d3;
    color: #fff;
    font-size: 23px;
    cursor: pointer;
    box-shadow: 0 3px 7px rgba(0, 71, 160, .2);
}
.primary-btn:hover { background: #075bbb; }

.auth-footer {
    text-align: center;
    font-size: 18px;
    margin-top: 27px;
}
.auth-footer a { color: #075ec4; text-decoration: none; font-weight: 600; }

.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 19px;
    margin-top: -3px;
}
.link-with-icon { color: #0663cc; text-decoration: none; font-weight: 600; }
.terms          { margin-top: -3px; }

/* =========================================================
   APP SHELL  (sidebar + main)
   ========================================================= */
.app-shell {
    min-height: 100vh;
    display: flex;
    background: #fff;
}

/* ---------------- SIDEBAR ---------------- */
.sidebar {
    width: 240px;
    flex: 0 0 240px;
    background: linear-gradient(180deg, #06366d, #042b5c);
    color: #fff;
    min-height: 100vh;
    transition: width .2s ease, flex-basis .2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.brand {
    height: 88px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    position: relative;
    flex: 0 0 auto;
}

.brand-logo { position: absolute; left: 14px; top: 10px; }

.railway-wheel {
    width: 44px;
    height: 44px;
    border: 1px solid #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 22px;
}

.brand-hi  { margin-left: 54px; font-size: 13px; font-weight: 700; }
.brand-en  { margin-left: 54px; font-size: 15px; font-weight: 700; }
.brand-sub { font-size: 9px; margin-top: 9px; white-space: nowrap; letter-spacing: .3px; }

.side-nav {
    padding-top: 12px;
    flex: 1 1 auto;
    overflow-y: auto;
}

.nav-item {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    color: #fff;
    text-decoration: none;
    font-size: 13.5px;
    border-radius: 4px;
    transition: background .15s ease, padding-left .15s ease;
}

.nav-item:hover,
.nav-item.active {
    background: linear-gradient(90deg, #0d75df, #1763bc);
    margin: 0 6px;
    padding-left: 12px;
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 18px;
    flex: 0 0 20px;
    display: grid;
    place-items: center;
}
.nav-icon svg { width: 18px; height: 18px; }

.badge {
    margin-left: auto;
    background: #ef4545;
    border-radius: 50%;
    font-size: 10px;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
}

/* Sidebar footer — user card + logout */
.sidebar-user {
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    margin-top: auto;
    flex: 0 0 auto;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    display: grid;
    place-items: center;
    color: #dbeafe;
}
.user-avatar svg { width: 18px; height: 18px; }

.user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}
.user-meta strong { font-size: 12.5px; color: #fff; }
.user-meta span   { font-size: 10.5px; color: #bcd3ee; }

.logout-btn {
    display: block;
    text-align: center;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 6px;
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease;
}
.logout-btn:hover { background: rgba(255, 255, 255, .12); }

/* Collapsed state */
.sidebar-collapsed .sidebar {
    width: 0;
    flex-basis: 0;
    overflow: hidden;
}

/* ---------------- MAIN AREA ---------------- */
.main { flex: 1; min-width: 0; }

/* ---------------- TOPBAR ---------------- */
.topbar {
    height: 62px;
    border-bottom: 1px solid #dbe2ea;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: relative;
    z-index: 40;
    background: #fff;
}

.menu-toggle {
    border: 0;
    background: none;
    color: #1160a9;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    transition: background .15s ease;
}
.menu-toggle:hover { background: #f1f5fb; }

.topbar-title {
    font-size: 14px;
    color: #334155;
    font-weight: 500;
    margin-left: 14px;
}

.topbar-spacer { flex: 1; }

.icon-button {
    position: relative;
    border: 0;
    background: none;
    color: #0b315b;
    cursor: pointer;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    margin-right: 12px;
    text-decoration: none;
    transition: background .15s ease;
}
.icon-button:hover { background: #f1f5fb; }

.notification-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #df3131;
    color: #fff;
    font-size: 9px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.topbar-date {
    font-size: 13px;
    color: #334155;
    margin-left: 8px;
    padding-left: 18px;
    border-left: 1px solid #e2e8f0;
}

/* ---------------- USER MENU (topbar) ---------------- */
.user-menu {
    position: relative;
    margin-left: 14px;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 0;
    border-left: 1px solid #e0e5ea;
    padding: 4px 6px 4px 18px;
    min-width: 190px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
    border-radius: 6px;
    transition: background .15s ease;
}
.user-menu-trigger:hover { background: #f4f7fb; }

.user-menu-trigger .avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: #e2ecfa;
    color: #15488a;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
}

.user-menu-trigger .user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}
.user-menu-trigger .user-info strong { font-size: 12px;   color: #0f172a; }
.user-menu-trigger .user-info span   { font-size: 10.5px; color: #738197; }

.user-menu-trigger .chevron {
    margin-left: auto;
    color: #64748b;
    display: grid;
    place-items: center;
    transition: transform .18s ease;
}
.user-menu.open .chevron { transform: rotate(180deg); }

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 270px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    z-index: 60;
}
.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 12px;
}
.dropdown-header .avatar.lg {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: #e2ecfa;
    color: #15488a;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 16px;
}
.dropdown-userinfo {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}
.dropdown-userinfo strong { font-size: 13px; color: #0f172a; }
.dropdown-userinfo span   { font-size: 11.5px; color: #64748b; }
.dropdown-userinfo .muted { color: #94a3b8; }

.dropdown-divider {
    height: 1px;
    background: #edf1f5;
    margin: 4px 6px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 13px;
    color: #1e293b;
    text-decoration: none;
    border-radius: 6px;
    transition: background .12s ease, color .12s ease;
}
.dropdown-item svg           { color: #64748b; flex: 0 0 16px; }
.dropdown-item:hover         { background: #f1f5fb; color: #0b4ea2; }
.dropdown-item:hover svg     { color: #0b4ea2; }

.dropdown-item.danger          { color: #b91c1c; }
.dropdown-item.danger svg      { color: #dc2626; }
.dropdown-item.danger:hover    { background: #fef2f2; color: #991b1b; }

/* =========================================================
   CONTENT / PANELS
   ========================================================= */
.content { padding: 18px 22px 26px; }

.breadcrumbs {
    font-size: 11.5px;
    color: #3e617f;
    margin: 2px 0 14px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #12214a;
    margin: 0 0 18px;
}

.panel {
    border: 1px solid #d6dce3;
    border-radius: 5px;
    background: #fff;
    overflow: hidden;
}

.panel-header {
    background: #f1f4f7;
    border-bottom: 1px solid #d6dce3;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.panel-body { padding: 14px; }
.no-pad     { padding: 0; }

/* =========================================================
   PROJECT FORM (create_project.php)
   ========================================================= */
.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 900px;
}

.small-label {
    display: block;
    font-size: 11px;
    margin: 0 0 5px;
}

.compact-input,
.compact-select {
    height: 30px;
    width: 100%;
    border: 1px solid #aebdcc;
    border-radius: 5px;
    padding: 0 9px;
    font-size: 12px;
    color: #273447;
    background: #fff;
}

.project-field { margin-bottom: 12px; }
.field-pair    { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.readonly      { background: #edf1f5; }

.dept-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 18px;
}

.check {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.check input { width: 14px; height: 14px; }

.upload-zone {
    height: 160px;
    border: 1px dashed #b9bfc6;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    background: #fbfdff;
    transition: background .15s ease, border-color .15s ease;
}
.upload-zone:hover { background: #f1f8ff; border-color: #7ba8dd; }

.upload-btn {
    margin: 11px 0 8px;
    background: #0871d5;
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 7px 14px;
    cursor: pointer;
    font-size: 12px;
}

.browse    { color: #31597b; font-size: 11px; }
.file-name { font-size: 11px; margin-top: 8px; color: #31597b; }

.actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #e0e4e8;
    margin: 22px -22px -26px;
    padding: 14px 22px;
}

.btn-secondary,
.btn-primary {
    border-radius: 4px;
    padding: 9px 16px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}
.btn-secondary { border: 1px solid #ccd2d8; background: #fff; color: #334155; }
.btn-secondary:hover { background: #f4f7fb; }
.btn-primary   { border: 1px solid #0868c7; background: #0872d6; color: #fff; }
.btn-primary:hover { background: #065dbb; }

/* =========================================================
   DASHBOARD
   ========================================================= */

/* Stat cards */
.stat-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.stat-card.accent-blue   { border-left-color: #1e3a8a; }
.stat-card.accent-cyan   { border-left-color: #0ea5e9; }
.stat-card.accent-orange { border-left-color: #f97316; }
.stat-card.accent-green  { border-left-color: #22c55e; }

.stat-info  { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat-label { font-size: 14px; color: #334155; font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 700; color: #0f172a; line-height: 1; }

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
}
.stat-icon svg { width: 22px; height: 22px; }

.icon-blue   { background: #e0ecff; color: #1e40af; }
.icon-cyan   { background: #dff3ff; color: #0369a1; }
.icon-orange { background: #ffeadb; color: #c2410c; }
.icon-green  { background: #dcfce7; color: #15803d; }

/* Middle row: table + activity */
.dash-row {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table thead th {
    text-align: left;
    padding: 11px 14px;
    background: #f8fafc;
    color: #1e293b;
    font-weight: 600;
    font-size: 12px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}
.data-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf1f5;
    color: #1e293b;
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover          { background: #fafcff; }

.empty-row {
    text-align: center;
    color: #94a3b8;
    padding: 24px 12px !important;
}

/* Days-pending pill */
.days-badge {
    display: inline-grid;
    place-items: center;
    min-width: 32px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #cbd5e1;
}
.days-badge.d0, .days-badge.d1, .days-badge.d2, .days-badge.d3 { background: #22c55e; }
.days-badge.d4, .days-badge.d5, .days-badge.d6                  { background: #f59e0b; }
.days-badge.d7, .days-badge.d8, .days-badge.d9                  { background: #ef4444; }

/* Outline button */
.btn-outline {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #0b4ea2;
    background: #fff;
    border: 1px solid #b9cde6;
    border-radius: 6px;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}
.btn-outline:hover { background: #eef5ff; border-color: #7ba8dd; }

/* Activity list */
.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}
.activity-list li {
    position: relative;
    padding: 0 0 18px 22px;
    display: flex;
    gap: 4px;
}
.activity-list li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 12px;
    bottom: -2px;
    width: 1px;
    background: #d7e2ee;
}
.activity-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px #e8f8ee;
}
.activity-body { flex: 1; min-width: 0; }
.activity-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
}
.activity-head strong { font-size: 13px; color: #0f172a; }
.activity-time        { font-size: 11px; color: #94a3b8; white-space: nowrap; }
.activity-action      { font-size: 12px; font-weight: 600; color: #334155; }
.activity-desc        { font-size: 12px; color: #64748b; line-height: 1.4; }

/* Chart */
.chart-panel .panel-body { padding: 14px 16px 8px; }
.chart-wrap { position: relative; height: 240px; width: 100%; }

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.login-page {
    min-height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: 40% 60%;
    background: #fff;
}

.login-image {
    min-height: 100vh;
    background-image:
        linear-gradient(180deg, rgba(0, 42, 88, .03), rgba(0, 29, 65, .16)),
        url("../images/railway-hero.jpg");
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
}

.login-area {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 7%;
    background:
        radial-gradient(circle at 100% 0, rgba(215, 232, 252, .65), transparent 32%),
        radial-gradient(circle at 100% 100%, rgba(224, 238, 255, .55), transparent 30%),
        #fff;
}

.login-card { width: 100%; max-width: 560px; }

.login-heading {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 42px;
}
.login-heading h1 {
    margin: 0;
    color: #101d3b;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.8px;
}
.login-heading p {
    margin: 7px 0 0;
    color: #657895;
    font-size: 17px;
    line-height: 1.5;
}

.login-badge {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #086bd1, #1456a5);
    color: #fff;
    box-shadow: 0 8px 22px rgba(7, 83, 164, .22);
}
.login-badge span { font-size: 17px; font-weight: 700; letter-spacing: .5px; }

.login-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    margin-bottom: 22px;
    border: 1px solid #f1c3c3;
    border-radius: 9px;
    background: #fff6f6;
    color: #a52828;
    font-size: 14px;
}
.error-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #d83a3a;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.login-form { display: flex; flex-direction: column; gap: 13px; }
.login-field { width: 100%; }
.login-field label {
    display: block;
    margin-bottom: 8px;
    color: #172846;
    font-size: 14px;
    font-weight: 600;
}

.login-input { position: relative; width: 100%; }
.login-input input,
.login-input select {
    width: 100%;
    height: 42px;
    border: 1px solid #cbd6e4;
    border-radius: 10px;
    background: #fff;
    color: #182842;
    padding: 1px 22px 0 46px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.login-input input::placeholder { color: #98a6ba; }
.login-input input:focus,
.login-input select:focus {
    border-color: #0870d8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(8, 112, 216, .10);
}

.field-icon {
    position: absolute;
    left: 19px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: #294c76;
    pointer-events: none;
    z-index: 2;
}
.field-icon svg { width: 22px; height: 22px; display: block; }

.login-input select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 48px;
}
.select-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #1d3555;
    pointer-events: none;
}
.select-arrow svg { width: 20px; height: 20px; }

.password-toggle {
    position: absolute;
    right: 17px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #294c76;
    cursor: pointer;
}
.password-toggle svg { width: 22px; height: 22px; }

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1px;
    font-size: 15px;
}
.login-options a {
    text-decoration: none;
    font-weight: 600;
    transition: color .2s ease;
}
.forgot-link { color: #0869cf; }
.create-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #172f52;
}
.create-link span { font-size: 19px; transition: transform .2s ease; }
.forgot-link:hover,
.create-link:hover { color: #0754a7; }
.create-link:hover span { transform: translateX(3px); }

.login-button {
    width: 100%;
    height: 42px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #0874df, #075fc1);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(5, 92, 188, .22);
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.login-button:hover {
    background: linear-gradient(135deg, #086bd0, #0555ad);
    box-shadow: 0 11px 25px rgba(5, 92, 188, .28);
    transform: translateY(-1px);
}
.login-button:active { transform: translateY(0); }
.login-arrow { font-size: 25px; line-height: 1; }

.login-security {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    color: #8190a5;
    font-size: 12px;
}
.security-icon {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e8f3ff;
    color: #0870d8;
    font-size: 11px;
    font-weight: 700;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* --- Legacy auth page (grid hero) --- */
@media (max-width: 900px) {
    .auth-page      { grid-template-columns: 1fr; }
    .auth-hero      { display: none; }
    .auth-panel     { padding: 35px 20px; }
    .project-grid   { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .form-grid,
    .form-row       { grid-template-columns: 1fr; }
    .auth-title     { font-size: 31px; }
    .auth-subtitle  { font-size: 17px; margin-bottom: 30px; }
    .input-wrap input,
    .input-wrap select { height: 60px; font-size: 16px; padding-left: 58px; }
    .input-icon     { left: 18px; font-size: 22px; }
    .auth-links     { font-size: 15px; }
    .dept-grid      { grid-template-columns: 1fr 1fr; }
}

/* --- Dashboard --- */
@media (max-width: 1100px) {
    .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-row { grid-template-columns: 1fr; }
    .sidebar  { width: 200px; flex-basis: 200px; }
}

@media (max-width: 800px) {
    .login-page  { display: block; }
    .login-image { display: none; }
    .login-area  { min-height: 100vh; padding: 35px 22px; }
    .login-card  { max-width: 520px; }

    /* Collapse sidebar by default on mobile when toggled */
    .sidebar { width: 0; flex-basis: 0; }
    .sidebar-collapsed .sidebar { width: 240px; flex-basis: 240px; }
}

@media (max-width: 600px) {
    .stat-row   { grid-template-columns: 1fr; }
    .stat-value { font-size: 22px; }
    .data-table { font-size: 12px; }
    .data-table thead th,
    .data-table tbody td { padding: 9px 10px; }
    .topbar-date { display: none; }
    .dept-grid   { grid-template-columns: 1fr 1fr; }

    .user-menu-trigger .user-info { display: none; }
    .user-menu-trigger            { min-width: 0; padding-left: 12px; }
    .user-dropdown                { min-width: 230px; }
}

@media (max-width: 480px) {
    .login-area  { padding: 28px 18px; }
    .login-heading { gap: 13px; margin-bottom: 30px; }
    .login-badge   { width: 46px; height: 46px; flex-basis: 46px; }
    .login-heading h1 { font-size: 22px; }
    .login-heading p  { font-size: 14px; }
    .login-form       { gap: 9px; }
    .login-input input,
    .login-input select { height: 58px; font-size: 15px; }
    .login-options    { font-size: 13px; }
    .login-button     { height: 60px; }
}
@media (max-width: 800px) {
    .sidebar { width: 0; flex-basis: 0; }
    .sidebar-collapsed .sidebar { width: 240px; flex-basis: 240px; }
}

/* =========================================================
   PROJECTS PAGE
   ========================================================= */

/* Page head with title + action button */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.page-head .page-title {
    margin: 0 0 4px;
    font-size: 26px;
}

.page-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 13.5px;
}

.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    background: linear-gradient(135deg, #0874df, #075fc1);
    border: 0;
    color: #fff;
    box-shadow: 0 6px 16px rgba(5, 92, 188, 0.22);
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    cursor: pointer;
}
.btn-with-icon:hover {
    background: linear-gradient(135deg, #086bd0, #0555ad);
    box-shadow: 0 9px 22px rgba(5, 92, 188, 0.28);
    transform: translateY(-1px);
}

/* Filter bar */
.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.filter-search {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.filter-search input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 42px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    font-size: 13.5px;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.filter-search input::placeholder { color: #94a3b8; }
.filter-search input:focus {
    border-color: #0870d8;
    box-shadow: 0 0 0 3px rgba(8, 112, 216, .10);
}

.filter-select { position: relative; }

.filter-select select {
    width: 100%;
    height: 44px;
    padding: 0 40px 0 16px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    font-size: 13.5px;
    color: #0f172a;
    background: #fff
        url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
        no-repeat right 14px center;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.filter-select select:focus {
    border-color: #0870d8;
    box-shadow: 0 0 0 3px rgba(8, 112, 216, .10);
}

/* Projects table tweaks */
.projects-table thead th { background: #f1f5f9; }
.projects-table tbody td { font-size: 13px; }

.cell-code {
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.cell-title {
    font-weight: 500;
    color: #0f172a;
    max-width: 260px;
}

.cell-location { color: #475569; }

.th-center { text-align: center; }

/* Status pills */
.status-pill {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.4;
}

.status-progress  { background: #dbeafe; color: #1e40af; }  /* In Progress */
.status-pending   { background: #fff1d6; color: #b45309; }  /* Pending Approval */
.status-approved  { background: #d1fae5; color: #047857; }
.status-rejected  { background: #fee2e2; color: #b91c1c; }
.status-draft     { background: #e5eaf1; color: #475569; }

/* Row actions */
.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.icon-action {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #475569;
    text-decoration: none;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.icon-action:hover { background: #eef5ff; color: #0b4ea2; }

/* Table footer / pagination */
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    flex-wrap: wrap;
}

.table-footer-info {
    font-size: 12.5px;
    color: #64748b;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-link {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 6px;
    text-decoration: none;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.page-link:hover {
    background: #eef5ff;
    border-color: #7ba8dd;
    color: #0b4ea2;
}
.page-link.active {
    background: #0872d6;
    border-color: #0872d6;
    color: #fff;
    font-weight: 600;
}
.page-link.disabled {
    color: #cbd5e1;
    pointer-events: none;
    opacity: .7;
}
.page-ellipsis {
    color: #94a3b8;
    padding: 0 4px;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 1100px) {
    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }
    .filter-search { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .filter-bar { grid-template-columns: 1fr; }

    .page-head {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-with-icon { justify-content: center; }

    .projects-table thead th:nth-child(4),
    .projects-table tbody td:nth-child(4),
    .projects-table thead th:nth-child(5),
    .projects-table tbody td:nth-child(5) {
        display: none; /* hide Location + Stage on narrow screens */
    }

    .table-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        text-align: center;
    }
    .pagination { justify-content: center; }
}
/* =========================================================
   MY TASKS PAGE
   ========================================================= */

/* Tab switcher */
.task-tabs {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 18px;
}

.task-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 2px;
    font-size: 14.5px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: color .15s ease;
}
.task-tab:hover { color: #1e40af; }

.task-tab.active {
    color: #0b4ea2;
    font-weight: 600;
}
.task-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: #0b4ea2;
    border-radius: 2px 2px 0 0;
}

.tab-count {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 20px;
    padding: 0 7px;
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    background: #0b4ea2;
    border-radius: 999px;
}

/* Filter bar */
.task-filters {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 2fr);
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 16px;
    padding-bottom: 4px;
}

.filter-group { display: flex; flex-direction: column; gap: 6px; }

.filter-group-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-transform: none;
}

.filter-select select {
    width: 100%;
    height: 38px;
    padding: 0 36px 0 12px;
    border: 1px solid #dbe2ea;
    border-radius: 6px;
    font-size: 13px;
    color: #0f172a;
    background: #fff
        url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
        no-repeat right 12px center;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
}
.filter-select select:focus {
    border-color: #0870d8;
    box-shadow: 0 0 0 3px rgba(8, 112, 216, .10);
}

/* Priority chips */
.priority-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid #dbe2ea;
    border-radius: 6px;
    font-size: 12.5px;
    color: #334155;
    background: #fff;
    cursor: pointer;
    transition: all .12s ease;
    user-select: none;
}
.chip input { display: none; }
.chip:hover { border-color: #7ba8dd; }

.chip.active {
    background: #0b4ea2;
    border-color: #0b4ea2;
    color: #fff;
    font-weight: 600;
}

/* Search */
.task-filters .filter-search { position: relative; }

.task-filters .filter-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.task-filters .filter-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 36px;
    border: 1px solid #dbe2ea;
    border-radius: 6px;
    font-size: 13px;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.task-filters .filter-search input::placeholder { color: #94a3b8; }
.task-filters .filter-search input:focus {
    border-color: #0870d8;
    box-shadow: 0 0 0 3px rgba(8, 112, 216, .10);
}

/* Tasks table */
.tasks-table { font-size: 13px; }
.tasks-table thead th {
    background: #fff;
    color: #1e293b;
    font-weight: 600;
    padding: 12px 14px;
    border-bottom: 2px solid #e2e8f0;
}

.tasks-table tbody td {
    padding: 14px;
    border-bottom: 1px solid #edf1f5;
    color: #1e293b;
}

/* Left border by priority */
.tasks-table tbody tr.row-overdue { border-left: 4px solid #dc2626; background: #fffafa; }
.tasks-table tbody tr.row-today   { border-left: 4px solid #f59e0b; background: #fffdf7; }
.tasks-table tbody tr.row-ontrack { border-left: 4px solid #22c55e; background: #fff; }

.tasks-table tbody tr.bg-overdue  { background: #fef2f2; }

.cell-stacked {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.cell-stacked strong { font-size: 13px; color: #0f172a; }
.cell-stacked span   { font-size: 11px; color: #64748b; }

/* Sort toggle */
.sort-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: 4px;
    color: #94a3b8;
    text-decoration: none;
    vertical-align: middle;
}
.sort-toggle:hover { color: #0b4ea2; }

/* Priority pills */
.pill {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 999px;
    line-height: 1.4;
    white-space: nowrap;
}
.pill-red    { background: #dc2626; color: #fff; }
.pill-orange { background: #f59e0b; color: #fff; }
.pill-green  { background: #16a34a; color: #fff; }

/* Action buttons */
.btn-open-task {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #0b4ea2;
    border: 1px solid #0b4ea2;
    border-radius: 5px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .12s ease, border-color .12s ease;
}
.btn-open-task:hover { background: #083d80; border-color: #083d80; }

.btn-remind {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #334155;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn-remind:hover { background: #eef5ff; border-color: #7ba8dd; color: #0b4ea2; }

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 70px;
    text-align: center;
}
.empty-illustration { margin-bottom: 18px; }
.empty-state h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
    color: #1e293b;
}
.empty-state p {
    margin: 0;
    font-size: 13.5px;
    color: #64748b;
}

/* Responsive */
@media (max-width: 1000px) {
    .task-filters {
        grid-template-columns: 1fr 1fr;
    }
    .task-filters .filter-search { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .task-tabs { gap: 20px; }
    .task-tab  { font-size: 13px; }

    .task-filters { grid-template-columns: 1fr; }

    .tasks-table thead th:nth-child(3),
    .tasks-table tbody td:nth-child(3),
    .tasks-table thead th:nth-child(4),
    .tasks-table tbody td:nth-child(4),
    .tasks-table thead th:nth-child(5),
    .tasks-table tbody td:nth-child(5) {
        display: none;
    }
}
/* =========================================================
   NOTIFICATIONS PAGE
   ========================================================= */

/* Header row */
.notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.notif-head .page-title { margin: 0; font-size: 24px; }

.btn-mark-all {
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn-mark-all:hover {
    background: #eef5ff;
    border-color: #7ba8dd;
    color: #0b4ea2;
}

/* Tabs + search row */
.notif-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.notif-tabs {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.notif-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    padding: 4px 2px;
    transition: color .15s ease;
}
.notif-tab:hover { color: #0b4ea2; }

.notif-tab.active {
    color: #0b4ea2;
    font-weight: 600;
}

.notif-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #0b4ea2;
    border-radius: 999px;
}
.notif-count.red { background: #dc2626; }

.notif-search {
    position: relative;
    flex: 0 0 auto;
    min-width: 260px;
}
.notif-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: grid;
    place-items: center;
    pointer-events: none;
}
.notif-search input {
    width: 100%;
    height: 36px;
    padding: 0 14px 0 36px;
    border: 1px solid #dbe2ea;
    border-radius: 6px;
    font-size: 13px;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.notif-search input::placeholder { color: #94a3b8; }
.notif-search input:focus {
    border-color: #0870d8;
    box-shadow: 0 0 0 3px rgba(8, 112, 216, .10);
}

/* Notification cards */
.notif-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.notif-card {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #dbe2ea;
    border-left: 4px solid #cbd5e1;
    border-radius: 10px;
    transition: box-shadow .15s ease, background .15s ease;
}
.notif-card:hover { box-shadow: 0 2px 8px rgba(15, 23, 42, .06); }

/* Variant colors */
.notif-card.nv-info     { border-left-color: #3b82f6; background: #f5f9ff; }
.notif-card.nv-warning  { border-left-color: #f59e0b; background: #fffaef; }
.notif-card.nv-success  { border-left-color: #22c55e; background: #f4fdf7; }
.notif-card.nv-danger   { border-left-color: #dc2626; background: #fff5f5; }
.notif-card.nv-system   { border-left-color: #94a3b8; background: #fafbfc; }

.notif-card-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    flex: 0 0 44px;
}
.notif-card.nv-info    .notif-card-icon { color: #2563eb; border-color: #bfdbfe; }
.notif-card.nv-warning .notif-card-icon { color: #d97706; border-color: #fde68a; }
.notif-card.nv-success .notif-card-icon { color: #16a34a; border-color: #bbf7d0; }
.notif-card.nv-danger  .notif-card-icon { color: #dc2626; border-color: #fecaca; }
.notif-card.nv-system  .notif-card-icon { color: #475569; border-color: #cbd5e1; }

.notif-card-body { min-width: 0; }

.notif-card-title {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
}

.notif-card-text {
    margin: 0 0 8px;
    font-size: 12.5px;
    color: #475569;
    line-height: 1.45;
}

.notif-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 12px;
    color: #64748b;
}

.notif-card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.btn-view-project {
    display: inline-block;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #0b4ea2;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .12s ease;
}
.btn-view-project:hover { background: #083d80; }

.btn-mark-read {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12.5px;
    font-weight: 500;
    color: #334155;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color .12s ease;
}
.btn-mark-read:hover { color: #0b4ea2; }
.btn-mark-read.muted {
    color: #94a3b8;
    text-decoration: none;
    cursor: default;
}

/* Footer: pagination + per-page */
.notif-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 6px;
    flex-wrap: wrap;
}

.notif-per {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: #64748b;
}

.notif-per-select select {
    height: 34px;
    min-width: 70px;
    padding: 0 30px 0 12px;
    border: 1px solid #dbe2ea;
    border-radius: 6px;
    background: #fff
        url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
        no-repeat right 10px center;
    appearance: none;
    -webkit-appearance: none;
    font-size: 13px;
    color: #0f172a;
    cursor: pointer;
    outline: none;
}
.notif-per-select select:focus {
    border-color: #0870d8;
    box-shadow: 0 0 0 3px rgba(8, 112, 216, .10);
}

/* Empty state */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 60px;
    text-align: center;
}
.notif-empty-illustration { margin-bottom: 18px; opacity: .9; }
.notif-empty-text {
    margin: 0;
    font-size: 14.5px;
    color: #64748b;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 800px) {
    .notif-card {
        grid-template-columns: 44px 1fr;
        padding: 14px 16px;
    }
    .notif-card-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 12px;
        margin-top: 4px;
    }
}

@media (max-width: 600px) {
    .notif-toolbar { flex-direction: column; align-items: stretch; }
    .notif-search  { min-width: 0; }
    .notif-tabs    { gap: 14px; }
    .notif-tab     { font-size: 12.5px; }
    .notif-pagination { flex-direction: column; align-items: stretch; }
    .notif-per { justify-content: flex-end; }
}
/* =========================================================
   UNDER CONSTRUCTION PAGE
   ========================================================= */

.uc-wrap {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
}

.uc-standalone {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background:
        radial-gradient(circle at 100% 0, rgba(215, 232, 252, .65), transparent 32%),
        radial-gradient(circle at 100% 100%, rgba(224, 238, 255, .55), transparent 30%),
        #ffffff;
}

.uc-card {
    width: 100%;
    max-width: 620px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 44px 40px 38px;
    text-align: center;
    box-shadow: 0 6px 28px rgba(15, 23, 42, 0.06);
}

.uc-illustration {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.uc-title {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 700;
    color: #12214a;
    letter-spacing: -0.4px;
    line-height: 1.3;
}

.uc-text {
    margin: 0 auto 26px;
    max-width: 460px;
    font-size: 14.5px;
    line-height: 1.6;
    color: #64748b;
}

/* Progress */
.uc-progress {
    max-width: 380px;
    margin: 0 auto 26px;
}

.uc-progress-bar {
    height: 8px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.uc-progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #0874df, #0b4ea2);
    border-radius: 999px;
    transition: width .4s ease;
}

.uc-progress-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Actions */
.uc-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.uc-actions .btn-secondary,
.uc-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease,
                color .15s ease, transform .15s ease;
}

.uc-actions .btn-secondary {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #334155;
}
.uc-actions .btn-secondary:hover {
    background: #eef5ff;
    border-color: #7ba8dd;
    color: #0b4ea2;
}

.uc-actions .btn-primary {
    background: linear-gradient(135deg, #0874df, #075fc1);
    border: 1px solid transparent;
    color: #fff;
    box-shadow: 0 6px 16px rgba(5, 92, 188, .22);
}
.uc-actions .btn-primary:hover {
    background: linear-gradient(135deg, #086bd0, #0555ad);
    box-shadow: 0 9px 22px rgba(5, 92, 188, .28);
    transform: translateY(-1px);
}

.uc-footnote {
    font-size: 12px;
    color: #94a3b8;
}
.uc-footnote strong { color: #475569; }

/* Responsive */
@media (max-width: 600px) {
    .uc-card {
        padding: 32px 22px 28px;
        border-radius: 12px;
    }
    .uc-title { font-size: 20px; }
    .uc-text  { font-size: 13.5px; }
    .uc-illustration svg { width: 190px; height: 150px; }
    .uc-actions { flex-direction: column; }
    .uc-actions .btn-secondary,
    .uc-actions .btn-primary { justify-content: center; width: 100%; }
}
/* =========================================================
   SETTINGS / PROFILE PAGE
   ========================================================= */

.settings-panel {
    background: #fff;
    border: 1px solid #d6dce3;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.settings-panel .panel-header {
    background: #fff;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    border-bottom: 1px solid #edf1f5;
}

.settings-body { padding: 20px; }

/* ---- Profile block ---- */
.profile-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 30px;
    align-items: flex-start;
}

.avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-right: 20px;
    border-right: 1px solid #edf1f5;
}

.avatar-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #dbe6f2;
    color: #5b7ba6;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #c8d6e5;
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

.upload-label {
    display: inline-block;
    padding: 8px 18px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    background: #0b4ea2;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s ease;
}
.upload-label:hover { background: #083d80; }

.avatar-hint { font-size: 11px; color: #94a3b8; text-align: center; }

.fields-col { min-width: 0; }

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.settings-field label,
.settings-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.settings-input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13.5px;
    color: #0f172a;
    background: #fff;
    outline: none;
    font-family: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.settings-input:focus {
    border-color: #0b4ea2;
    box-shadow: 0 0 0 3px rgba(11, 78, 162, 0.12);
}

.settings-readonly {
    height: 42px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13.5px;
    color: #334155;
}

.settings-actions {
    padding: 14px 20px;
    border-top: 1px solid #edf1f5;
    text-align: right;
    background: #fafbfc;
}

.btn-save {
    padding: 9px 22px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #0b4ea2;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s ease;
}
.btn-save:hover { background: #083d80; }

/* ---- Account details ---- */
.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 24px;
    align-items: end;
}

.account-action { align-self: end; }

.btn-edit-email {
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    color: #0b4ea2;
    background: #fff;
    border: 1px solid #0b4ea2;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.btn-edit-email:hover { background: #0b4ea2; color: #fff; }

/* ---- Security ---- */
.security-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 16px 20px;
    align-items: end;
}
.security-btn-cell { min-width: 160px; }

.pwd-wrap { position: relative; }
.pwd-wrap .settings-input { padding-right: 42px; }

.pwd-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    border-radius: 4px;
}
.pwd-eye:hover { color: #0b4ea2; background: #f1f5fb; }

.btn-change-pwd {
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #0b4ea2;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease;
}
.btn-change-pwd:hover { background: #083d80; }

/* ---- Notification preferences ---- */
.notif-prefs {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: center;
}

.pref-list { display: flex; flex-direction: column; gap: 18px; }

.pref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-size: 13.5px;
    color: #334155;
    cursor: pointer;
}

.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 44px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background .2s ease;
}
.toggle .slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .2);
    transition: transform .2s ease;
}
.toggle input:checked + .slider { background: #0b4ea2; }
.toggle input:checked + .slider::before { transform: translateX(20px); }

.pref-illustration { text-align: center; }
.pref-note { font-size: 12px; color: #64748b; margin-top: 4px; }

/* ---- Page bottom actions ---- */
.page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
    margin-bottom: 20px;
}

.btn-update-profile {
    padding: 11px 26px;
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    background: #0b4ea2;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s ease;
}
.btn-update-profile:hover { background: #083d80; }

.btn-cancel {
    display: inline-flex;
    align-items: center;
    padding: 11px 26px;
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    background: #64748b;
    border: 0;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease;
}
.btn-cancel:hover { background: #475569; }

/* ---- Modal ---- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }

.modal-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .3);
    overflow: hidden;
    transform: translateY(-6px);
    transition: transform .18s ease;
}
.modal-backdrop.open .modal-card { transform: translateY(0); }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #edf1f5;
}
.modal-header h3 { margin: 0; font-size: 16px; color: #0f172a; }

.modal-close {
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
}
.modal-close:hover { color: #0f172a; }

.modal-body  { padding: 20px 22px; }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px 18px;
    border-top: 1px solid #edf1f5;
    background: #fafbfc;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .profile-body {
        grid-template-columns: 1fr;
    }
    .avatar-col {
        border-right: 0;
        border-bottom: 1px solid #edf1f5;
        padding-right: 0;
        padding-bottom: 20px;
    }
    .settings-grid { grid-template-columns: 1fr; }
    .account-grid  { grid-template-columns: 1fr; gap: 16px; }
    .security-grid { grid-template-columns: 1fr; gap: 14px; }
    .security-btn-cell { min-width: 0; }
    .security-btn-cell label { display: none; }
    .notif-prefs { grid-template-columns: 1fr; }
    .pref-illustration { display: none; }
}
/* =========================================================
   TOPBAR — refined
   ========================================================= */

.topbar { position: relative; z-index: 40; }

/* --- Avatar (works for photo OR initials) --- */
.avatar-img {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #dbe2ea;
    background: #e2ecfa;
}
.avatar-img.lg {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
}

/* --- User menu --- */
.user-menu { position: relative; margin-left: 14px; }

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 0;
    border-left: 1px solid #e0e5ea;
    padding: 4px 6px 4px 18px;
    min-width: 200px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
    border-radius: 6px;
    transition: background .15s ease;
}
.user-menu-trigger:hover,
.user-menu-trigger:focus-visible {
    background: #f4f7fb;
    outline: none;
}
.user-menu-trigger:focus-visible {
    box-shadow: 0 0 0 2px #0b4ea2 inset;
}

.user-menu-trigger .avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: #e2ecfa;
    color: #15488a;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
}

.user-menu-trigger .user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}
.user-menu-trigger .user-info strong {
    font-size: 12.5px;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu-trigger .user-info span {
    font-size: 10.5px;
    color: #738197;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-trigger .chevron {
    margin-left: auto;
    color: #64748b;
    display: grid;
    place-items: center;
    transition: transform .18s ease;
}
.user-menu.open .chevron { transform: rotate(180deg); }

/* --- Dropdown --- */
.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 270px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    z-index: 60;
}
.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 12px;
}
.dropdown-header .avatar.lg {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: #e2ecfa;
    color: #15488a;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 16px;
}

.dropdown-userinfo {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}
.dropdown-userinfo strong { font-size: 13px; color: #0f172a; }
.dropdown-userinfo span   { font-size: 11.5px; color: #64748b; }
.dropdown-userinfo .muted { color: #94a3b8; }

.dropdown-divider {
    height: 1px;
    background: #edf1f5;
    margin: 4px 6px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 13px;
    color: #1e293b;
    text-decoration: none;
    border-radius: 6px;
    transition: background .12s ease, color .12s ease;
}
.dropdown-item svg         { color: #64748b; flex: 0 0 16px; }
.dropdown-item:hover       { background: #f1f5fb; color: #0b4ea2; }
.dropdown-item:hover svg   { color: #0b4ea2; }
.dropdown-item:focus-visible {
    background: #f1f5fb;
    color: #0b4ea2;
    outline: 2px solid #0b4ea2;
    outline-offset: -2px;
}

.dropdown-item.danger        { color: #b91c1c; }
.dropdown-item.danger svg    { color: #dc2626; }
.dropdown-item.danger:hover  { background: #fef2f2; color: #991b1b; }

/* --- Date with sub-label --- */
.topbar-date {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 12.5px;
    color: #334155;
    line-height: 1.3;
    margin-left: 12px;
    padding-left: 18px;
    border-left: 1px solid #e2e8f0;
}
.topbar-date-label { font-weight: 600; color: #0f172a; }
.topbar-date-small { font-size: 10.5px; color: #94a3b8; }

/* --- Notification dot cap at 99+ --- */
.notification-dot {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 700;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .topbar-date { display: none; }
}

@media (max-width: 600px) {
    .user-menu-trigger .user-info { display: none; }
    .user-menu-trigger            { min-width: 0; padding-left: 12px; }
    .user-dropdown                { min-width: 230px; }
}