:root{
  --bg0:#0b1220;
  --bg1:#0e1a33;
  --paper:#ffffff;
  --panel:rgba(255,255,255,0.82);
  --text:#0b1220;
  --muted:#5a6b86;
  --border:rgba(11,18,32,0.14);
  --border-strong:rgba(11,18,32,0.20);

  --primary:#1a73e8;
  --primary2:#06b6d4;
  --gold:#c89b2a;
  --gold2:#f5c451;

  --green:#00c853;
  --amber:#f59e0b;
  --red:#ef4444;

  --radius:22px;
  --radius-sm:14px;
  --shadow:0 24px 70px rgba(11,18,32,0.14);
  --shadow-sm:0 12px 28px rgba(11,18,32,0.12);

  --ring:0 0 0 3px rgba(26,115,232,0.15);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 10% 0%, rgba(26,115,232,0.18), transparent 60%),
    radial-gradient(1100px 560px at 92% 8%, rgba(200,155,42,0.16), transparent 60%),
    radial-gradient(900px 520px at 60% 92%, rgba(6,182,212,0.12), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f4f7ff 45%, #f2f6ff 100%);
}

a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}

.container{max-width:1240px;margin:0 auto;padding:0 18px}
.main{padding:22px 0 50px}

/* Topbar */
.topbar{
  position:sticky;top:0;z-index:25;
  background:rgba(255,255,255,0.78);
  backdrop-filter: blur(14px);
  border-bottom:1px solid var(--border);
}
.topbar__inner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0}

.brand{display:flex;align-items:center;gap:12px;min-width:240px}
.brand__mark{
  width:44px;height:44px;border-radius:16px;
  display:grid;place-items:center;
  font-weight:900;letter-spacing:0.6px;
  color:#fff;
  background: linear-gradient(135deg, rgba(26,115,232,0.98), rgba(200,155,42,0.96));
  box-shadow:0 16px 30px rgba(26,115,232,0.18);
  position:relative;overflow:hidden;
}
.brand__mark:after{
  content:"";position:absolute;inset:-30%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.30), transparent 60%);
  transform:rotate(12deg);
}
.brand__name{font-weight:900}
.brand__tag{font-size:12px;color:var(--muted)}

.nav{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.nav a{color:rgba(11,18,32,0.92);font-weight:750}

/* Headings */
h1,h2,h3{margin:0}
h1{font-size:30px;letter-spacing:-0.02em}
h2{font-size:18px;letter-spacing:-0.01em}
h3{font-size:14px;letter-spacing:-0.01em}

.muted{color:var(--muted)}

/* Cards */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.96), #ffffff);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
  position:relative;overflow:hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.card:hover{transform:translateY(-2px);box-shadow:0 26px 80px rgba(11,18,32,0.16);border-color:var(--border-strong)}
.card--narrow{max-width:560px;margin:0 auto}
.card--soft{box-shadow:var(--shadow-sm)}
/* Status outlines (Marvin) */
.card.card--pending{border-color: rgba(245,158,11,0.48); border-width:2px}
.card.card--done{border-color: rgba(0,200,83,0.42); border-width:2px}
.card.card--pending:hover{border-color: rgba(245,158,11,0.64)}
.card.card--done:hover{border-color: rgba(0,200,83,0.58)}


.card--pending:before,
.card--done:before{
  content:"";position:absolute;left:0;top:0;height:4px;width:100%;
}
.card--pending:before{background:linear-gradient(90deg, rgba(245,158,11,0.95), rgba(200,155,42,0.85))}
.card--done:before{background:linear-gradient(90deg, rgba(0,200,83,0.95), rgba(6,182,212,0.75))}

.card__head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px}
.card__meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}

.sep{border:0;border-top:1px solid var(--border);margin:16px 0}

/* Layout */
.grid{display:grid;gap:18px}
.grid--2{grid-template-columns: 1.15fr 0.85fr}
.grid--3{grid-template-columns: repeat(3,1fr)}

.cards{display:grid;gap:18px;grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));align-items:start}

@media (max-width: 980px){
  .grid--2,.grid--3{grid-template-columns:1fr}
  .topbar__inner{flex-direction:column;align-items:flex-start}
  .brand{min-width:unset}
}
@media (max-width: 520px){
  .container{padding:0 14px}
  .main{padding:18px 0 40px}
  h1{font-size:26px}
  .card{padding:14px}
}

