/* ==================================================================
   AlbGIS — koka dhe fundi i përbashkët («Isohipsa»), në çdo faqe dhe vegël.
   Gjithçka është brenda klasave .ag-*, që të mos prekë stilet e veglave.
   Veglat me ekran të plotë: përmbajtja e tyre rri te .ag-stage (nën kokë);
   transform-i e bën .ag-stage bazën e elementeve «position: fixed» të veglës.
   Gjenerohet bashkë me HTML-në nga _ndertimi/build.php — mos e kopjo kokën me dorë.
   ================================================================== */
:root { --ag-h: 56px; }
.ag-hdr, .ag-foot, .ag-mob {
  --ag-bg: #0E1016; --ag-bg2: #14171F; --ag-bg3: #1B1F2A; --ag-line: #232734; --ag-line2: #2F3443;
  --ag-text: #E8EAF0; --ag-muted: #9AA2B2; --ag-faint: #6A7283; --ag-head: #F5F6FA;
  --ag-acc: #F0476A; --ag-acc2: #FF8A5B; --ag-soft: rgba(240, 71, 106, .14);
  --ag-fd: Sora, Inter, system-ui, sans-serif; --ag-fb: Inter, system-ui, sans-serif; --ag-fm: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-family: var(--ag-fb); -webkit-font-smoothing: antialiased; box-sizing: border-box;
}
.ag-hdr *, .ag-foot *, .ag-mob * { box-sizing: border-box; }

