/* ==========================================================================
   WandUP Mail — sistem vizual origjinal.
   Ideja drejtuese: një email i biznesit ndërtohet mbi ADRESAT dhe DOMAINET e tua,
   jo mbi një listë folderash. Prandaj shtylla e majtë është "kurrizi i adresave"
   dhe çdo vlerë teknike (adresë, domain, folder) shkruhet me mono — si te paneli.
   Ngjyrat vijnë nga brandi (jeshilja e WandUP), mbi letër të ftohtë (jo krem).
   ========================================================================== */
/* Rrugë ABSOLUTE: faqja hapet edhe te /mail/inbox (bookmark i vjetër) — rruga relative do të
   kërkonte /mail/fonts.css dhe do të merrte index.html. */
@import url('/fonts.css');

:root{
  --ink:#0E1512; --ink-2:#3B4741; --muted:#69786F;
  --paper:#FBFCFB; --surface:#F0F4F1; --surface-2:#E9EFEB;
  --line:#E1E8E3; --line-strong:#CFDAD3;
  --brand:#1B8A5A; --brand-ink:#0F5C3C; --brand-wash:#E7F3EC;
  --amber:#B8730A; --amber-wash:#FBF1E0;
  --danger:#B0453A;
  --r-sm:8px; --r:12px; --r-lg:18px;
  --shadow:0 1px 2px rgba(14,21,18,.05), 0 12px 32px -18px rgba(14,21,18,.35);
  --spine:236px; --list:390px;
  --display:'Space Grotesk', system-ui, sans-serif;
  --body:'Manrope', system-ui, sans-serif;
  --mono:'Space Mono', ui-monospace, SFMono-Regular, monospace;
}
@media (prefers-color-scheme: dark){
  :root{
    --ink:#E8EFEA; --ink-2:#B4C2BA; --muted:#84978C;
    --paper:#0B100E; --surface:#121915; --surface-2:#18211C;
    --line:#1E2A23; --line-strong:#2A382F;
    --brand:#3FB37D; --brand-ink:#8BD9B4; --brand-wash:#12241C;
    --amber:#D9A047; --amber-wash:#241C10;
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 12px 32px -18px rgba(0,0,0,.8);
  }
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:var(--body); font-size:14px; line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
button,input,textarea,select{font:inherit; color:inherit}
button{cursor:pointer; background:none; border:0}
a{color:var(--brand-ink)}
:focus-visible{outline:2px solid var(--brand); outline-offset:2px; border-radius:4px}
.mono{font-family:var(--mono); font-size:.86em; letter-spacing:-.02em}
.hidden{display:none !important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ── Marka ─────────────────────────────────────────────────────────────── */
.brand{display:flex; align-items:center; gap:9px; font-family:var(--display); font-weight:700; letter-spacing:-.02em}
.brand-mark{
  width:26px; height:26px; border-radius:8px; background:var(--brand); color:#fff;
  display:grid; place-items:center; font-size:13px; flex:none;
}
.brand-name{font-size:15.5px}
.brand-name span{color:var(--brand)}

/* ── Login ─────────────────────────────────────────────────────────────── */
.auth{min-height:100%; display:grid; place-items:center; padding:24px;
  background:radial-gradient(120% 90% at 50% -10%, var(--brand-wash) 0%, var(--paper) 55%)}
.auth-card{width:100%; max-width:392px}
.auth-head{text-align:center; margin-bottom:26px}
.auth-head .brand{justify-content:center}
.auth-head h1{font-family:var(--display); font-size:25px; font-weight:700; letter-spacing:-.03em; margin:18px 0 6px}
.auth-head p{margin:0; color:var(--muted); font-size:13.5px}
.auth-form{background:var(--paper); border:1px solid var(--line); border-radius:var(--r-lg); padding:22px; box-shadow:var(--shadow)}
.field{display:block; margin-bottom:14px}
.field > span{display:block; font-size:12px; font-weight:600; color:var(--ink-2); margin-bottom:6px}
.input{
  width:100%; padding:11px 13px; background:var(--paper); color:var(--ink);
  border:1px solid var(--line-strong); border-radius:var(--r-sm); transition:border-color .15s, box-shadow .15s;
}
.input:focus{border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-wash); outline:none}
.input.mono{font-family:var(--mono)}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 16px; border-radius:var(--r-sm); font-weight:600; font-size:13.5px;
  border:1px solid transparent; transition:background .15s, border-color .15s, color .15s;
}
.btn-primary{background:var(--brand); color:#fff}
.btn-primary:hover{background:var(--brand-ink)}
.btn-ghost{border-color:var(--line-strong); color:var(--ink-2)}
.btn-ghost:hover{background:var(--surface); color:var(--ink)}
.btn-block{width:100%}
.btn[disabled]{opacity:.55; cursor:not-allowed}
.note{margin:14px 0 0; font-size:12px; color:var(--muted); text-align:center}
.error{
  background:var(--amber-wash); border:1px solid color-mix(in srgb, var(--amber) 40%, transparent);
  color:var(--amber); border-radius:var(--r-sm); padding:9px 12px; font-size:13px; margin-bottom:14px;
}

/* ── Skeleti i aplikacionit ────────────────────────────────────────────── */
.app{display:grid; grid-template-columns:var(--spine) var(--list) 1fr; height:100dvh; overflow:hidden}

/* Kurrizi i adresave (signature) */
.spine{background:var(--surface); border-right:1px solid var(--line); display:flex; flex-direction:column; min-width:0}
.spine-head{padding:16px 16px 12px}
.spine-scroll{flex:1; overflow:auto; padding:0 10px 10px}
.spine-label{
  font-family:var(--mono); font-size:10.5px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted); padding:14px 6px 7px;
}
.addr{
  width:100%; display:flex; align-items:center; gap:9px; padding:8px 8px; border-radius:var(--r-sm);
  text-align:left; color:var(--ink-2);
}
.addr:hover{background:var(--surface-2)}
.addr[aria-current="true"]{background:var(--paper); color:var(--ink); box-shadow:var(--shadow)}
.addr-dot{width:7px; height:7px; border-radius:50%; background:var(--brand); flex:none}
.addr-text{font-family:var(--mono); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.addr-badge{margin-left:auto; font-size:11px; font-weight:700; color:var(--brand)}

.fold{
  width:100%; display:flex; align-items:center; gap:10px; padding:7px 10px; border-radius:var(--r-sm);
  color:var(--ink-2); font-size:13.5px;
}
.fold:hover{background:var(--surface-2)}
.fold[aria-current="true"]{background:var(--brand-wash); color:var(--brand-ink); font-weight:600}
.fold svg{width:16px; height:16px; flex:none; opacity:.75}
.fold-n{margin-left:auto; font-family:var(--mono); font-size:11px; color:var(--muted)}
.fold[aria-current="true"] .fold-n{color:var(--brand-ink)}
.spine-foot{padding:10px; border-top:1px solid var(--line); display:grid; gap:2px}
.spine-foot .fold{font-size:13px}

/* Lista */
.list{border-right:1px solid var(--line); display:flex; flex-direction:column; min-width:0; background:var(--paper)}
.list-head{padding:12px 14px; border-bottom:1px solid var(--line); display:flex; gap:8px; align-items:center}
.search{position:relative; flex:1}
.search svg{position:absolute; left:10px; top:50%; transform:translateY(-50%); width:15px; height:15px; color:var(--muted)}
.search input{width:100%; padding:8px 10px 8px 32px; border:1px solid var(--line-strong); border-radius:999px; background:var(--surface)}
.search input:focus{border-color:var(--brand); background:var(--paper); outline:none}
.icon-btn{width:32px; height:32px; border-radius:var(--r-sm); display:grid; place-items:center; color:var(--muted)}
.icon-btn:hover{background:var(--surface); color:var(--ink)}
.icon-btn svg{width:16px; height:16px}
.list-scroll{flex:1; overflow:auto}
.row{
  width:100%; display:grid; grid-template-columns:34px 1fr; gap:11px; padding:12px 14px;
  border-bottom:1px solid var(--line); text-align:left; position:relative;
}
.row:hover{background:var(--surface)}
.row[aria-current="true"]{background:var(--brand-wash)}
.row[aria-current="true"]::before{content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--brand)}
.av{
  width:34px; height:34px; border-radius:11px; background:var(--surface-2); color:var(--ink-2);
  display:grid; place-items:center; font-family:var(--display); font-weight:700; font-size:13px;
}
.row.unread .av{background:var(--brand); color:#fff}
.row-top{display:flex; align-items:baseline; gap:8px}
.row-from{font-weight:600; font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.row.unread .row-from{font-weight:700}
.row-date{margin-left:auto; font-family:var(--mono); font-size:10.5px; color:var(--muted); flex:none}
.row-subj{font-size:13px; color:var(--ink-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:2px}
.row.unread .row-subj{color:var(--ink)}
.row-flag{color:var(--amber)}
.empty{padding:44px 24px; text-align:center; color:var(--muted)}
.empty strong{display:block; font-family:var(--display); color:var(--ink); font-size:15px; margin-bottom:5px}

/* Leximi */
.read{display:flex; flex-direction:column; min-width:0; background:var(--paper)}
.read-bar{padding:10px 16px; border-bottom:1px solid var(--line); display:flex; gap:6px; align-items:center; flex-wrap:wrap}
.read-bar .sep{width:1px; height:20px; background:var(--line); margin:0 4px}
.read-scroll{flex:1; overflow:auto; padding:22px 26px 32px}
.read-subject{font-family:var(--display); font-size:22px; font-weight:700; letter-spacing:-.02em; margin:0 0 10px}
/* Rreshti i rrugëtimit — nga kush, te cila adresë, në cilin folder. Fakt, jo dekor. */
.routing{
  display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-family:var(--mono); font-size:11.5px;
  color:var(--muted); background:var(--surface); border:1px solid var(--line);
  border-radius:999px; padding:7px 13px; width:fit-content; max-width:100%;
}
.routing b{color:var(--ink-2); font-weight:400}
.routing .arrow{color:var(--brand)}
.read-meta{display:flex; align-items:center; gap:11px; margin:18px 0 14px}
.read-meta .av{width:38px; height:38px; border-radius:12px}
.read-from{font-weight:700}
.read-when{margin-left:auto; font-family:var(--mono); font-size:11px; color:var(--muted)}
.body-frame{width:100%; border:0; min-height:320px; background:transparent}
.body-text{white-space:pre-wrap; word-wrap:break-word; font-size:14.5px; line-height:1.65}
.att{display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; padding-top:16px; border-top:1px solid var(--line)}
.att a{
  display:inline-flex; align-items:center; gap:7px; padding:7px 11px; border:1px solid var(--line-strong);
  border-radius:var(--r-sm); font-size:12.5px; color:var(--ink-2); text-decoration:none; background:var(--surface);
}
.att a:hover{border-color:var(--brand); color:var(--brand-ink)}
.att svg{width:14px; height:14px}

/* Compose + Settings (fletë) */
.sheet{
  position:fixed; inset:0; background:color-mix(in srgb, var(--ink) 38%, transparent);
  display:grid; place-items:end center; padding:0; z-index:40;
}
.sheet-card{
  width:min(720px, 100%); max-height:92dvh; background:var(--paper); border:1px solid var(--line);
  border-radius:var(--r-lg) var(--r-lg) 0 0; box-shadow:var(--shadow); display:flex; flex-direction:column;
  animation:rise .18s ease-out;
}
.sheet-wide .sheet-card{width:min(880px, 100%)}
@keyframes rise{from{transform:translateY(14px); opacity:.6} to{transform:none; opacity:1}}
@media (prefers-reduced-motion: reduce){ .sheet-card{animation:none} }
.sheet-head{display:flex; align-items:center; gap:10px; padding:14px 18px; border-bottom:1px solid var(--line)}
.sheet-head h2{font-family:var(--display); font-size:16px; font-weight:700; margin:0; letter-spacing:-.02em}
.sheet-body{padding:16px 18px; overflow:auto}
.sheet-foot{padding:12px 18px; border-top:1px solid var(--line); display:flex; gap:8px; align-items:center}
.crow{display:flex; align-items:center; gap:10px; border-bottom:1px solid var(--line); padding:9px 0}
.crow label{width:52px; font-size:12px; color:var(--muted); font-weight:600}
.crow input{flex:1; border:0; background:none; outline:none; font-family:var(--mono); font-size:13px}
.crow input.plain{font-family:var(--body); font-size:14px}
.compose-body{width:100%; min-height:220px; border:0; outline:none; resize:vertical; background:none; margin-top:12px; font-size:14.5px; line-height:1.6}
.chips{display:flex; flex-wrap:wrap; gap:6px; margin-top:10px}
.chip{display:inline-flex; align-items:center; gap:6px; background:var(--surface); border:1px solid var(--line); border-radius:999px; padding:4px 9px; font-size:12px}

/* Cilësimet */
.tabs{display:flex; gap:4px; padding:0 18px; border-bottom:1px solid var(--line); overflow:auto}
.tab{padding:11px 12px; font-size:13.5px; font-weight:600; color:var(--muted); border-bottom:2px solid transparent; white-space:nowrap}
.tab[aria-selected="true"]{color:var(--brand-ink); border-bottom-color:var(--brand)}
.card{border:1px solid var(--line); border-radius:var(--r); padding:14px; margin-bottom:12px; background:var(--paper)}
.card h3{font-family:var(--display); font-size:14px; margin:0 0 4px; font-weight:700}
.card p.hint{margin:0 0 12px; color:var(--muted); font-size:12.5px}
.dom{display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line)}
.dom:last-child{border-bottom:0}
.dom-name{font-family:var(--mono); font-size:13px}
.pill{font-size:11px; font-weight:700; padding:3px 9px; border-radius:999px; background:var(--brand-wash); color:var(--brand-ink)}
.pill.warn{background:var(--amber-wash); color:var(--amber)}
.switch{display:flex; align-items:center; gap:9px; font-size:13.5px; margin-bottom:12px}
.switch input{width:17px; height:17px; accent-color:var(--brand)}
.toast{
  position:fixed; left:50%; bottom:22px; transform:translateX(-50%); z-index:60;
  background:var(--ink); color:var(--paper); padding:10px 16px; border-radius:999px; font-size:13px; box-shadow:var(--shadow);
}

/* Mobile: një kolonë me kthim mbrapa */
.back{display:none}
@media (max-width: 1080px){ :root{--list:330px} }
@media (max-width: 900px){
  .app{grid-template-columns:1fr}
  .spine{position:fixed; inset:0 auto 0 0; width:var(--spine); z-index:30; transform:translateX(-100%); transition:transform .2s}
  .app[data-nav="open"] .spine{transform:none; box-shadow:var(--shadow)}
  .list{display:none} .read{display:none}
  .app[data-pane="list"] .list{display:flex}
  .app[data-pane="read"] .read{display:flex}
  .back{display:grid}
  .sheet-card{max-height:100dvh; border-radius:0; height:100dvh}
}
@media (prefers-reduced-motion: reduce){ *{transition:none !important} }