/* Forms */
.form{display:grid;gap:12px}
.field{display:grid;gap:8px}
.field span{font-weight:850}

input,textarea,select{
  width:100%;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid rgba(16,24,40,0.18);
  background:#fff;
  color:var(--text);
  outline:none;
}
textarea{resize:vertical}
input:focus,textarea:focus,select:focus{border-color: rgba(26,115,232,0.55); box-shadow: var(--ring)}
.hint{font-size:12px;color:var(--muted)}
.form__actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}

/* Buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 12px;border-radius:14px;
  border:1px solid rgba(16,24,40,0.18);
  background:#fff;color:var(--text);
  cursor:pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
  text-decoration:none;
  position:relative;overflow:hidden;
}
.btn:hover{transform:translateY(-1px);box-shadow:var(--shadow-sm);border-color:rgba(16,24,40,0.26);text-decoration:none}
.btn:active{transform:translateY(0);box-shadow:none}
.btn[disabled], .btn.is-disabled{opacity:0.55;cursor:not-allowed;transform:none;box-shadow:none}

.btn--ghost{background:transparent}

.btn--primary{
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color:#fff;
  border-color: rgba(26,115,232,0.55);
}
.btn--primary:before{
  content:"";position:absolute;top:-40%;left:-50%;
  width:60%;height:200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: rotate(18deg);
  opacity:0;
}
.btn--primary:hover:before{animation: shine 780ms ease}

@keyframes shine{
  0%{transform:translateX(-40%) rotate(18deg);opacity:0}
  15%{opacity:1}
  100%{transform:translateX(220%) rotate(18deg);opacity:0}
}

.btn--danger{
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.32);
}

.btn--complete{
  background: linear-gradient(135deg, rgba(0,200,83,0.96), rgba(6,182,212,0.86));
  border-color: rgba(0,200,83,0.42);
  color:#fff;
}

.btn--small{padding:8px 10px;border-radius:12px;font-size:13px}
.btn--big{padding:12px 14px;border-radius:16px;font-weight:900}

/* Badges / pills */
.badge{
  display:inline-flex;align-items:center;gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  font-size:12px;
  font-weight:900;
  background:rgba(255,255,255,0.9);
}
.badge--yellow{border-color: rgba(245,158,11,0.35); background: rgba(245,158,11,0.08);}
.badge--green{border-color: rgba(0,200,83,0.35); background: rgba(0,200,83,0.08);}
.badge--blue{border-color: rgba(26,115,232,0.35); background: rgba(26,115,232,0.08);}
.badge--red{border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.08);}

.pill{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 12px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.92);
}
.pill--amber{border-color: rgba(245,158,11,0.35); background: rgba(245,158,11,0.08)}
.pill--green{border-color: rgba(0,200,83,0.35); background: rgba(0,200,83,0.08)}

/* Alerts */
.alert{padding:12px 14px;border-radius:16px;border:1px solid var(--border);background:rgba(255,255,255,0.92)}
.alert--success{border-color: rgba(0,200,83,0.30); background: rgba(0,200,83,0.08)}
.alert--danger{border-color: rgba(239,68,68,0.32); background: rgba(239,68,68,0.08)}
.alert--warning{border-color: rgba(245,158,11,0.35); background: rgba(245,158,11,0.08)}

/* Tabs */
.tabs{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 18px}
.tab{
  padding:10px 12px;border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.78);
  font-weight:900;
  color: rgba(11,18,32,0.88);
}
.tab:hover{text-decoration:none;box-shadow: var(--shadow-sm)}
.tab--active{border-color: rgba(26,115,232,0.35); background: rgba(26,115,232,0.08)}

/* Tables */
.tablewrap{overflow:auto;border:1px solid var(--border);border-radius:18px;background:rgba(255,255,255,0.9);box-shadow:var(--shadow-sm)}
.table{width:100%;border-collapse:separate;border-spacing:0}
.table th,.table td{padding:12px 14px;text-align:left;border-bottom:1px solid var(--border);vertical-align:top}
.table th{font-size:12px;letter-spacing:0.04em;text-transform:uppercase;color:rgba(11,18,32,0.70)}
.table tr:last-child td{border-bottom:none}
.row--overdue td{background: rgba(239,68,68,0.05)}

