:root{--nav:#063c38;--nav2:#07564d;--bg:#eef3f9;--surface:#fff;--surface2:#f7f9fc;--text:#142033;--muted:#68768a;--line:#e1e7ef;--primary:#0b9b7d;--primary2:#08765f;--success:#14804a;--danger:#c43232;--warning:#b26b00;--radius:18px;--shadow:0 12px 35px rgba(15,23,42,.07)}*{box-sizing:border-box}html{min-height:100%;background:var(--bg)}body{margin:0;color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:radial-gradient(circle at 80% -10%,rgba(11,155,125,.10),transparent 35%),linear-gradient(180deg,#f8fbff 0,#eef3f9 55%,#e9eff7 100%);min-height:100vh}.app-shell{min-height:100vh;display:flex}.sidebar{width:270px;background:linear-gradient(180deg,var(--nav),var(--nav2));color:#fff;padding:20px 14px;position:fixed;inset:0 auto 0 0;z-index:40;display:flex;flex-direction:column;box-shadow:12px 0 35px rgba(2,8,23,.13)}.brand{display:flex;gap:11px;align-items:center;padding:8px 10px 20px;border-bottom:1px solid rgba(255,255,255,.09)}.brand strong{display:block;font-size:15px}.brand small{display:block;color:#aab8d0;font-size:11px;margin-top:3px}.brand-mark{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;background:#fff;color:var(--nav);font-weight:900;letter-spacing:-1px}.tenant-badge{margin:15px 5px 8px;padding:11px 12px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.05);border-radius:13px}.tenant-badge span{display:block;color:#94a4bd;font-size:10px;text-transform:uppercase;letter-spacing:1px}.tenant-badge strong{display:block;font-size:12px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-nav{display:grid;gap:4px;margin-top:10px;overflow:auto;padding-right:3px}.sidebar-nav a,.sidebar-foot a{color:#d7e1f1;text-decoration:none;padding:11px 12px;border-radius:11px;display:flex;align-items:center;gap:10px;font-size:13px;font-weight:600}.sidebar-nav a:hover,.sidebar-nav a.active{background:rgba(255,255,255,.10);color:#fff}.sidebar-nav a.active{box-shadow:inset 3px 0 0 #61a2ff}.nav-icon{width:22px;text-align:center;color:#9db8dc;font-size:15px}.sidebar-nav a em{margin-left:auto;font-size:9px;color:#8da0ba;font-style:normal}.sidebar-foot{margin-top:auto;border-top:1px solid rgba(255,255,255,.09);padding-top:12px}.main{margin-left:270px;width:calc(100% - 270px);min-height:100vh;display:flex;flex-direction:column}.topbar{min-height:88px;background:rgba(255,255,255,.90);backdrop-filter:blur(14px);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:16px;padding:15px 32px;position:sticky;top:0;z-index:25}.page-heading{min-width:0}.page-heading h1{font-size:22px;margin:3px 0 0;letter-spacing:-.3px}.page-heading p{margin:3px 0 0;color:var(--muted);font-size:12px}.eyebrow{font-size:9px;letter-spacing:1.8px;color:var(--primary);font-weight:850}.topbar-actions{margin-left:auto;display:flex;align-items:center;gap:10px}.status-dot{font-size:11px;color:var(--success);background:#edf9f2;padding:8px 10px;border-radius:999px;font-weight:700}.status-dot i{display:inline-block;width:7px;height:7px;background:#22a35a;border-radius:50%;margin-right:5px}.user-pill{border:1px solid var(--line);background:#fff;border-radius:13px;padding:8px 12px;display:flex;flex-direction:column;font-size:12px;font-weight:700}.user-pill small{color:var(--muted);font-size:9px;margin-top:2px}.menu-btn{display:none;border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 11px}.content{padding:28px 32px;max-width:1600px;width:100%;margin:0 auto;flex:1}.alert{margin:18px 32px 0;padding:13px 15px;border-radius:13px;border:1px solid transparent;font-size:13px}.alert.success{background:#edf9f2;color:#146c3f;border-color:#ccebd9}.alert.error{background:#fff0f0;color:#9d2d2d;border-color:#f3cccc}.grid{display:grid;gap:18px}.stats{grid-template-columns:repeat(4,minmax(0,1fr))}.stat-card,.panel,.module-card,.table-card{background:rgba(255,255,255,.94);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.stat-card{padding:20px;position:relative;overflow:hidden}.stat-card:after{content:"";position:absolute;right:-30px;top:-30px;width:90px;height:90px;border-radius:50%;background:rgba(11,155,125,.07)}.stat-card span,.stat-card small{display:block;color:var(--muted);font-size:12px}.stat-card strong{display:block;font-size:29px;margin:8px 0;letter-spacing:-.5px}.panel{padding:22px}.panel h2{font-size:16px;margin:0 0 14px}.modules{grid-template-columns:repeat(3,minmax(0,1fr))}.module-card{padding:20px;text-decoration:none;color:inherit;display:flex;justify-content:space-between;min-height:145px;transition:.18s}.module-card:hover{transform:translateY(-2px);box-shadow:0 18px 40px rgba(15,23,42,.11)}.module-card h3{margin:12px 0 6px;font-size:16px}.module-card p{color:var(--muted);font-size:12px;line-height:1.55;margin:0;max-width:280px}.module-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#e8f8f3;color:var(--primary)}.module-card b{font-size:9px;color:var(--success);background:#eaf7ef;height:max-content;padding:6px 9px;border-radius:999px}.table-card{overflow:auto}.table-card table{width:100%;border-collapse:collapse}.table-card th,.table-card td{padding:13px 15px;text-align:left;border-bottom:1px solid var(--line);font-size:12px;white-space:nowrap}.table-card th{background:#f8fafc;color:#667085;font-size:10px;text-transform:uppercase;letter-spacing:.5px}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:11px;padding:10px 14px;text-decoration:none;cursor:pointer;font-weight:700;font-size:12px}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:var(--primary2)}.btn-light{background:#eef3f8;color:var(--text)}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.field label{display:block;font-size:11px;font-weight:750;margin-bottom:7px}.field input,.field select,.field textarea{width:100%;border:1px solid #d6dde7;border-radius:11px;padding:11px 12px;background:#fff;font:inherit;font-size:13px;outline:none}.field input:focus,.field select:focus,.field textarea:focus{border-color:#7aaaf0;box-shadow:0 0 0 3px rgba(11,155,125,.10)}.field textarea{min-height:110px;resize:vertical}.hero{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.hero h2{margin:0;font-size:27px;letter-spacing:-.6px}.hero p{color:var(--muted);font-size:13px}.section-gap{margin-top:22px}.app-footer{padding:18px 32px;color:#7a8799;font-size:10px;display:flex;justify-content:space-between;gap:15px}.mobile-overlay{display:none}.auth-page{min-height:100vh;display:grid;place-items:center;padding:22px}.auth-card{width:min(460px,100%);background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:22px;box-shadow:0 24px 70px rgba(15,23,42,.13);padding:30px}.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:22px}.auth-brand .brand-mark{background:var(--nav);color:#fff}.auth-card h1{margin:0 0 7px;font-size:25px}.auth-card .muted{color:var(--muted);font-size:12px;margin-bottom:22px}@media(max-width:1100px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.modules{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar{width:245px}.main{margin-left:245px;width:calc(100% - 245px)}}@media(max-width:760px){.sidebar{width:280px;transform:translateX(-105%);transition:transform .22s ease;box-shadow:20px 0 50px rgba(2,8,23,.25)}.nav-open .sidebar{transform:translateX(0)}.mobile-overlay{display:block;position:fixed;inset:0;background:rgba(2,8,23,.42);z-index:35;opacity:0;pointer-events:none;transition:.2s}.nav-open .mobile-overlay{opacity:1;pointer-events:auto}.main{margin-left:0;width:100%}.menu-btn{display:block}.content{padding:18px}.topbar{padding:12px 18px;min-height:76px}.topbar-actions .status-dot{display:none}.user-pill{display:none}.stats,.modules,.form-grid{grid-template-columns:1fr}.hero{align-items:flex-start;flex-direction:column}.hero h2{font-size:23px}.app-footer{padding:16px 18px;flex-direction:column}.alert{margin:14px 18px 0}.page-heading h1{font-size:19px}}
.module-tag{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;background:#edf5ff;color:#1769e0;font-size:9px;font-weight:800;letter-spacing:.5px}.module-arrow{font-size:22px;color:#9aa8bb;align-self:flex-end}.muted{color:var(--muted)}
/* 360 Services Brand System */
.brand-logo{display:block;width:170px;height:auto;max-height:58px;object-fit:contain;object-position:left center}
.auth-brand{align-items:center}
.auth-logo{display:block;width:210px;max-width:100%;height:auto;margin:0 auto 18px}
.auth-brand-copy{display:none}
.sidebar .brand{padding:10px 10px 18px}
.sidebar .brand-logo{width:185px;max-height:64px;margin:0 auto}
.portal-brand-footer{display:flex;align-items:center;gap:12px}
.portal-brand-footer img{width:105px;height:auto}
@media(max-width:760px){.sidebar .brand-logo{width:175px}.auth-logo{width:200px}}


/* =========================================================
   360 SERVICES — FIXED GLOBAL HEADER / FOOTER
   Keep the shell position and branding identical on every
   authenticated page. Page-specific title/subtitle may change.
   ========================================================= */
:root{--sidebar-width:270px;--topbar-height:88px;--footer-height:72px}
.main{margin-left:var(--sidebar-width);width:calc(100% - var(--sidebar-width));min-height:100vh;display:block;padding-top:var(--topbar-height);padding-bottom:var(--footer-height)}
.topbar{position:fixed;left:var(--sidebar-width);right:0;top:0;height:var(--topbar-height);min-height:var(--topbar-height);z-index:100;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);border-bottom:1px solid var(--line);padding:15px 32px}
.content{padding:28px 32px;max-width:1600px;width:100%;margin:0 auto;min-height:calc(100vh - var(--topbar-height) - var(--footer-height));}
.app-footer{position:fixed;left:var(--sidebar-width);right:0;bottom:0;height:var(--footer-height);z-index:90;background:rgba(255,255,255,.97);border-top:1px solid var(--line);padding:12px 32px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 -8px 25px rgba(15,23,42,.04)}
.portal-brand-footer{display:flex;align-items:center;gap:12px;min-width:0}
.portal-brand-footer img{display:block;width:105px;height:auto;max-height:42px;object-fit:contain}
.portal-brand-footer span{white-space:nowrap;font-weight:700;color:#526174}
.footer-copy{white-space:nowrap;text-align:right}
.user-menu{position:relative}
.user-pill{appearance:none;border:1px solid var(--line);background:#fff;border-radius:14px;padding:7px 10px;display:flex;align-items:center;gap:9px;cursor:pointer;color:var(--text);font:inherit;text-align:left;min-width:190px}
.user-pill:hover{border-color:#b8c5d4;box-shadow:0 6px 18px rgba(15,23,42,.07)}
.user-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#9ee85e,#07957a);color:#fff;font-weight:900;font-size:13px;flex:0 0 34px}
.user-details{display:flex;flex-direction:column;min-width:0;line-height:1.2}
.user-details strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:145px}
.user-details small{color:var(--muted);font-size:9px;margin-top:3px}
.user-chevron{margin-left:auto;color:#718096;font-size:16px}
.user-dropdown{position:absolute;right:0;top:calc(100% + 9px);width:230px;background:#fff;border:1px solid var(--line);border-radius:15px;box-shadow:0 18px 45px rgba(15,23,42,.16);padding:7px;z-index:120}
.user-dropdown[hidden]{display:none}
.user-dropdown-head{padding:10px 11px 9px;border-bottom:1px solid var(--line);margin-bottom:5px}
.user-dropdown-head strong,.user-dropdown-head span{display:block}
.user-dropdown-head strong{font-size:12px}
.user-dropdown-head span{font-size:9px;color:var(--muted);margin-top:3px}
.user-dropdown a{display:flex;align-items:center;gap:9px;padding:10px 11px;border-radius:10px;color:var(--text);text-decoration:none;font-size:12px;font-weight:700}
.user-dropdown a:hover{background:#f3f8f7}
.user-dropdown .logout-link{color:#b42318}
@media(max-width:1100px){:root{--sidebar-width:245px}}
@media(max-width:760px){
 :root{--sidebar-width:0px;--topbar-height:76px;--footer-height:94px}
 .main{margin-left:0;width:100%;padding-top:var(--topbar-height);padding-bottom:var(--footer-height)}
 .topbar{left:0;height:var(--topbar-height);min-height:var(--topbar-height);padding:12px 18px}
 .content{padding:18px;min-height:calc(100vh - var(--topbar-height) - var(--footer-height))}
 .app-footer{left:0;height:var(--footer-height);padding:10px 18px;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px}
 .portal-brand-footer{gap:8px}
 .portal-brand-footer img{width:88px;max-height:34px}
 .portal-brand-footer span{font-size:9px}
 .footer-copy{font-size:9px;white-space:normal;text-align:left}
 .status-dot{display:none}
 .user-pill{min-width:44px;width:44px;height:44px;padding:5px;justify-content:center;border-radius:13px}
 .user-details,.user-chevron{display:none}
 .user-avatar{width:32px;height:32px;flex-basis:32px}
 .user-dropdown{right:0;top:calc(100% + 8px);width:220px}
}

/* =========================================================
   FINAL SHELL LOCK — HEADER / SIDEBAR / FOOTER
   Prevent the global chrome from sliding horizontally or
   vertically with page content. Only .content may scroll.
   ========================================================= */
html, body { width:100%; max-width:100%; overflow-x:hidden; }
body.app-body { min-width:0; }
.app-shell { position:relative; width:100%; min-height:100vh; overflow-x:hidden; }
.sidebar { position:fixed !important; left:0; top:0; bottom:0; width:var(--sidebar-width); height:100vh; overflow-y:auto; overflow-x:hidden; }
.main { position:relative; margin-left:var(--sidebar-width); width:calc(100% - var(--sidebar-width)); max-width:calc(100% - var(--sidebar-width)); min-width:0; padding-top:var(--topbar-height); padding-bottom:var(--footer-height); overflow-x:hidden; }
.topbar { position:fixed !important; left:var(--sidebar-width); right:0; top:0; width:auto; height:var(--topbar-height); min-height:var(--topbar-height); overflow:visible; }
.topbar-actions { min-width:0; flex:0 0 auto; }
.page-heading { min-width:0; overflow:hidden; }
.page-heading h1, .page-heading p { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.content { width:100%; max-width:1600px; min-width:0; overflow-x:auto; overflow-y:visible; }
.app-footer { position:fixed !important; left:var(--sidebar-width); right:0; bottom:0; width:auto; height:var(--footer-height); min-height:var(--footer-height); overflow:hidden; }

@media (max-width:760px) {
    .sidebar { width:280px; }
    .main { margin-left:0; width:100%; max-width:100%; padding-top:var(--topbar-height); padding-bottom:var(--footer-height); }
    .topbar { left:0; right:0; width:100%; }
    .app-footer { left:0; right:0; width:100%; }
    .page-heading h1, .page-heading p { white-space:nowrap; }
}

/* =========================================================
   CHANGE PASSWORD MODAL
   Opened from the global header user menu on every portal page.
   ========================================================= */
.modal-backdrop{position:fixed;inset:0;z-index:500;background:rgba(2,8,23,.56);backdrop-filter:blur(4px);display:grid;place-items:center;padding:22px;overflow-y:auto}
.modal-backdrop[hidden]{display:none}
.modal-card{width:min(560px,100%);background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 28px 80px rgba(2,8,23,.28);overflow:hidden}
.password-modal{max-height:calc(100vh - 44px);overflow:auto}
.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:22px 24px 18px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#f8fffd,#fff)}
.modal-eyebrow{display:block;color:var(--primary);font-size:9px;font-weight:850;letter-spacing:1.6px;margin-bottom:5px}
.modal-head h2{margin:0;font-size:19px;letter-spacing:-.2px}
.modal-head p{margin:5px 0 0;color:var(--muted);font-size:11px}
.modal-close{width:34px;height:34px;flex:0 0 34px;border:1px solid var(--line);background:#fff;border-radius:10px;color:#667085;font-size:23px;line-height:1;cursor:pointer;display:grid;place-items:center}
.modal-close:hover{background:#f4f7f9;color:var(--text)}
.password-modal-form{padding:22px 24px 24px;display:grid;gap:15px}
.password-modal-form .field{display:grid;gap:7px}
.password-modal-form .field label{font-size:11px;font-weight:750}
.password-modal-form .field input{width:100%;border:1px solid #d6dde7;border-radius:11px;padding:11px 12px;background:#fff;font:inherit;font-size:13px;outline:none}
.password-modal-form .field input:focus{border-color:#7aaaf0;box-shadow:0 0 0 3px rgba(11,155,125,.10)}
.password-modal-form .field small{color:var(--muted);font-size:10px}
.password-modal-note{padding:11px 12px;border:1px solid #dcefe9;background:#f2faf7;border-radius:11px;color:#526174;font-size:10px}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;padding-top:4px}
body.modal-open{overflow:hidden}
@media(max-width:760px){.modal-backdrop{padding:12px}.modal-head{padding:18px}.password-modal-form{padding:18px}.modal-actions{flex-direction:column-reverse}.modal-actions .btn{width:100%}}


/* =========================================================
   COMPACT GLOBAL USER CONTROL
   Keep the logged-in user control small and aligned with the
   fixed header. Role remains available inside the dropdown.
   ========================================================= */
.user-pill{min-width:0 !important;width:auto !important;max-width:210px;height:38px;padding:5px 9px !important;border-radius:10px !important;gap:7px !important;box-shadow:none !important}
.user-avatar{width:27px !important;height:27px !important;flex:0 0 27px !important;font-size:11px !important}
.user-details{display:block !important;min-width:0 !important;line-height:1 !important}
.user-details strong{font-size:11px !important;font-weight:750 !important;max-width:145px !important;display:block}
.user-details small{display:none !important}
.user-chevron{font-size:14px !important;margin-left:2px !important}
.user-pill:hover{box-shadow:0 4px 12px rgba(15,23,42,.06) !important}
@media(max-width:760px){
 .user-pill{min-width:38px !important;width:38px !important;height:38px !important;padding:5px !important;border-radius:10px !important}
 .user-avatar{width:27px !important;height:27px !important;flex-basis:27px !important}
}


/* =========================================================
   FINAL COMPACT USER MENU — NAME ONLY
   Header display: Shyam Wankhade ▾
   ========================================================= */
.user-pill{
    min-width:0 !important;
    width:auto !important;
    max-width:240px;
    height:36px;
    padding:5px 8px 5px 10px !important;
    border:0 !important;
    background:transparent !important;
    border-radius:8px !important;
    display:inline-flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:5px !important;
    box-shadow:none !important;
    color:var(--text);
}
.user-pill:hover{
    background:#f4f7f9 !important;
    border:0 !important;
    box-shadow:none !important;
}
.user-name{
    display:block;
    max-width:180px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:12px;
    line-height:1;
    font-weight:700;
}
.user-chevron{
    display:inline-block;
    margin:0 !important;
    color:#64748b;
    font-size:13px !important;
    line-height:1;
}
@media(max-width:760px){
    .user-pill{
        width:auto !important;
        max-width:170px;
        height:34px;
        padding:5px 6px !important;
    }
    .user-name{font-size:11px;max-width:125px}
    .user-chevron{font-size:12px !important}
}
