/* NGM COE Portal — COE Panel (ERP app). Works with portal.css (.coe tokens). */
html,body.coe-app-body{margin:0;padding:0;background:#f4f6fa}
body.coe-app-body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans Tamil",Arial,sans-serif;color:#1f2937;-webkit-text-size-adjust:100%}
.coe-app{--side:264px;display:flex;min-height:100vh;min-height:100dvh}
.coe-app *,.coe-app *::before,.coe-app *::after{box-sizing:border-box}
.coe-app a{color:inherit}
.coe-app__toggle{position:absolute;opacity:0;pointer-events:none}

/* Sidebar */
.coe-app__side{position:fixed;inset:0 auto 0 0;width:var(--side);background:var(--coe-primary);color:var(--coe-on-primary);display:flex;flex-direction:column;z-index:40;overflow-y:auto;padding-bottom:env(safe-area-inset-bottom,0)}
.coe-app__brand{display:flex;align-items:center;gap:10px;padding:18px 18px 14px;text-decoration:none;border-bottom:1px solid rgba(255,255,255,.12)}
.coe-app__brand img{width:40px;height:40px;object-fit:contain;background:#fff;border-radius:10px;padding:3px}
.coe-app__brand span{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.coe-app__brand strong{font-size:16px}
.coe-app__brand small{font-size:11.5px;opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.coe-app__nav{flex:1;padding:8px 10px 16px}
.coe-app__nav ul{list-style:none;margin:0;padding:0}
.coe-app__group{margin:16px 10px 6px;font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;opacity:.6;font-weight:700}
.coe-app__nav a{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:9px;text-decoration:none;font-size:14.5px;opacity:.9}
.coe-app__nav a:hover{background:rgba(255,255,255,.1);opacity:1}
.coe-app__nav a.is-active{background:#fff;color:var(--coe-primary);opacity:1;font-weight:600}
.coe-app__nav a i{margin-left:auto;font-style:normal;opacity:.5;font-size:12px}
.coe-app__nav svg,.coe-app__sidefoot svg{width:18px;height:18px;flex:none}
.coe-app__sidefoot{border-top:1px solid rgba(255,255,255,.12);padding:10px;display:flex;flex-direction:column;gap:2px}
.coe-app__sidefoot a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;text-decoration:none;font-size:13.5px;opacity:.8}
.coe-app__sidefoot a:hover{background:rgba(255,255,255,.1);opacity:1}
.coe-app__scrim{display:none}

/* Main */
.coe-app__main{flex:1;min-width:0;margin-left:var(--side);display:flex;flex-direction:column}
.coe-app--login .coe-app__main{margin-left:0}
.coe-app__top{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:12px;padding:12px 24px;padding-top:calc(12px + env(safe-area-inset-top,0px));background:rgba(255,255,255,.92);backdrop-filter:saturate(1.4) blur(8px);border-bottom:1px solid #e5e7eb}
.coe-app__title{margin:0;font-size:19px;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#111827}
.coe-app__user{display:flex;align-items:center;gap:10px}
.coe-app__user form{margin:0}
.coe-app__who{display:flex;align-items:center;gap:8px;font-size:14px;line-height:1.15}
.coe-app__who img,.coe-app__who b{width:34px;height:34px;border-radius:50%;object-fit:cover;flex:none}
.coe-app__who b{display:grid;place-items:center;background:var(--coe-primary);color:var(--coe-on-primary)}
.coe-app__who span{display:flex;flex-direction:column}
.coe-app__who small{color:#6b7280;font-size:12px}
.coe-app__burger{display:none;flex-direction:column;justify-content:center;gap:4px;width:38px;height:38px;cursor:pointer;border-radius:9px}
.coe-app__burger span{display:block;height:2px;width:20px;margin:0 auto;background:#111827;border-radius:2px}
.coe-app__content{padding:24px;flex:1;max-width:1400px;width:100%}
.coe-app__foot{padding:16px 24px 24px;font-size:12.5px;color:#9ca3af}
.coe-app__h2{font-size:17px;margin:28px 0 12px;color:#111827}
.coe-app .coe-lookup,.coe-app .coe-findhall,.coe-app .coe-reval,.coe-app .coe-reval-track,.coe-app .coe-qp,.coe-app .coe-calendar{max-width:none;margin:0 0 18px}
.coe-app .coe-panel{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:16px 18px;margin:0 0 18px}

/* Welcome, KPIs */
.coe-welcome{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 16px}
.coe-welcome .coe-hero__eyebrow{display:block;font-size:22px;font-weight:700;color:#111827;text-transform:none;letter-spacing:0}
.coe-welcome p{margin:2px 0 0;color:#6b7280}
.coe-kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px;margin:0 0 20px}
.coe-kpi{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center;background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:14px 16px;text-decoration:none}
.coe-kpi svg{grid-row:1/3;width:38px;height:38px;padding:8px;border-radius:10px;background:color-mix(in srgb,var(--coe-primary) 10%,#fff);color:var(--coe-primary)}
.coe-kpi strong{font-size:24px;line-height:1.1;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.coe-kpi span{font-size:13px;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
a.coe-kpi:hover{border-color:var(--coe-primary)}
.coe-kpi--ok svg{background:#dcfce7;color:#166534}
.coe-kpi--warn svg{background:#fef3c7;color:#92400e}

/* Tasks & launcher */
.coe-tasks a{display:flex;align-items:center;gap:10px;width:100%;text-decoration:none;padding:4px 0}
.coe-tasks svg{width:18px;height:18px;color:var(--coe-primary);flex:none}
.coe-tasks span{flex:1}
.coe-tasks b{background:#fef3c7;color:#92400e;border-radius:999px;padding:2px 10px;font-size:13px}
.coe-launch__group{margin:0 0 18px}
.coe-launch__group h3{margin:0 0 8px;font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:#6b7280}
.coe-launch__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
.coe-launch__card{display:flex;flex-direction:column;gap:6px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:14px;text-decoration:none;transition:border-color .15s,transform .15s}
.coe-launch__card:hover{border-color:var(--coe-primary);transform:translateY(-1px)}
.coe-launch__card svg{width:22px;height:22px;color:var(--coe-primary)}
.coe-launch__card strong{font-size:14.5px}
.coe-launch__card em{font-style:normal;display:flex;gap:10px;flex-wrap:wrap;font-size:12px;color:#6b7280}
.coe-launch__card em b{color:#111827}

/* Profile */
.coe-profile{display:flex;gap:20px;align-items:flex-start;flex-wrap:wrap}
.coe-profile__photo{width:110px;height:130px;object-fit:cover;border-radius:10px;border:1px solid #e5e7eb}
.coe-profile .coe-legend{flex-basis:100%}

/* Login */
.coe-app--login .coe-app__top{background:transparent;border:0;backdrop-filter:none}
.coe-app--login .coe-app__title{visibility:hidden}
.coe-login-wrap{max-width:900px;margin:2vh auto 0}
.coe-login-brand{text-align:center;margin:0 0 22px}
.coe-login-brand img{width:84px;height:84px;object-fit:contain}
.coe-login-brand h2{margin:8px 0 4px;font-size:26px;color:var(--coe-primary)}
.coe-login-brand p{margin:0;color:#6b7280}
.coe-login-cards{display:grid;grid-template-columns:3fr 2fr;gap:18px;align-items:start}
.coe-login-cards>.coe-card,.coe-login-cards>form{margin:0}

/* Mobile */
.coe-app__tabs{display:none}
@media (max-width:960px){
  .coe-app__side{transform:translateX(-100%);transition:transform .2s ease;box-shadow:0 0 40px rgba(0,0,0,.25)}
  .coe-app__toggle:checked~.coe-app__side{transform:none}
  .coe-app__toggle:checked~.coe-app__scrim{display:block;position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:35}
  .coe-app__main{margin-left:0}
  .coe-app__burger{display:flex}
  .coe-app__top{padding:10px 14px;padding-top:calc(10px + env(safe-area-inset-top,0px))}
  .coe-app__content{padding:16px 14px}
  .coe-app__who span{display:none}
  .coe-login-cards{grid-template-columns:1fr}
  .coe-app--student .coe-app__content{padding-bottom:84px}
  .coe-app--student .coe-app__tabs{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:30;background:#fff;border-top:1px solid #e5e7eb;padding:6px 4px calc(6px + env(safe-area-inset-bottom,0px))}
  .coe-app__tabs a,.coe-app__tabs label{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px;text-decoration:none;color:#6b7280;cursor:pointer;padding:4px 0}
  .coe-app__tabs svg{width:22px;height:22px}
  .coe-app__tabs .is-active{color:var(--coe-primary);font-weight:600}
}
@media print{.coe-app__side,.coe-app__top,.coe-app__tabs,.coe-app__foot{display:none!important}.coe-app__main{margin:0}}
/* 1.3.1 fixes */
.coe-student__grid>*,.coe-app__content>*{min-width:0}
.coe-kpi span{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
@media (max-width:960px){
  .coe-app__side{box-shadow:none;visibility:hidden;transition:transform .2s ease,visibility 0s .2s}
  .coe-app__toggle:checked~.coe-app__side{visibility:visible;box-shadow:0 0 40px rgba(0,0,0,.25);transition:transform .2s ease}
}
@media (max-width:600px){
  .coe-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .coe-kpi{grid-template-columns:1fr;grid-template-rows:auto;row-gap:6px;padding:12px}
  .coe-kpi svg{grid-row:auto;width:34px;height:34px;padding:7px}
  .coe-kpi strong{font-size:20px}
  .coe-welcome .coe-hero__eyebrow{font-size:19px}
}
