/* SAGCO Admin — compact panel skin (navy #1B2958, accent #9D1631). */
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; background: #f2f4f8; color: #1f2937; font-size: 14px; }
a { color: #9d1631; }

/* ---------- Login ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(135deg, #1b2958, #0d142b); }
.auth-card { background: #fff; padding: 2.2rem; border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.3); width: min(400px, 100%); }
.auth-card h1 { margin: 0 0 .25rem; font-size: 1.4rem; color: #1b2958; }
.auth-card .sub { color: #64748b; margin: 0 0 1.4rem; font-size: .85rem; }
.auth-card label { display: block; margin-bottom: .9rem; font-size: .82rem; font-weight: 600; color: #334155; }
.auth-card input { width: 100%; margin-top: .3rem; padding: .6rem .75rem; border: 1px solid #d8dfe9; border-radius: 8px; font: inherit; }
.auth-card input:focus { outline: 0; border-color: #1b2958; box-shadow: 0 0 0 3px rgba(27,41,88,.12); }
.auth-card button { width: 100%; background: #9d1631; color: #fff; border: 0; padding: .7rem; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; }
.auth-card button:hover { background: #7f1228; }
.error { color: #b00020; font-size: .85rem; }
.auth-brand { background: #1b2958; margin: -2.2rem -2.2rem 1.4rem; padding: 1.5rem; border-radius: 14px 14px 0 0; text-align: center; }
.auth-brand img { height: 60px; width: auto; max-width: 200px; object-fit: contain; }
.auth-hint { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid #e8edf4; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.78rem; color: #64748b; }
.auth-hint b { color: #1b2958; }
.auth-hint button { width: auto; background: #eef1f6; color: #1b2958; padding: 0.4rem 1rem; font-size: 0.78rem; }
.auth-hint button:hover { background: #1b2958; color: #fff; }

/* ---------- Layout ---------- */
.adm-layout { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; transition: grid-template-columns .22s ease; }
.adm-sidebar { background: linear-gradient(175deg, #16214a 0%, #1b2958 55%, #131c3d 100%); color: #dbe2f0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; min-width: 0; z-index: 60; }
.adm-brand { position: relative; padding: 1rem 1rem; border-bottom: 1px solid rgba(255,255,255,.09); display: flex; align-items: center; gap: .65rem; }
/* The logo artwork is navy+red on transparent — it needs a white pill. */
.adm-brand-logo { display: flex; align-items: center; min-width: 0; background: #fff; border-radius: 10px; padding: .4rem .75rem; box-shadow: 0 2px 8px rgba(0,0,0,.22); }
.adm-brand-logo img { height: 28px; width: auto; max-width: 118px; object-fit: contain; display: block; }
.adm-brand-sub { font-size: .66rem; opacity: .6; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; font-weight: 600; }

/* Edge-mounted collapse toggle — straddles the sidebar/content boundary and
   stays in the same spot in both expanded and collapsed states. */
.adm-collapse-btn {
  position: absolute;
  inset-inline-end: -14px;
  top: 27px;
  z-index: 95;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #dbe2ee;
  color: #1b2958;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15,23,42,.3);
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.adm-collapse-btn svg { transition: transform .22s ease; }
.adm-collapse-btn:hover { background: #9d1631; border-color: #9d1631; color: #fff; box-shadow: 0 4px 14px rgba(157,22,49,.45); }
.adm-collapse-btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(157,22,49,.4); }
body.adm-collapsed .adm-collapse-btn svg { transform: rotate(180deg); }

/* Slim light scrollbar for the nav */
.adm-nav { flex: 1; overflow-y: auto; padding: .5rem 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.adm-nav::-webkit-scrollbar { width: 5px; }
.adm-nav::-webkit-scrollbar-track { background: transparent; }
.adm-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 999px; }
.adm-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.35); }

/* Nav search filter */
.adm-nav-search-wrap { padding: .7rem .9rem .3rem; }
.adm-nav-search { width: 100%; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); color: #fff; border-radius: 999px; padding: .42rem .9rem; font: inherit; font-size: .8rem; }
.adm-nav-search::placeholder { color: rgba(255,255,255,.45); }
.adm-nav-search:focus { outline: 0; border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.14); }

/* Grouped nav */
.adm-nav-group { margin-top: .35rem; }
.adm-nav-head { display: flex; align-items: center; gap: .5rem; width: 100%; background: none; border: 0; color: rgba(255,255,255,.55); font: inherit; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .5rem 1.1rem .3rem; cursor: pointer; }
.adm-nav-head:hover { color: #fff; }
.adm-nav-caret { margin-inline-start: auto; font-size: .7rem; transition: transform .2s ease; }
.adm-nav-group.open .adm-nav-caret { transform: rotate(180deg); }
.adm-nav-items { display: none; }
.adm-nav-group.open .adm-nav-items { display: block; }
.adm-nav-empty { display: none; color: rgba(255,255,255,.45); font-size: .8rem; padding: .6rem 1.2rem; }

.adm-nav-link { display: flex; align-items: center; gap: .6rem; color: #c6d0e6; text-decoration: none; margin: .1rem .6rem; padding: .5rem .8rem; font-size: .86rem; border-radius: 9px; transition: background-color .16s ease, color .16s ease; }
.adm-nav-ico { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; background: rgba(255,255,255,.1); color: #cdd7ea; font-size: .68rem; font-weight: 700; flex-shrink: 0; transition: background-color .16s ease, color .16s ease; }
.adm-nav-ico svg { display: block; }
.adm-nav-link:hover .adm-nav-ico { color: #fff; }
.adm-nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-nav-link:hover { background: rgba(255,255,255,.09); color: #fff; }
.adm-nav-link.active { background: linear-gradient(90deg, #9d1631, #b3243f); color: #fff; box-shadow: 0 4px 12px rgba(157,22,49,.35); }
.adm-nav-link.active .adm-nav-ico { background: rgba(255,255,255,.22); }
.adm-nav-link.adm-hidden, .adm-nav-group.adm-hidden { display: none !important; }

/* Collapsed icon rail (desktop toggle) */
body.adm-collapsed .adm-layout { grid-template-columns: 76px 1fr; }
body.adm-collapsed .adm-sidebar { overflow: visible; }
body.adm-collapsed .adm-brand { justify-content: center; padding: .9rem .5rem; }
body.adm-collapsed .adm-brand-logo { padding: .35rem; border-radius: 9px; }
body.adm-collapsed .adm-brand-logo img { max-width: 42px; height: 22px; }
body.adm-collapsed .adm-brand-sub,
body.adm-collapsed .adm-nav-search-wrap,
body.adm-collapsed .adm-nav-label,
body.adm-collapsed .adm-nav-caret,
body.adm-collapsed .adm-user-meta,
body.adm-collapsed .adm-logout { display: none; }
body.adm-collapsed .adm-nav-head { display: none; }
body.adm-collapsed .adm-nav-items { display: block; }
body.adm-collapsed .adm-nav-link { justify-content: center; margin: .15rem .55rem; padding: .55rem .4rem; }
body.adm-collapsed .adm-nav-ico { width: 30px; height: 30px; font-size: .8rem; }
body.adm-collapsed .adm-nav-ico svg { width: 16px; height: 16px; }
body.adm-collapsed .adm-nav-link.active .adm-nav-ico { color: #fff; }

body.adm-collapsed .adm-user { justify-content: center; padding: .7rem .4rem; }
.adm-user { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-top: 1px solid rgba(255,255,255,.09); }
.adm-user-link { display: inline-flex; flex-shrink: 0; border-radius: 50%; }
.adm-user-link:hover .adm-avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
.adm-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: contain; background: #fff; transition: box-shadow .16s ease; }
.adm-avatar-fb { display: inline-flex; align-items: center; justify-content: center; background: #9d1631; color: #fff; font-weight: 700; }
.adm-avatar-xs { width: 24px; height: 24px; font-size: .68rem; }

/* Topbar action buttons */
.adm-tbtn { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem; border: 1px solid #e2e8f2; border-radius: 999px; background: #fff; color: #334155; font-size: .79rem; font-weight: 600; text-decoration: none; transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.adm-tbtn svg { flex-shrink: 0; }
.adm-tbtn:hover { border-color: #1b2958; color: #1b2958; box-shadow: 0 2px 8px rgba(27,41,88,.14); }
.adm-tbtn-name { max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-tbtn-out { color: #9d1631; border-color: #eec3cc; }
.adm-tbtn-out:hover { background: #9d1631; border-color: #9d1631; color: #fff; box-shadow: 0 3px 10px rgba(157,22,49,.3); }
@media (max-width: 640px) { .adm-tbtn > span:not(.adm-avatar-fb) { display: none; } .adm-tbtn { padding: .4rem .55rem; } }
.adm-user-meta { flex: 1; min-width: 0; text-decoration: none; }
.adm-user-meta strong { display: block; color: #fff; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-user-meta small { color: rgba(255,255,255,.55); font-size: .7rem; text-transform: capitalize; }
.adm-user-meta:hover strong { text-decoration: underline; }
.adm-logout { color: rgba(255,255,255,.7); font-size: 1.1rem; text-decoration: none; }
.adm-logout:hover { color: #fff; }
.adm-main { min-width: 0; display: flex; flex-direction: column; }
.adm-topbar { background: #fff; border-bottom: 1px solid #e5e9f0; padding: .8rem 1.5rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 50; }
.adm-topbar h1 { font-size: 1.1rem; margin: 0; flex: 1; color: #1b2958; }
.adm-topbar-right { display: flex; align-items: center; gap: .9rem; font-size: .82rem; }
.adm-burger { display: none; background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: #1b2958; }
.adm-readonly { background: #fff3cd; color: #8a6d00; border: 1px solid #ffe08a; padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.adm-content { padding: 1.4rem 1.5rem; flex: 1; }

/* ---------- Alerts ---------- */
.adm-alert { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .88rem; }
.adm-alert-success { background: #e7f6ec; color: #166534; border: 1px solid #b7e4c7; }
.adm-alert-error { background: #fdecef; color: #9d1631; border: 1px solid #f5c2cb; }

/* ---------- Toolbar ---------- */
.adm-toolbar { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.adm-search { flex: 1; min-width: 200px; max-width: 340px; padding: .55rem .9rem; border: 1px solid #d8dfe9; border-radius: 999px; font: inherit; }
.adm-search:focus { outline: 0; border-color: #1b2958; box-shadow: 0 0 0 3px rgba(27,41,88,.1); }
.adm-toolbar-right { display: flex; gap: .5rem; align-items: center; margin-inline-start: auto; }
.adm-cols-wrap { position: relative; }
.adm-cols-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #e5e9f0; border-radius: 10px; box-shadow: 0 14px 34px rgba(15,23,42,.18); padding: .6rem; min-width: 180px; z-index: 60; }
.adm-cols-menu label { display: flex; gap: .5rem; align-items: center; padding: .3rem .4rem; font-size: .84rem; cursor: pointer; white-space: nowrap; }

/* ---------- Buttons ---------- */
.adm-btn { display: inline-block; border: 1px solid #d8dfe9; background: #fff; color: #1f2937; font: inherit; font-size: .82rem; font-weight: 600; padding: .5rem 1rem; border-radius: 8px; cursor: pointer; text-decoration: none; }
.adm-btn:hover { border-color: #b8c2d2; }
.adm-btn-primary { background: #1b2958; border-color: #1b2958; color: #fff; }
.adm-btn-primary:hover { background: #152044; border-color: #152044; }
.adm-btn-danger { background: #fff; color: #9d1631; border-color: #eec3cc; }
.adm-btn-danger:hover { background: #9d1631; border-color: #9d1631; color: #fff; }
.adm-btn-danger:disabled { opacity: .45; cursor: not-allowed; background: #fff; color: #9d1631; }
.adm-btn-ghost { background: transparent; }
.adm-btn-sm { padding: .28rem .6rem; font-size: .76rem; border-radius: 6px; }
.adm-inline { display: inline; margin: 0; }

/* ---------- Table ---------- */
.adm-table-wrap { background: #fff; border: 1px solid #e5e9f0; border-radius: 12px; overflow: auto; }
.adm-table { width: 100%; border-collapse: collapse; }
.adm-table th { text-align: start; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #64748b; background: #f8fafc; padding: .7rem .8rem; border-bottom: 1px solid #e5e9f0; white-space: nowrap; }
.adm-table td { padding: .65rem .8rem; border-bottom: 1px solid #eef1f6; font-size: .86rem; vertical-align: middle; }
.adm-table tbody tr:hover { background: #f8fafc; }
.adm-table tr.adm-hidden { display: none; }
.adm-sel { width: 34px; }
.adm-thumb { width: 46px; height: 34px; object-fit: cover; border-radius: 6px; border: 1px solid #e5e9f0; display: block; cursor: zoom-in; transition: box-shadow .15s ease, transform .15s ease; }
.adm-cur { display: flex; align-items: center; gap: .55rem; margin-top: .45rem; padding: .45rem .55rem; background: #f4f6fb; border: 1px dashed #d4dae6; border-radius: 8px; }
.adm-cur[hidden] { display: none; }
.adm-cur-img { width: 64px; height: 48px; object-fit: contain; background: #fff; border: 1px solid #e2e7f0; border-radius: 6px; }
.adm-cur-name { font-size: .78rem; color: #5b6478; word-break: break-all; }
.adm-thumb:hover { box-shadow: 0 3px 10px rgba(15,23,42,.2); transform: scale(1.06); }
.adm-badge { display: inline-block; background: #eef1f6; color: #475569; padding: .12rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.adm-badge-on { background: #e7f6ec; color: #166534; }
.adm-badge-off { background: #fdecef; color: #9d1631; }
.adm-actions-col { white-space: nowrap; width: 1%; }
.adm-actions-col .adm-btn, .adm-actions-col form { margin-inline-end: .3rem; }
.adm-empty { text-align: center; color: #94a3b8; padding: 2rem !important; }

/* ---------- Modal ---------- */
.adm-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 3rem 1rem; background: rgba(15,23,42,.5); overflow-y: auto; }
.adm-modal[hidden] { display: none; }
.adm-modal-card { background: #fff; border-radius: 14px; width: min(620px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.adm-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.4rem; border-bottom: 1px solid #eef1f6; }
.adm-modal-head h3 { margin: 0; font-size: 1.05rem; color: #1b2958; }
.adm-modal-x { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: #64748b; }
.adm-form { padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: .8rem; max-height: 65vh; overflow-y: auto; }
.adm-field span { display: block; font-size: .78rem; font-weight: 700; color: #334155; margin-bottom: .3rem; }
.adm-field input[type="text"], .adm-field input[type="number"], .adm-field input[type="email"], .adm-field input[type="password"], .adm-field textarea, .adm-field select { width: 100%; padding: .55rem .7rem; border: 1px solid #d8dfe9; border-radius: 8px; font: inherit; }
.adm-field input:focus, .adm-field textarea:focus, .adm-field select:focus { outline: 0; border-color: #1b2958; box-shadow: 0 0 0 3px rgba(27,41,88,.1); }
.adm-hint { display: block; color: #94a3b8; font-size: .72rem; margin-top: .25rem; }
.adm-modal-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: 0 1.4rem 1.2rem; }

/* ---------- Cards / stats ---------- */
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem; margin-bottom: 1.4rem; }
.adm-stat { background: #fff; border: 1px solid #e5e9f0; border-radius: 12px; padding: 1rem 1.1rem; }
.adm-stat b { display: block; font-size: 1.6rem; color: #1b2958; }
.adm-stat span { font-size: .78rem; color: #64748b; }
.adm-stat a { font-size: .78rem; }

/* ---------- Dashboard ---------- */
.adm-hero { background: linear-gradient(120deg, #16214a 0%, #1b2958 55%, #25346a 80%, #9d1631 140%); color: #fff; border-radius: 14px; padding: 1.3rem 1.5rem; margin-bottom: 1.2rem; display: flex; align-items: center; gap: 1rem; box-shadow: 0 10px 28px rgba(27,41,88,.25); }
.adm-hero-hello { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; opacity: .65; font-weight: 700; }
.adm-hero h2 { margin: .15rem 0 .2rem; font-size: 1.5rem; display: flex; align-items: center; gap: .6rem; }
.adm-hero-role { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); padding: .12rem .6rem; border-radius: 999px; font-size: .68rem; font-weight: 700; text-transform: capitalize; }
.adm-hero p { margin: 0; font-size: .82rem; opacity: .75; }
.adm-hero .adm-readonly { margin-inline-start: auto; }

.adm-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.adm-kpi { display: flex; align-items: center; gap: .8rem; background: #fff; border: 1px solid #e5e9f0; border-radius: 12px; padding: .95rem 1.05rem; text-decoration: none; color: inherit; border-inline-start: 3px solid #9d1631; transition: transform .15s ease, box-shadow .15s ease; }
.adm-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.12); }
.adm-kpi-ico { width: 40px; height: 40px; border-radius: 10px; background: #1b2958; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.adm-kpi-ico svg { width: 18px; height: 18px; }
.adm-kpi-txt b { display: block; font-size: 1.45rem; color: #1b2958; line-height: 1.05; }
.adm-kpi-txt span { font-size: .76rem; color: #64748b; }

.adm-dash-searchwrap { display: flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid #e5e9f0; border-radius: 999px; padding: .55rem 1rem; margin-bottom: 1.3rem; max-width: 460px; color: #64748b; }
.adm-dash-searchwrap input { border: 0; outline: 0; flex: 1; font: inherit; font-size: .86rem; background: none; min-width: 0; }
.adm-dash-searchwrap:focus-within { border-color: #1b2958; box-shadow: 0 0 0 3px rgba(27,41,88,.1); }
.adm-dash-empty { color: #9d1631; font-size: .8rem; white-space: nowrap; }

.adm-dash-group { margin-bottom: 1.3rem; }
.adm-dash-group.adm-hidden { display: none; }
.adm-dash-group h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: #64748b; margin: 0 0 .6rem; font-weight: 700; }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; }
.adm-tile { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid #e5e9f0; border-radius: 12px; padding: .8rem .9rem; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.adm-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.1); border-color: #cdd6e5; }
.adm-tile.adm-hidden { display: none; }
.adm-tile-ico { width: 38px; height: 38px; border-radius: 10px; background: #eef1f8; color: #1b2958; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .15s ease, color .15s ease; }
.adm-tile-ico svg { width: 17px; height: 17px; }
.adm-tile:hover .adm-tile-ico { background: #1b2958; color: #fff; }
.adm-tile-txt { min-width: 0; }
.adm-tile-txt b { display: block; font-size: 1.3rem; color: #1b2958; line-height: 1.05; }
.adm-tile-txt span { font-size: .76rem; color: #64748b; display: block; line-height: 1.25; }
.adm-tile-go { margin-inline-start: auto; color: #94a3b8; font-size: .7rem; font-weight: 700; opacity: 0; transition: opacity .15s ease; white-space: nowrap; }
.adm-tile:hover .adm-tile-go { opacity: 1; color: #9d1631; }

.adm-dash-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: .9rem; margin-top: .4rem; }
.adm-panel { max-width: none; padding: 0; overflow: hidden; }
.adm-panel-head { display: flex; align-items: center; gap: .6rem; padding: .85rem 1.1rem; border-bottom: 1px solid #eef1f6; }
.adm-panel-ico { width: 28px; height: 28px; border-radius: 8px; background: #eef1f8; color: #1b2958; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.adm-panel-ico svg { width: 14px; height: 14px; }
.adm-panel-head h3 { margin: 0; font-size: .88rem; color: #1b2958; flex: 1; }
.adm-panel-all { font-size: .74rem; font-weight: 600; text-decoration: none; }
.adm-panel-row { display: flex; align-items: center; gap: .6rem; padding: .6rem 1.1rem; text-decoration: none; color: inherit; border-bottom: 1px solid #f4f6fa; font-size: .82rem; }
.adm-panel-row:last-child { border-bottom: 0; }
.adm-panel-row:hover { background: #f8fafc; }
.adm-panel-name { font-weight: 600; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.adm-panel-sub { flex: 1; min-width: 0; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-panel-row time { color: #94a3b8; font-size: .72rem; flex-shrink: 0; }

/* ---------- Profile ---------- */
.adm-profile { display: grid; grid-template-columns: 160px 1fr; gap: 1.4rem; max-width: 640px; }
.adm-profile img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 6px 18px rgba(15,23,42,.15); }
.adm-card { background: #fff; border: 1px solid #e5e9f0; border-radius: 12px; padding: 1.2rem 1.4rem; max-width: 720px; }
.adm-form-narrow { padding: 0; max-height: none; overflow: visible; }
.adm-profile-head { display: flex; align-items: center; gap: .9rem; margin-bottom: .4rem; }
.adm-avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }
.adm-h3 { color: #1b2958; font-size: .95rem; margin: 1.4rem 0 .6rem; }
.adm-h3-first { margin-top: 0; }

/* ---------- Profile page ---------- */
.adm-profile-grid { max-width: 960px; }
.adm-profile-grid-form { display: grid; grid-template-columns: 280px 1fr; gap: 1.2rem; align-items: start; }
.adm-profile-side { padding: 0 0 1.3rem; overflow: hidden; text-align: center; }
.adm-profile-cover { height: 88px; background: linear-gradient(135deg, #1b2958 0%, #25346a 55%, #9d1631 130%); }
.adm-profile-side-body { padding: 0 1rem; }
.adm-ava-wrap { position: relative; display: inline-flex; margin-top: -48px; cursor: pointer; }
.adm-ava-img, .adm-ava-fb { width: 96px; height: 96px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 8px 22px rgba(15,23,42,.2); }
.adm-ava-img { object-fit: contain; display: block; background: #fff; padding: 6px; }
.adm-ava-img[hidden], .adm-ava-fb[hidden] { display: none; }
.adm-ava-fb { display: inline-flex; align-items: center; justify-content: center; background: #9d1631; color: #fff; font-size: 2.1rem; font-weight: 700; }
.adm-ava-edit { position: absolute; bottom: 4px; inset-inline-end: 4px; width: 30px; height: 30px; border-radius: 50%; background: #1b2958; color: #fff; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 3px 8px rgba(15,23,42,.3); transition: background .15s ease, transform .15s ease; }
.adm-ava-wrap:hover .adm-ava-edit { background: #9d1631; transform: scale(1.08); }
.adm-profile-name { display: block; font-size: 1.05rem; color: #1b2958; margin-top: .7rem; }
.adm-profile-side .adm-badge { margin-top: .35rem; }
.adm-profile-mail { color: #64748b; font-size: .8rem; margin: .5rem 0 0; word-break: break-all; }
.adm-profile-main { max-width: none; }
.adm-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.adm-field input[type="file"] { width: 100%; padding: .5rem .6rem; border: 1px dashed #c9d2e2; border-radius: 8px; background: #fafbfe; font-size: .8rem; color: #475569; }
.adm-form-foot { margin-top: .3rem; }
@media (max-width: 860px) {
    .adm-profile-grid-form { grid-template-columns: 1fr; }
    .adm-field-row { grid-template-columns: 1fr; }
}

/* ---------- Analytics bars ---------- */
.adm-chart { background: #fff; border: 1px solid #e5e9f0; border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1.4rem; }
.adm-chart-row { display: flex; align-items: center; gap: .7rem; padding: .3rem 0; font-size: .84rem; }
.adm-chart-label { width: 90px; flex-shrink: 0; color: #64748b; font-size: .76rem; }
.adm-chart-bar { height: 16px; border-radius: 4px; background: linear-gradient(90deg, #1b2958, #9d1631); min-width: 2px; }
.adm-chart-num { font-size: .78rem; color: #64748b; }
.adm-bar-row { display: flex; align-items: center; gap: .7rem; padding: .35rem 0; font-size: .84rem; }
.adm-bar-row .lbl { width: 130px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-bar { height: 18px; border-radius: 4px; background: linear-gradient(90deg, #1b2958, #9d1631); min-width: 2px; }
.adm-bar-row .val { font-size: .78rem; color: #64748b; }

/* ---------- Access rights matrix ---------- */
.adm-rights td, .adm-rights th { text-align: center; }
.adm-rights td:first-child { text-align: start; font-weight: 600; }

/* ---------- Drop zone ---------- */
.adm-dropzone { margin: 0 0 1rem; border: 2px dashed #c9d2e2; border-radius: 12px; background: #fff; padding: 1.3rem 1rem; text-align: center; color: #64748b; font-size: .83rem; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.adm-dropzone svg { color: #1b2958; margin-bottom: .3rem; }
.adm-dropzone strong { display: block; color: #1b2958; font-size: .92rem; margin-bottom: .15rem; }
.adm-dropzone u { text-decoration-color: #9d1631; }
.adm-dropzone:hover, .adm-dropzone:focus-visible { border-color: #1b2958; outline: 0; }
.adm-dropzone.over { border-color: #9d1631; background: #fdf4f5; box-shadow: inset 0 0 0 1px #9d1631; }

/* ---------- Document viewer ---------- */
.adm-docview-card { width: min(920px, 100%); }
.adm-docview-actions { display: flex; align-items: center; gap: .5rem; }
.adm-docview-body { min-height: 140px; }
.adm-docview-frame { width: 100%; height: 72vh; border: 0; display: block; }
.adm-docview-img { max-width: 100%; display: block; margin: 0 auto; }
.adm-docview-fb { padding: 3rem 1.5rem; text-align: center; color: #64748b; font-size: .86rem; }
.adm-docview-fb svg { color: #94a3b8; margin-bottom: .5rem; }

/* ---------- SEO WhatsApp share preview ---------- */
.adm-wa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .35rem; }
.adm-wa-pane-label { display: block; font-size: .68rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .3rem; }
.adm-wa-bubble { background: #dcf1e0; border-radius: 10px; padding: .5rem; box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.adm-wa-card { background: #fff; border-radius: 8px; overflow: hidden; display: flex; align-items: stretch; }
.adm-wa-thumb { width: 86px; min-height: 86px; object-fit: cover; flex-shrink: 0; background: #eef1f6; }
.adm-wa-txt { padding: .5rem .65rem; min-width: 0; flex: 1; }
.adm-wa-domain { font-size: .6rem; color: #8696a0; letter-spacing: .04em; margin-bottom: .1rem; }
.adm-wa-title { font-size: .8rem; font-weight: 700; color: #111b21; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adm-wa-desc { font-size: .72rem; color: #667781; line-height: 1.35; margin-top: .15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 700px) { .adm-wa-grid { grid-template-columns: 1fr; } }

/* ---------- Image lightbox ---------- */
.adm-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,15,30,.82); display: flex; align-items: center; justify-content: center; padding: 2rem; cursor: zoom-out; }
.adm-lightbox[hidden] { display: none; }
.adm-lightbox-img { max-width: min(92vw, 1100px); max-height: 86vh; border-radius: 10px; box-shadow: 0 30px 90px rgba(0,0,0,.55); object-fit: contain; background: #fff; cursor: default; }
.adm-lightbox-x { position: absolute; top: 1.1rem; inset-inline-end: 1.3rem; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.adm-lightbox-x:hover { background: #9d1631; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .adm-layout { grid-template-columns: 1fr; }
    .adm-sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 250px; z-index: 90; transform: translateX(-105%); transition: transform .25s ease; height: 100vh; }
    .adm-sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.4); }
    .adm-burger { display: block; }
    .adm-collapse-btn { display: none; }
    .adm-profile { grid-template-columns: 1fr; }
}
