:root {
    --bg: #eef2ff;
    --bg2: #f8fafc;
    --card: rgba(255,255,255,.92);
    --text: #172033;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #4f46e5;
    --primary2: #06b6d4;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #f59e0b;
    --shadow: 0 16px 40px rgba(15, 23, 42, .10);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(79,70,229,.20), transparent 32%),
        radial-gradient(circle at top right, rgba(6,182,212,.20), transparent 28%),
        linear-gradient(180deg, var(--bg), var(--bg2));
    color: var(--text);
    min-height: 100vh;
}
.topbar {
    background: linear-gradient(135deg, #111827, #312e81 56%, #0891b2);
    color: white;
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand { font-weight: 800; font-size: 19px; letter-spacing: .2px; display: flex; align-items: center; gap: 10px; }
.brand:before { content: "MK"; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: rgba(255,255,255,.16); }

.login-user-box {
    display: grid;
    gap: 1px;
    padding: 7px 13px;
    border-radius: 14px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
    min-width: 165px;
    text-align: left;
}
.login-user-box .login-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .6px;
    opacity: .72;
    font-weight: 800;
}
.login-user-box strong { font-size: 14px; line-height: 1.2; }
.login-user-box small { font-size: 11px; opacity: .82; font-weight: 700; }

.topbar nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topbar a {
    color: white;
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.12);
    font-size: 14px;
}
.topbar a:hover { background: rgba(255,255,255,.20); }
.container { max-width: 1180px; margin: 28px auto; padding: 0 16px; }
.card {
    background: var(--card);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
    overflow-x: auto;
}
.login-card, .form-card { max-width: 560px; margin-left: auto; margin-right: auto; }
h1 { margin: 0 0 18px; font-size: 30px; letter-spacing: -.5px; }
h2 { margin: 0 0 15px; font-size: 20px; }
label { display: block; margin-top: 13px; margin-bottom: 6px; font-weight: 700; color: #334155; }
input, select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 15px;
    background: white;
    outline: none;
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
    padding: 11px 15px;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    color: white;
    border: 0;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(79,70,229,.22);
}
.button.secondary { background: #64748b; box-shadow: none; }
.button.success { background: linear-gradient(135deg, #16a34a, #22c55e); }
.button.warning { background: linear-gradient(135deg, #f59e0b, #f97316); }
.button.small { padding: 8px 11px; margin-top: 0; border-radius: 10px; }
button.link { background: transparent; color: #2563eb; padding: 0; margin: 0; box-shadow: none; }
button.danger, .danger { color: var(--danger) !important; }
.inline { display: inline; }
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: #f8fafc; color: #334155; font-size: 13px; text-transform: uppercase; letter-spacing: .35px; }
tr:hover td { background: rgba(79,70,229,.035); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat {
    color: white;
    padding: 22px;
    border-radius: 18px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.stat:after { display: none !important; content: none !important; }
.stat:nth-child(1) { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.stat:nth-child(2) { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.stat:nth-child(3) { background: linear-gradient(135deg, #ea580c, #f59e0b); }
.stat span { display: block; opacity: .86; margin-bottom: 10px; }
.stat b { font-size: 28px; }
.alert { background: #ecfeff; border: 1px solid #67e8f9; padding: 13px 14px; border-radius: 13px; margin-bottom: 16px; color: #155e75; }
.error { background: #fee2e2; color: #991b1b; padding: 11px; border-radius: 12px; margin-bottom: 12px; }
.muted { color: var(--muted); }
.actions { margin-bottom: 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 25px; }
.badge { display: inline-block; padding: 5px 9px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-weight: 700; font-size: 12px; }
.amount-positive { color: var(--success); font-weight: 800; }
.amount-balance { color: #ea580c; font-weight: 800; }
@media (max-width: 650px) {
    .topbar { align-items: flex-start; padding: 14px 16px; }
    .login-user-box { width: 100%; }
    .topbar nav { width: 100%; }
    .topbar a { margin: 0; }
    h1 { font-size: 25px; }
    .card { padding: 15px; border-radius: 15px; }
}
@media print {
    .topbar, .actions, .footer { display: none !important; }
    body { background: white; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

.note-card {
    background: #fff8e6;
    border-left: 5px solid #f59e0b;
    color: #5b3b00;
}
.floor-list { display: grid; gap: 10px; margin-bottom: 10px; }
.floor-row { display: grid; grid-template-columns: 1fr 220px auto; gap: 10px; align-items: center; }
.floor-row input { margin: 0; }
.button.small, button.small { padding: 8px 10px; font-size: 12px; }
.button.danger, button.danger { background: #dc2626; color: #fff; }
.muted { color: #64748b; font-size: 13px; margin-top: 6px; }
.form-actions { margin-top: 18px; }
@media (max-width: 700px) { .floor-row { grid-template-columns: 1fr; } }
.search-form label { margin-top: 0; }
.search-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 10px; align-items: end; }
.search-row button, .search-row .button { margin-top: 0; }
.stat:nth-child(4) { background: linear-gradient(135deg, #16a34a, #22c55e); }
.stat:nth-child(5) { background: linear-gradient(135deg, #dc2626, #f97316); }
@media (max-width: 700px) { .search-row { grid-template-columns: 1fr; } }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.search-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0; }
.search-form input { min-width: 260px; margin: 0; }
.search-form button, .search-form .button { margin: 0; }
@media (max-width: 700px) { .toolbar, .search-form { display: grid; width: 100%; } .search-form input { min-width: 100%; } }

/* V4G report improvements */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.page-head h1 { margin-bottom: 4px; }
.no-margin .button { margin-top: 0; }
.filter-card { border-left: 6px solid var(--primary); }
.report-filter {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}
.report-filter label { margin-top: 0; }
.filter-buttons { display: flex; gap: 8px; align-items: center; }
.filter-buttons button, .filter-buttons .button { margin-top: 0; white-space: nowrap; }
.report-stats .stat:nth-child(6) { background: linear-gradient(135deg, #475569, #0f172a); }
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.section-title h2 { margin-bottom: 0; }
tfoot th {
    background: #eef2ff;
    color: #172033;
    font-size: 14px;
}
.progress-wrap { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.progress { width: 92px; height: 9px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(135deg, #16a34a, #22c55e); border-radius: 999px; }
.status { display: inline-block; padding: 6px 10px; border-radius: 999px; font-weight: 800; font-size: 12px; }
.status.done { background: #dcfce7; color: #166534; }
.status.pending { background: #ffedd5; color: #9a3412; }
@media (max-width: 900px) {
    .report-filter { grid-template-columns: 1fr 1fr; }
    .filter-buttons { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
    .report-filter { grid-template-columns: 1fr; }
    .filter-buttons { display: grid; grid-template-columns: 1fr 1fr; }
    .page-head .actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
}

/* V4J user dashboard project accordion */
.project-accordion { display: grid; gap: 14px; }
.project-box {
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.project-head {
    width: 100%;
    border: 0;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
    color: #172033;
    padding: 16px 18px;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-align: left;
}
.project-head:hover { background: linear-gradient(135deg, #eef6ff, #e0f2fe); }
.project-title { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.project-title strong { display: block; font-size: 18px; letter-spacing: .2px; }
.project-title small { display: block; color: #64748b; margin-top: 3px; font-weight: 700; }
.project-title .arrow { font-size: 18px; transition: transform .2s ease; color: #2563eb; }
.project-head.open .arrow { transform: rotate(90deg); }
.project-summary { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 10px; width: min(620px, 100%); }
.project-summary span {
    background: rgba(255,255,255,.8);
    border: 1px solid #e5edf7;
    border-radius: 14px;
    padding: 10px 12px;
    font-weight: 900;
    color: #0f172a;
}
.project-summary b { display: block; color: #64748b; font-size: 11px; text-transform: uppercase; margin-bottom: 3px; }
.project-panel { display: none; padding: 0 18px 18px; background: #fff; }
.project-panel.open { display: block; }
.compact-table { margin-top: 16px; }
.empty-box {
    padding: 18px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    font-weight: 700;
}
@media (max-width: 800px) {
    .project-head { display: grid; }
    .project-title { min-width: 0; }
    .project-summary { grid-template-columns: 1fr; }
    .project-panel { padding: 0 12px 14px; overflow-x: auto; }
}

/* V4L report/PDF preview spacing refinement */
.card + .card { margin-top: 22px; }
.section-title { padding-top: 2px; }
.report-stats { margin-bottom: 20px; }
.status.partial { background: #fef3c7; color: #92400e; }
.status.over { background: #fee2e2; color: #991b1b; }
.entry-summary-box { display:grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap:12px; margin: 14px 0 20px; }
.entry-summary-box div { background:#f8fafc; border:1px solid #e2e8f0; border-radius:14px; padding:12px; }
.entry-summary-box span { display:block; color:#64748b; font-size:12px; text-transform:uppercase; font-weight:800; letter-spacing:.04em; }
.entry-summary-box b { display:block; margin-top:6px; color:#0f172a; font-size:16px; }
.danger-zone { margin-top:18px; padding-top:16px; border-top:1px solid #fee2e2; }
.danger-btn { background: linear-gradient(135deg, #dc2626, #991b1b) !important; }

/* V4P PROFESSIONAL UI UPGRADE */
:root {
    --sidebar: #0f172a;
    --sidebar2: #1e1b4b;
    --soft: #f8fafc;
    --radius: 18px;
}
body.with-sidebar { background: #f5f7fb; }
.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar {
    position: sticky; top: 0; height: 100vh; padding: 20px 16px;
    background: linear-gradient(180deg, var(--sidebar), var(--sidebar2));
    color: white; box-shadow: 12px 0 32px rgba(15,23,42,.13); z-index: 20;
}
.side-brand { display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; padding: 8px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { display: inline-grid; place-items:center; width: 40px; height: 40px; border-radius: 14px; background: linear-gradient(135deg, #06b6d4, #4f46e5); color: #fff; font-weight: 900; box-shadow: 0 10px 24px rgba(79,70,229,.28); }
.side-brand b { display:block; font-size: 18px; letter-spacing:.1px; }
.side-brand small { display:block; opacity:.72; margin-top:3px; font-size: 12px; }
.side-nav { display: grid; gap: 8px; padding: 18px 0; }
.side-nav a { color: rgba(255,255,255,.83); text-decoration:none; display:flex; align-items:center; gap: 11px; padding: 12px 13px; border-radius: 14px; font-weight: 800; transition: .16s ease; }
.side-nav a:hover, .side-nav a.active { background: rgba(255,255,255,.13); color: #fff; transform: translateX(2px); }
.side-nav a span { width: 24px; text-align: center; }
.logout-link { margin-top: 10px; background: rgba(220,38,38,.16) !important; }
.side-user-card { position:absolute; left:16px; right:16px; bottom:18px; display:flex; gap: 12px; align-items:center; padding: 13px; border-radius: 18px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.12); }
.avatar { width:40px; height:40px; border-radius: 50%; background:#fff; color:#312e81; display:grid; place-items:center; font-weight:900; }
.side-user-card b { display:block; font-size: 14px; }
.side-user-card small { display:block; opacity:.76; font-size: 11px; line-height:1.25; margin-top:2px; }
.main-area { min-width: 0; }
.app-topbar { background: rgba(255,255,255,.86); color: #0f172a; backdrop-filter: blur(14px); border-bottom: 1px solid #e2e8f0; box-shadow: 0 8px 28px rgba(15,23,42,.06); padding: 14px 26px; }
.app-topbar .login-user-box { color:#0f172a; background:#f8fafc; border:1px solid #e2e8f0; }
.app-topbar .login-user-box .login-label { color:#64748b; opacity:1; }
.app-topbar .login-user-box small { color:#475569; opacity:1; }
.page-title-box { display:grid; gap:2px; }
.page-title-box span { color:#64748b; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.page-title-box strong { font-size: 21px; }
.mobile-brand { display:none; align-items:center; gap: 10px; }
.public-topbar { position: static; }
.container { max-width: 1240px; }
body.with-sidebar .container { margin: 24px auto 90px; }
.card { border-radius: 22px; border: 1px solid #e8edf5; box-shadow: 0 16px 42px rgba(15,23,42,.08); }
.card h2 { display:flex; align-items:center; gap:10px; }
.card h2:before { content:""; width:8px; height:26px; border-radius:99px; background: linear-gradient(180deg, var(--primary), var(--primary2)); }
.stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { min-height: 122px; padding: 20px; isolation:isolate; }
.stat span { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing:.04em; }
.stat b { font-size: clamp(20px, 2.1vw, 27px); }
.stat:before { position:absolute; right:18px; bottom:14px; font-size: 36px; opacity:.22; z-index:-1; }
.stat:nth-child(1):before { content:"📁"; }
.stat:nth-child(2):before { content:"🏢"; }
.stat:nth-child(3):before { content:"💰"; font-weight:900; }
.stat:nth-child(4):before { content:"✅"; }
.stat:nth-child(5):before { content:"⚠"; }
.stat:nth-child(6):before { content:"🧾"; }
.progress-card { background:#fff; border:1px solid #e2e8f0; border-radius: 20px; padding: 16px 18px; margin: -6px 0 22px; box-shadow: 0 8px 25px rgba(15,23,42,.05); }
.progress-card-top { display:flex; justify-content:space-between; gap:12px; font-weight:900; margin-bottom:10px; }
.big-progress { height: 14px; border-radius: 999px; background:#e2e8f0; overflow:hidden; }
.big-progress span { display:block; height:100%; border-radius:999px; background: linear-gradient(135deg, #16a34a, #06b6d4); }
.toolbar { background:#fff; border:1px solid #e8edf5; padding: 14px; border-radius: 18px; box-shadow: 0 8px 25px rgba(15,23,42,.05); }
.search-form input { background:#f8fafc; }
button, .button { transition: transform .13s ease, box-shadow .13s ease; }
button:hover, .button:hover { transform: translateY(-1px); }
.button:active, button:active { transform: translateY(0); }
.status { border: 1px solid currentColor; }
.status.pending { background:#fff7ed; color:#c2410c; }
.status.partial { background:#fffbeb; color:#b45309; }
.status.done { background:#f0fdf4; color:#15803d; }
.status.over { background:#fdf2f8; color:#be185d; }
.project-box { transition: transform .16s ease, box-shadow .16s ease; }
.project-box:hover { transform: translateY(-1px); box-shadow: 0 16px 40px rgba(15,23,42,.09); }
.project-head { background: linear-gradient(135deg, #ffffff, #f7fbff); }
.project-summary span { box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.floor-mobile-cards { display:none; }
.floor-card { border:1px solid #e2e8f0; border-radius:18px; padding:14px; background:#f8fafc; margin-top:12px; }
.floor-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:10px; }
.floor-card-head strong { font-size:16px; }
.floor-card-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:10px 0; }
.floor-card-grid div { background:#fff; border:1px solid #e5edf7; border-radius:12px; padding:10px; }
.floor-card-grid span { display:block; color:#64748b; font-size:11px; font-weight:900; text-transform:uppercase; margin-bottom:4px; }
.receipt-form-card { max-width: 760px; }
.receipt-hero { background: linear-gradient(135deg, #0f172a, #312e81); color:#fff; border-radius: 22px; padding:18px; margin-bottom:18px; }
.receipt-hero h1 { margin:0 0 7px; }
.receipt-hero p { margin:0; opacity:.8; }
.quick-amount-row { display:grid; grid-template-columns: repeat(3,1fr); gap:8px; margin-top:10px; }
.quick-amount-row button { margin:0; background:#eef2ff; color:#3730a3; box-shadow:none; }
.alert.toast-alert { position: fixed; right: 22px; top: 84px; z-index: 200; max-width: 460px; background:#ecfdf5; color:#166534; border-color:#86efac; box-shadow: 0 16px 45px rgba(15,23,42,.18); transition:.28s ease; }
.alert.toast-alert.hide { opacity:0; transform: translateY(-10px); pointer-events:none; }
.bottom-nav { display:none; }
@media (max-width: 980px) {
    .app-shell { display:block; }
    .sidebar { display:none; }
    .mobile-brand { display:flex; }
    .page-title-box { display:none; }
    .app-topbar { position: sticky; top:0; z-index: 50; padding: 12px 14px; }
    .app-topbar .login-user-box { min-width:0; max-width: 180px; padding: 7px 10px; }
    .app-topbar .login-user-box small { display:none; }
    body.with-sidebar .container { margin: 16px auto 96px; padding: 0 12px; }
    .bottom-nav { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 100; display:flex; justify-content:space-around; gap:5px; background: rgba(15,23,42,.94); backdrop-filter: blur(15px); border-radius: 22px; padding: 8px; box-shadow: 0 16px 40px rgba(15,23,42,.25); }
    .bottom-nav a { color:rgba(255,255,255,.76); text-decoration:none; display:grid; place-items:center; gap:2px; min-width:54px; font-size:11px; font-weight:800; padding:6px 8px; border-radius:16px; }
    .bottom-nav a span { font-size:18px; line-height:1; }
    .bottom-nav a.active { background: rgba(255,255,255,.14); color:#fff; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat { min-height: 105px; padding: 16px; border-radius: 16px; }
    .stat b { font-size: 18px; }
    .stat span { font-size: 11px; }
    .toolbar { display:grid; gap:10px; }
    .toolbar .button { width:100%; }
    .project-summary { grid-template-columns: 1fr 1fr; }
    .project-summary span:last-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .compact-table { display:none; }
    .floor-mobile-cards { display:block; }
    .floor-card-grid { grid-template-columns:1fr; }
    .entry-summary-box { grid-template-columns:1fr 1fr; }
    .quick-amount-row { grid-template-columns:1fr; }
    .alert.toast-alert { left:12px; right:12px; top:74px; max-width:none; }
}
@media (max-width: 430px) {
    .stats { grid-template-columns: 1fr; }
    .app-topbar .login-user-box { max-width: 150px; }
    .entry-summary-box { grid-template-columns:1fr; }
}
@media print {
    .sidebar, .bottom-nav, .app-topbar { display:none !important; }
    .app-shell { display:block; }
}

/* V4Q ADMIN PROJECT CARDS + SOFT DELETE UI */
.admin-project-accordion .project-head { align-items: stretch; }
.project-action-bar { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin: 14px 0 4px; }
.action-cell { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.card-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.button.delete-soft, button.delete-soft, .delete-soft {
    background: linear-gradient(135deg, #475569, #334155) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(51,65,85,.18) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
}
.button.delete-soft:before, button.delete-soft:before { content: "🗑"; font-size: 13px; }
.button.delete-soft:hover, button.delete-soft:hover {
    background: linear-gradient(135deg, #334155, #1e293b) !important;
}
.button.remove-soft, button.remove-soft {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(245,158,11,.20) !important;
}
button.danger, .danger { color: #92400e !important; }
.button.danger, button.danger { background: linear-gradient(135deg, #f59e0b, #d97706) !important; color:#fff !important; }
.danger-zone { border-top:1px solid #fde68a !important; }
.danger-btn { background: linear-gradient(135deg, #475569, #334155) !important; }
.logout-link { background: rgba(71,85,105,.25) !important; }
.admin-floor-cards { margin-top: 12px; }
@media (min-width: 701px) {
    .admin-floor-cards { display:none !important; }
}
@media (max-width: 700px) {
    .admin-project-accordion .compact-table { display:none; }
    .admin-floor-cards { display:block; }
    .project-action-bar { display:grid; grid-template-columns:1fr; }
    .project-action-bar .button, .project-action-bar button { width:100%; }
    .card-actions { display:grid; grid-template-columns:1fr; }
    .card-actions .button, .card-actions button { width:100%; }
}


/* V4R REPORT STATUS ALIGNMENT FIX */
.card { overflow-x: auto; }
.report-table { min-width: 980px; table-layout: fixed; }
.project-summary-table th:nth-child(1), .project-summary-table td:nth-child(1) { width: 145px; }
.project-summary-table th:nth-child(2), .project-summary-table td:nth-child(2) { width: 90px; text-align:center; }
.project-summary-table th:nth-child(3), .project-summary-table td:nth-child(3),
.project-summary-table th:nth-child(4), .project-summary-table td:nth-child(4),
.project-summary-table th:nth-child(5), .project-summary-table td:nth-child(5) { width: 150px; text-align:right; }
.project-summary-table th:nth-child(6), .project-summary-table td:nth-child(6) { width: 155px; }
.floor-summary-table th:nth-child(1), .floor-summary-table td:nth-child(1) { width: 135px; }
.floor-summary-table th:nth-child(2), .floor-summary-table td:nth-child(2) { width: 190px; white-space: normal; }
.floor-summary-table th:nth-child(3), .floor-summary-table td:nth-child(3) { width: 130px; }
.floor-summary-table th:nth-child(4), .floor-summary-table td:nth-child(4),
.floor-summary-table th:nth-child(5), .floor-summary-table td:nth-child(5),
.floor-summary-table th:nth-child(6), .floor-summary-table td:nth-child(6) { width: 135px; text-align:right; }
.status-col, .status-cell { width: 125px !important; min-width: 125px; text-align: center !important; }
.status-cell { vertical-align: middle; overflow: visible; }
.status { display: inline-flex; align-items: center; justify-content: center; min-width: 92px; max-width: 112px; height: 28px; padding: 0 10px; line-height: 1; box-sizing: border-box; white-space: nowrap; border-radius: 999px; }
.status.pending { background:#fff7ed; color:#c2410c; border-color:#fdba74; }
.status.partial { background:#fffbeb; color:#b45309; border-color:#fcd34d; }
.status.done { background:#f0fdf4; color:#15803d; border-color:#86efac; }
.status.over { background:#fdf2f8; color:#be185d; border-color:#f9a8d4; }
.progress-cell { min-width: 155px; }
.progress-wrap { justify-content: center; }
@media (max-width: 980px) {
  .report-table { min-width: 980px; }
  .card { -webkit-overflow-scrolling: touch; }
}


/* V4T submission value UI */
.stat:nth-child(7) { background: linear-gradient(135deg, #7c3aed, #db2777); }
.stat:nth-child(7):before { content:"📤"; }
.stat:nth-child(8) { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.stat:nth-child(8):before { content:"⏳"; }
.submission-note { background:#f8fafc; border:1px solid #e2e8f0; border-radius:14px; padding:12px 14px; color:#475569; font-weight:700; }
.submission-form-card { max-width: 780px; }
.action-stack { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.button.submit-soft { background: linear-gradient(135deg, #0f766e, #14b8a6) !important; box-shadow: 0 8px 18px rgba(20,184,166,.20) !important; }
.button.submit-soft:before { content:"📤"; }
.summary-mini { display:grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap:10px; margin-top:12px; }
.summary-mini div { background:#fff; border:1px solid #e2e8f0; border-radius:14px; padding:11px 12px; }
.summary-mini span { display:block; color:#64748b; text-transform:uppercase; font-size:11px; font-weight:900; margin-bottom:4px; }
.summary-mini b { font-size:16px; }


.app-topbar { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.topbar-actions { display:flex; align-items:center; gap:12px; margin-left:auto; }
.top-submit-btn { margin-top:0; white-space:nowrap; }
.stat:before { display:none !important; content:none !important; }
.stat:nth-child(6) { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.stat:nth-child(7) { background: linear-gradient(135deg, #0f766e, #14b8a6); }
@media (max-width: 980px) {
    .topbar-actions { gap:8px; }
    .top-submit-btn { padding:8px 10px; font-size:12px; }
}
@media (max-width: 700px) {
    .topbar-actions { max-width:100%; }
    .topbar-actions .login-user-box { max-width: 150px; }
    .topbar-actions .top-submit-btn { max-width: 120px; }
}


/* V4Y dashboard card cleanup */
.stats .stat::before,
.stats .stat::after {
    display: none !important;
    content: "" !important;
    opacity: 0 !important;
    visibility: hidden !important;
}
.stats .stat.submitted-card {
    background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
    color: #ffffff !important;
}
.stats .stat.pending-submission-card {
    background: linear-gradient(135deg, #0f766e, #14b8a6) !important;
    color: #ffffff !important;
}
.stats .stat.submitted-card span,
.stats .stat.submitted-card b,
.stats .stat.pending-submission-card span,
.stats .stat.pending-submission-card b {
    color: #ffffff !important;
    opacity: 1 !important;
    text-shadow: 0 1px 1px rgba(0,0,0,.08);
}
.stats .stat b {
    line-height: 1.15;
    letter-spacing: .2px;
}
@media (max-width: 980px) {
    .stats .stat b { font-size: 22px; }
}


/* V4Z FINAL DASHBOARD CARD FIX - removes all hidden icons/circles and improves visibility */
.stats .stat,
.stat {
    position: relative;
    isolation: isolate;
    color: #ffffff !important;
    text-shadow: none !important;
}
.stats .stat::before,
.stats .stat::after,
.stat::before,
.stat::after {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.stats .stat span,
.stats .stat b,
.stat span,
.stat b {
    position: relative;
    z-index: 2;
    color: #ffffff !important;
    opacity: 1 !important;
    text-shadow: none !important;
}
.stats .stat span,
.stat span {
    color: rgba(255,255,255,.94) !important;
    font-weight: 900 !important;
}
.stats .stat b,
.stat b {
    font-weight: 900 !important;
    line-height: 1.12 !important;
}
.stats .stat.submitted-card,
.stat.submitted-card {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
    border: none !important;
}
.stats .stat.pending-submission-card,
.stat.pending-submission-card {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%) !important;
    border: none !important;
}
@media (min-width: 981px) {
    .stats .stat b { font-size: clamp(24px, 2.1vw, 34px) !important; }
}


/* V4AA: dashboard-level submit button position */
.dashboard-title-row { display:flex; align-items:center; justify-content:space-between; gap:16px; margin: 0 0 22px; }
.dashboard-title-row h1 { margin:0; }
.dashboard-submit-btn { margin-top:0; min-width:150px; box-shadow: 0 12px 28px rgba(20,184,166,.28); }
.topbar-actions .top-submit-btn { display:none !important; }
@media (max-width: 700px) {
    .dashboard-title-row { align-items:flex-start; gap:10px; }
    .dashboard-submit-btn { min-width:auto; padding:10px 12px; font-size:13px; }
}


/* V4AD user dashboard: only submission cards are shown for normal users */
.user-submission-only-stats { grid-template-columns: repeat(2, minmax(240px, 1fr)); max-width: 720px; }
.submitted-card { background: linear-gradient(135deg, #4f46e5, #06b6d4) !important; color: #fff !important; }
.pending-submission-card { background: linear-gradient(135deg, #f59e0b, #f97316) !important; color: #fff !important; }
.submitted-card span, .pending-submission-card span,
.submitted-card b, .pending-submission-card b { color: #fff !important; opacity: 1 !important; }
@media (max-width: 700px) {
  .user-submission-only-stats { grid-template-columns: 1fr; max-width: none; }
}

.submission-progress-card { margin-top: -8px; }
.submission-progress span { background: linear-gradient(135deg, #7c3aed, #0f766e) !important; }


/* V4AI user work progress update */
.user-submission-only-stats { grid-template-columns: repeat(3, minmax(220px, 1fr)) !important; max-width: none !important; }
.stats .stat.collected-card,
.stat.collected-card {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%) !important;
    color: #ffffff !important;
    border: none !important;
}
.stats .stat.collected-card span,
.stats .stat.collected-card b,
.stat.collected-card span,
.stat.collected-card b {
    color:#ffffff !important;
    opacity:1 !important;
}
@media (max-width: 980px) {
  .user-submission-only-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 700px) {
  .user-submission-only-stats { grid-template-columns: 1fr !important; }
}


/* V4AK user management buttons/layout */
.user-page-title-row { margin-bottom: 20px; }
.user-page-title-row .button { margin-top: 0; }
.user-form-card .section-title { align-items: center; }
.user-form-card .section-title .button { margin-top: 0; }
.form-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top: 14px; }
.form-actions .button, .form-actions button { margin-top:0; }
.user-list-card .action-cell form { margin:0; }
.user-list-card .action-cell .button, .user-list-card .action-cell button { margin-top:0; }
@media (min-width: 701px) { .user-mobile-cards { display:none !important; } }
@media (max-width: 700px) {
  .user-list-card .compact-table { display:none; }
  .user-mobile-cards { display:block; }
}

.disabled-btn {
    background: #cbd5e1 !important;
    color: #475569 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}


/* V4AU: Report amount/value alignment fix */
.report-table th.amount-col,
.report-table td.amount-col,
.report-table tfoot th.amount-col,
.report-table tfoot td.amount-col,
th.amount-col,
td.amount-col {
    text-align: center !important;
    vertical-align: middle !important;
    font-variant-numeric: tabular-nums !important;
}

.report-table tfoot th,
.report-table tfoot td,
tfoot th,
tfoot td {
    vertical-align: middle !important;
}

.report-total-label {
    text-align: left !important;
}

.report-value-center {
    text-align: center !important;
    font-variant-numeric: tabular-nums !important;
}


/* V4AV: strict total row alignment for report tables */
.report-table {
    table-layout: fixed !important;
    width: 100% !important;
}
.report-table th,
.report-table td {
    vertical-align: middle !important;
}
.report-table .amount-col,
.report-table th.amount-col,
.report-table td.amount-col {
    text-align: right !important;
    font-variant-numeric: tabular-nums !important;
}
.report-table .status-col,
.report-table th.status-col,
.report-table td.status-col {
    text-align: center !important;
}
.report-table tfoot td,
.report-table tfoot th {
    background: #eef4ff !important;
    font-weight: 900 !important;
}
.report-table tfoot .blank-total-cell {
    color: transparent !important;
}
.report-table .total-label-cell {
    text-align: left !important;
}


/* V4AW: exact report column alignment */
.aligned-report-table {
    table-layout: fixed !important;
    width: 100% !important;
}
.floor-summary-table th:nth-child(1), .floor-summary-table td:nth-child(1) { width: 14% !important; }
.floor-summary-table th:nth-child(2), .floor-summary-table td:nth-child(2) { width: 20% !important; }
.floor-summary-table th:nth-child(3), .floor-summary-table td:nth-child(3) { width: 18% !important; }
.floor-summary-table th:nth-child(4), .floor-summary-table td:nth-child(4) { width: 13% !important; }
.floor-summary-table th:nth-child(5), .floor-summary-table td:nth-child(5) { width: 15% !important; }
.floor-summary-table th:nth-child(6), .floor-summary-table td:nth-child(6) { width: 12% !important; }
.floor-summary-table th:nth-child(7), .floor-summary-table td:nth-child(7) { width: 8% !important; }

.report-table .amount-col,
.report-table th.amount-col,
.report-table td.amount-col,
.report-table tfoot .amount-col {
    text-align: center !important;
    vertical-align: middle !important;
    font-variant-numeric: tabular-nums !important;
}
.report-table .status-col,
.report-table .status-cell {
    text-align: center !important;
}
.report-table .blank-total-cell {
    color: transparent !important;
    text-align: center !important;
}
.report-table .total-label-cell {
    text-align: left !important;
}


/* V4AY: exact right alignment for report value columns */
.report-table th.amount-col,
.report-table td.amount-col,
.report-table tfoot th.amount-col,
.report-table tfoot td.amount-col,
.floor-summary-table th:nth-child(4),
.floor-summary-table td:nth-child(4),
.floor-summary-table th:nth-child(5),
.floor-summary-table td:nth-child(5),
.floor-summary-table th:nth-child(6),
.floor-summary-table td:nth-child(6),
.project-summary-table th:nth-child(3),
.project-summary-table td:nth-child(3),
.project-summary-table th:nth-child(4),
.project-summary-table td:nth-child(4),
.project-summary-table th:nth-child(5),
.project-summary-table td:nth-child(5),
.entries-table th:last-child,
.entries-table td:last-child {
    text-align: right !important;
    padding-right: 28px !important;
    font-variant-numeric: tabular-nums !important;
}

.report-table tfoot th.amount-col,
.report-table tfoot td.amount-col {
    text-align: right !important;
    padding-right: 28px !important;
}

.report-table th.amount-col {
    text-align: right !important;
}

.report-table .amount-positive,
.report-table .amount-balance {
    text-align: right !important;
    padding-right: 28px !important;
}

.report-table .total-label-cell {
    text-align: left !important;
}

.report-table .blank-total-cell {
    color: transparent !important;
}
@media (max-width: 768px) {
    .sidebar {
        overflow-y: auto !important;
        max-height: 100vh !important;
        padding-bottom: 120px !important;
    }

    .sidebar nav,
    .sidebar .nav,
    .sidebar-menu,
    .nav-menu {
        overflow-y: auto !important;
        max-height: calc(100vh - 80px) !important;
        padding-bottom: 120px !important;
    }

    .sidebar a,
    .nav-link,
    .menu-link {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}
/* ADMIN MOBILE BOTTOM MENU SCROLL FIX */
@media (max-width: 980px) {
    .bottom-nav {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        justify-content: flex-start !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    .bottom-nav::-webkit-scrollbar {
        display: none !important;
    }

    .bottom-nav a {
        min-width: 78px !important;
        flex: 0 0 auto !important;
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}