/* ---------------------------------------------------------------- koka */
.ag-hdr { position: sticky; top: 0; z-index: 9000; height: var(--ag-h); background: rgba(14, 16, 22, .9); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--ag-line); color: var(--ag-text); }
.ag-tool .ag-hdr { position: fixed; left: 0; right: 0; top: 0; background: #0E1016; }
.ag-hdr-in { height: 100%; display: flex; align-items: center; gap: 18px; padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-left)); max-width: 1440px; margin: 0 auto; }
.ag-tool .ag-hdr-in { max-width: none; }
.ag-logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none !important; color: var(--ag-head) !important; font: 800 1.12rem/1 var(--ag-fd); letter-spacing: -.02em; flex: none; }
.ag-logo img { width: 26px; height: 26px; display: block; }
.ag-crumb { display: none; align-items: center; gap: 8px; min-width: 0; font: 500 .84rem var(--ag-fb); color: var(--ag-muted); }
.ag-crumb b { color: var(--ag-head); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-crumb i { font-style: normal; color: var(--ag-faint); }
.ag-tool .ag-crumb { display: inline-flex; }

.ag-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.ag-nav > a, .ag-dd > a { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px; color: var(--ag-text) !important; text-decoration: none !important; font: 500 .92rem var(--ag-fb); white-space: nowrap; transition: background .15s, color .15s; }
.ag-nav > a:hover, .ag-dd > a:hover, .ag-dd:focus-within > a { background: rgba(255, 255, 255, .05); color: #fff !important; }
.ag-nav a[aria-current="page"] { color: #fff !important; box-shadow: inset 0 -2px 0 var(--ag-acc); border-radius: 0; }
.ag-dd { position: relative; display: flex; align-items: center; }
.ag-dd > a::after { content: ""; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .6; }
.ag-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 2; min-width: 240px; padding: 8px; background: var(--ag-bg2); border: 1px solid var(--ag-line2); border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .16s, transform .16s, visibility 0s .16s; }
.ag-dd:hover .ag-pop, .ag-dd:focus-within .ag-pop, .ag-dd.is-open .ag-pop { opacity: 1; visibility: visible; transform: none; transition: opacity .16s, transform .16s; }
.ag-dd::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.ag-pop a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ag-text) !important; text-decoration: none !important; font: 500 .9rem var(--ag-fb); }
.ag-pop a:hover, .ag-pop a[aria-current="page"] { background: var(--ag-soft); color: #fff !important; }
.ag-pop a img { width: 22px; height: 22px; }
.ag-pop small { display: block; color: var(--ag-faint); font-size: .76rem; font-weight: 400; }

/* menyja e madhe e veglave */
.ag-mega { left: 50%; width: min(1060px, calc(100vw - 32px)); transform: translate(-50%, -4px); padding: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 22px; }
.ag-dd:hover .ag-mega, .ag-dd:focus-within .ag-mega, .ag-dd.is-open .ag-mega { transform: translate(-50%, 0); }
.ag-mega h4 { margin: 0 0 6px; padding: 0 10px; font: 500 .66rem var(--ag-fm); letter-spacing: .12em; text-transform: uppercase; color: var(--ag-acc2); }
.ag-mega a { padding: 6px 10px; font-size: .86rem; }
.ag-mega a i { font-style: normal; margin-left: auto; font: 500 .58rem var(--ag-fm); letter-spacing: .08em; text-transform: uppercase; color: var(--ag-acc); }
.ag-mega .ag-mega-all { grid-column: 1 / -1; justify-content: center; border-top: 1px solid var(--ag-line); border-radius: 0 0 8px 8px; margin-top: 2px; padding-top: 12px; color: var(--ag-muted) !important; }

/* llogaria: gate.js mbush #albgis-account */
.ag-acct { display: flex; align-items: center; gap: 8px; flex: none; }
.ag-hdr .acct-slot { margin: 0 !important; padding: 0 !important; position: relative; }
.ag-hdr .albgis-acct-btn { width: auto; padding: 8px 14px; font-size: .86rem; border-radius: 9px; white-space: nowrap; box-shadow: 0 6px 20px rgba(240, 71, 106, .22); }
.ag-hdr .albgis-acct { position: relative; flex-direction: row; background: none; border: 0; padding: 0; }
.ag-hdr .albgis-acct-id { padding: 3px 4px; border: 0; margin: 0; cursor: pointer; border-radius: 99px; }
.ag-hdr .albgis-acct-id .em { max-width: 150px; }
.ag-hdr .albgis-acct::after { content: ""; position: absolute; right: 0; top: 100%; width: 100%; height: 12px; }
.ag-acct-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 270px; padding: 8px; display: flex; flex-direction: column; gap: 2px; background: var(--ag-bg2); border: 1px solid var(--ag-line2); border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .16s, transform .16s, visibility 0s .16s; }
.ag-hdr .albgis-acct:hover .ag-acct-pop, .ag-hdr .albgis-acct:focus-within .ag-acct-pop, .ag-hdr .albgis-acct.is-open .ag-acct-pop { opacity: 1; visibility: visible; transform: none; transition: opacity .16s, transform .16s; }
.ag-acct-pop .ag-acct-mail { padding: 6px 7px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--ag-line); font: 600 .8rem var(--ag-fb); color: var(--ag-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* butoni i menysë në celular */
.ag-burger { display: none; width: 40px; height: 40px; margin-left: auto; border: 1px solid var(--ag-line2); border-radius: 9px; background: transparent; color: var(--ag-text); cursor: pointer; flex: none; align-items: center; justify-content: center; }
.ag-burger span, .ag-burger span::before, .ag-burger span::after { display: block; width: 16px; height: 1.6px; background: currentColor; border-radius: 2px; position: relative; }
.ag-burger span::before, .ag-burger span::after { content: ""; position: absolute; left: 0; }
.ag-burger span::before { top: -5px; } .ag-burger span::after { top: 5px; }
.ag-mob { position: fixed; inset: var(--ag-h) 0 0 0; z-index: 8999; overflow: auto; background: var(--ag-bg); padding: 12px max(16px, env(safe-area-inset-left)) 40px; display: none; }
.ag-mob.is-open { display: block; }
.ag-mob a { display: block; padding: 12px 6px; color: var(--ag-text); text-decoration: none; font: 600 1.02rem var(--ag-fb); border-bottom: 1px solid var(--ag-line); }
.ag-mob details { border-bottom: 1px solid var(--ag-line); }
.ag-mob summary { padding: 12px 6px; font: 600 1.02rem var(--ag-fb); color: var(--ag-text); cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.ag-mob summary::after { content: "+"; color: var(--ag-faint); }
.ag-mob details[open] summary::after { content: "–"; }
.ag-mob details a { border: 0; padding: 8px 6px 8px 16px; font-weight: 500; font-size: .94rem; color: var(--ag-muted); }
.ag-mob details h4 { margin: 10px 6px 2px; font: 500 .64rem var(--ag-fm); letter-spacing: .12em; text-transform: uppercase; color: var(--ag-acc2); }

@media (max-width: 1080px) {
  .ag-nav { display: none; }
  .ag-burger { display: inline-flex; }
  .ag-acct { margin-left: auto; }
  .ag-acct + .ag-burger { margin-left: 0; }
}
@media (max-width: 560px) {
  .ag-hdr .albgis-acct-btn { padding: 7px 10px; font-size: .8rem; }
  .ag-hdr .albgis-acct-id .em { display: none; }
  .ag-crumb { display: none !important; }
}

/* ---------------------------------------------------------------- veglat me ekran të plotë */
.ag-tool { overflow: hidden; }
.ag-stage { position: fixed; left: 0; right: 0; bottom: 0; top: var(--ag-h); overflow: auto; transform: translateZ(0); display: flex; }
/* shell.js kopjon te .ag-stage paraqitjen që vegla i jep <body>-t; <body>-i vetë mbetet vetëm sfond */
/* veglat e rrjeteve (desktop.js): shtylla e tyre «AlbGIS» majtas s'ekziston më, ndaj s'ka nevojë për hapësirë */
.ag-tool.hydro-desktop { padding-left: 0 !important; }
/* «100vh» i veglave tani do të thotë lartësia nën kokë: paneli anësor s'del poshtë ekranit (edhe si sirtar në celular) */
.ag-tool .ag-stage > #sidebar { max-height: 100%; }
/* vegla s'ka më nevojë për lidhjen e vet «AlbGIS» dhe vendin e llogarisë: i ka koka */
.ag-stage .back-link, .ag-stage .acct-slot, .ag-stage #sidebar-head .back-link { display: none !important; }

/* ---------------------------------------------------------------- faqet e vjetra me shirit anësor */
.ag-flow .site-sidebar, .ag-flow #navToggle, .ag-flow .nav-toggle, .ag-flow .sidebar-overlay { display: none !important; }
.ag-flow .site-layout { display: block !important; }
.ag-flow .site-main { margin-left: 0 !important; width: auto !important; max-width: none !important; }

/* ---------------------------------------------------------------- fundi */
.ag-foot { background: #0A0C11; border-top: 1px solid var(--ag-line); color: var(--ag-muted); padding: 52px max(16px, env(safe-area-inset-left)) 0; }
.ag-foot-g { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
.ag-foot p { margin: 10px 0 0; font-size: .9rem; line-height: 1.6; max-width: 36ch; }
.ag-foot p a { color: var(--ag-text); }
.ag-foot nav { display: flex; flex-direction: column; gap: 8px; }
.ag-foot nav h4 { margin: 0 0 6px; font: 500 .66rem var(--ag-fm); letter-spacing: .12em; text-transform: uppercase; color: var(--ag-acc2); }
.ag-foot nav a { color: var(--ag-muted); text-decoration: none; font-size: .92rem; }
.ag-foot nav a:hover { color: #fff; }
.ag-foot-l { max-width: 1240px; margin: 40px auto 0; padding: 18px 0 26px; border-top: 1px solid var(--ag-line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .82rem; color: var(--ag-faint); }
.ag-foot-l p { margin: 0; max-width: none; font-size: inherit; }
@media (max-width: 860px) { .ag-foot-g { grid-template-columns: 1fr 1fr; } }
.ag-hdr a:focus-visible, .ag-hdr button:focus-visible, .ag-foot a:focus-visible, .ag-mob a:focus-visible { outline: 2px solid var(--ag-acc); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ag-pop { transition: none; } }