/* Marvin hero */
.hero{
  display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap;
  margin: 10px 0 18px;
}
.hero__left{min-width:260px}
.hero-kicker{
  display:inline-flex;align-items:center;gap:10px;
  padding:6px 10px;border-radius:999px;
  border:1px solid rgba(200,155,42,0.28);
  background: rgba(200,155,42,0.10);
  font-weight:900;
  color: rgba(11,18,32,0.86);
  font-size:12px;
}
.hero-sub{margin:8px 0 0;max-width:720px}

.stats{display:flex;gap:12px;flex-wrap:wrap;justify-content:flex-end}
.stat{
  min-width:170px;
  padding:14px 14px;
  border-radius:18px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow-sm);
}
.stat__label{font-size:12px;color:rgba(11,18,32,0.70);font-weight:900;text-transform:uppercase;letter-spacing:0.04em}
.stat__value{font-size:28px;font-weight:950;margin-top:6px}
.stat--pending{border-color: rgba(245,158,11,0.30)}
.stat--done{border-color: rgba(0,200,83,0.28)}
.stat--overdue{border-color: rgba(239,68,68,0.30)}

/* Request card (Marvin list) */
.req-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.req-title{font-weight:950;font-size:18px;letter-spacing:-0.01em}
.req-sub{margin-top:6px}
.req-meta{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.meta-chip{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 10px;border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.78);
  font-weight:850;
  font-size:12px;
}
.meta-chip--danger{border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.08)}

.req-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}

/* Detail */
.detail-hero{
  display:flex;justify-content:space-between;gap:18px;align-items:flex-start;flex-wrap:wrap;
  margin: 6px 0 18px;
}
.backlink{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-weight:900;margin-bottom:10px}
.backlink:hover{text-decoration:none;color:rgba(11,18,32,0.92)}

.kv{display:grid;gap:10px;margin-top:6px}
.kv > div{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:10px 0;border-bottom:1px dashed rgba(11,18,32,0.14)}
.kv > div:last-child{border-bottom:none}
.kv .k{color:rgba(11,18,32,0.72);font-weight:900}
.kv .v{font-weight:900;text-align:right}

.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

.mapwrap{border-radius:18px;overflow:hidden;border:1px solid var(--border);background:#fff}
.mapwrap iframe{width:100%;height:360px;border:0}

/* Email box */
.emailbox{
  background: #0b1220;
  color: #e6eefc;
  border-radius:18px;
  padding:16px;
  border:1px solid rgba(255,255,255,0.10);
  overflow:auto;
  white-space:pre-wrap;
  line-height:1.55;
  font-family: "Times New Roman", Times, serif;
}
.pref-arial .emailbox{font-family: Arial, Helvetica, sans-serif}

.email-actions{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap;margin:12px 0}

/* File list */
.filelist{display:grid;gap:10px;margin-top:12px}
.fileitem{
  display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.86);
}
.fileitem__name{font-weight:950}
.fileitem__meta{font-size:12px;color:var(--muted);margin-top:4px}

/* Toast */
.toast{
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow-sm);
  z-index: 99;
  transition: opacity 180ms ease, transform 180ms ease;
  font-weight: 900;
}
.toast--show{opacity:1;transform: translateX(-50%) translateY(0)}
.toast--success{border-color: rgba(0,200,83,0.35); background: rgba(0,200,83,0.10)}
.toast--danger{border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.10)}
.toast--warning{border-color: rgba(245,158,11,0.35); background: rgba(245,158,11,0.10)}

/* Footer */
.footer{padding:18px 0 26px}
.footer__inner{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:rgba(11,18,32,0.82)}

/* Compatibility helpers */
.pagehead{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:10px 0 18px;flex-wrap:wrap}
.pagehead p{margin:8px 0 0}
.help{margin-top:12px;font-size:12px;color:var(--muted)}
.badge--gray{border-color: rgba(11,18,32,0.18); background: rgba(11,18,32,0.05)}
.inline{display:inline}
code{background:rgba(26,115,232,0.08);border:1px solid rgba(26,115,232,0.18);padding:2px 6px;border-radius:10px;font-weight:900;font-size:12px}
