:root {
  /* Light, colorful, premium */
  --bg: #f3f7ff;
  --panel: #ffffff;
  --surface: #ffffff;
  --text: #0b1220;
  --muted: #55647a;
  --border: rgba(11, 18, 32, 0.12);

  /* Accents */
  --blue: #2563eb;
  --blue2: #06b6d4;
  --purple: #7c3aed;
  --pink: #ec4899;
  --gold: #f5b700;
  --orange: #fb923c;

  /* Status */
  --green: #00e676;
  --green2: #00c853;
  --yellow: #fbbf24;
  --red: #ef4444;

  --radius: 20px;
  --shadow: 0 20px 60px rgba(11, 18, 32, 0.12);
  --shadow-sm: 0 10px 26px rgba(11, 18, 32, 0.10);
}

* body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background:
    radial-gradient(900px 650px at 10% 0%, rgba(37,99,235,0.22), transparent 60%),
    radial-gradient(900px 650px at 92% 8%, rgba(124,58,237,0.20), transparent 58%),
    radial-gradient(900px 650px at 70% 86%, rgba(236,72,153,0.14), transparent 60%),
    radial-gradient(900px 650px at 22% 92%, rgba(245,183,0,0.14), transparent 60%),
    linear-gradient(180deg, #ffffff, var(--bg));
  color: var(--text);
}
ient(180deg, #ffffff, var(--bg));
  color: var(--text);
}

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

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

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

.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, rgba(26,115,232,0.95), rgba(200,155,42,0.95));
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(26,115,232,0.18);
  position: relative;
  overflow: hidden;
}
.brand__mark::after{
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 55%);
}
.brand__name { font-weight: 900; }
.brand__tag { font-size: 12px; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nav a { color: var(--text); opacity: 0.9; }
.nav a:hover { opacity: 1; }

.main { padding: 22px 0 44px; }

.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 18px;
}
.pagehead h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; }
.pagehead__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.backlink{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 800;
}
.backlink:hover{ color: var(--text); text-decoration: none; }

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

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

.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;
}
.card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, rgba(26,115,232,0.65), rgba(200,155,42,0.65));
}
.card:hover{
  box-shadow: 0 18px 44px rgba(16,24,40,0.13);
  transform: translateY(-1px);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.card + .card { margin-top: 18px; }
.card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.card__meta{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.card--narrow { max-width: 540px; margin: 0 auto; }

.card--yellow { border-color: rgba(253,176,34,0.36); }
.card--yellow::before{ background: linear-gradient(90deg, rgba(253,176,34,0.95), rgba(200,155,42,0.85)); }

.card--green { border-color: rgba(0,200,83,0.38); }
.card--green::before{ background: linear-gradient(90deg, rgba(0,200,83,0.95), rgba(0,230,118,0.80)); }

.card--overdue { border-color: rgba(240,68,56,0.48); }
.card--overdue::before{ background: linear-gradient(90deg, rgba(240,68,56,0.95), rgba(253,176,34,0.80)); }

.h2 { margin: 0 0 6px; font-size: 20px; }

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

.grid {
  display: grid;
  gap: 18px;
}
.grid--2 { grid-template-columns: 1.15fr 0.85fr; }
.grid--3 { grid-template-columns: 1fr 1fr 1fr; }

.section { margin-top: 14px; }

@media (max-width: 980px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .pagehead { flex-direction: column; }
}

@media (max-width: 520px) {
  .container { padding: 0 14px; }
  .main { padding: 18px 0 36px; }
  .card { padding: 14px; }
}

.form { display: grid; gap: 12px; }
.field { display: grid; gap: 8px; }
.field span { font-weight: 800; }

input, textarea, select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(16,24,40,0.16);
  background: #ffffff;
  color: var(--text);
  outline: none;
}
input::placeholder, textarea::placeholder { color: rgba(16,24,40,0.45); }
input:focus, textarea:focus, select:focus {
  border-color: rgba(26,115,232,0.55);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.14);
}

.hint { font-size: 12px; color: var(--muted); }

.form__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(16,24,40,0.16);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(16,24,40,0.24);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.btn:active { transform: translateY(0px); box-shadow: none; }

.btn--primary {
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  border-color: rgba(26,115,232,0.60);
  color: #ffffff;
}
.btn--primary:hover { border-color: rgba(26,115,232,0.80); }

.btn--ghost { background: transparent; }

.btn--danger {
  background: rgba(240,68,56,0.10);
  border-color: rgba(240,68,56,0.35);
}

.btn--success {
  background: rgba(0,200,83,0.12);
  border-color: rgba(0,200,83,0.38);
}

/* New: prominent completion button */
.btn--complete{
  background: linear-gradient(135deg, rgba(0,200,83,1), rgba(0,230,118,1));
  border-color: rgba(0,200,83,0.70);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(0,200,83,0.22);
}
.btn--complete:hover{
  border-color: rgba(0,200,83,0.95);
  box-shadow: 0 14px 30px rgba(0,200,83,0.26);
}

.btn--small { padding: 8px 10px; border-radius: 11px; font-size: 14px; }
.btn--block { width: 100%; }

.btn[disabled], .btn.is-disabled{
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

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

.actiongrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 520px) {
  .actiongrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actiongrid .btn { width: 100%; }
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  border: 1px solid rgba(16,24,40,0.14);
  background: #f2f4f7;
}
.badge--yellow { border-color: rgba(253,176,34,0.52); color: #b54708; background: rgba(253,176,34,0.14); }
.badge--green { border-color: rgba(0,200,83,0.52); color: #067647; background: rgba(0,200,83,0.12); }
.badge--blue { border-color: rgba(26,115,232,0.45); color: #175cd3; background: rgba(26,115,232,0.12); }
.badge--gray { border-color: rgba(16,24,40,0.18); color: var(--muted); background: rgba(16,24,40,0.04); }

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(16,24,40,0.03);
  margin-bottom: 14px;
}
.alert--success { border-color: rgba(0,200,83,0.35); background: rgba(0,200,83,0.10); }
.alert--danger { border-color: rgba(240,68,56,0.35); background: rgba(240,68,56,0.10); }
.alert--warning { border-color: rgba(253,176,34,0.35); background: rgba(253,176,34,0.10); }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.tab {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(16,24,40,0.16);
  color: var(--text);
  background: #ffffff;
  opacity: 0.90;
}
.tab--active { opacity: 1; border-color: rgba(26,115,232,0.45); background: rgba(26,115,232,0.08); }

.tablewrap { overflow: auto; border-radius: var(--radius); border: 1px solid var(--border); background: #ffffff; }
.table { width: 100%; border-collapse: collapse; min-width: 780px; }
.table th, .table td { padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 800; }
.table tr:last-child td { border-bottom: 0; }
.row--overdue td { background: rgba(240,68,56,0.05); }

.t-project__title { font-weight: 900; }
.t-project__sub { font-size: 12px; color: var(--muted); }

.kv { display: grid; gap: 10px; }
.kv > div { display: flex; justify-content: space-between; gap: 10px; }
.kv--3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 980px) { .kv--3 { grid-template-columns: 1fr; } }
.k { color: var(--muted); font-weight: 800; }
.v { font-weight: 900; }

/* Email block: looks like a "letter" instead of a notepad */
.email-actions{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.emailbox {
  margin: 10px 0 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(200,155,42,0.22);
  background:
    linear-gradient(180deg, #ffffff, #fffdf7);
  box-shadow: 0 10px 26px rgba(16,24,40,0.08);
  white-space: pre-wrap;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: "Times New Roman", Times, serif; /* requested look */
  font-size: 15px;
}
.emailbox--compact { max-height: 220px; overflow: auto; }

.mapwrap {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(16,24,40,0.12);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(16,24,40,0.08);
}
.mapwrap iframe {
  width: 100%;
  height: clamp(220px, 28vh, 300px);
  border: 0;
  display: block;
}
.mapwrap--compact iframe { height: clamp(200px, 22vh, 260px); }

details.accordion {
  border: 1px solid rgba(16,24,40,0.12);
  background: rgba(255,255,255,0.60);
  border-radius: 16px;
  padding: 10px 12px;
}
details.accordion > summary {
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}
details.accordion > summary::-webkit-details-marker { display: none; }
details.accordion[open] { padding-bottom: 12px; }

.inline { display: inline; }

.help {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed rgba(16,24,40,0.22);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255,255,255,0.70);
}

.footer { margin-top: 40px; padding: 20px 0; border-top: 1px solid var(--border); background: rgba(255,255,255,0.60); }
.footer__inner { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); }

.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(16,24,40,0.12);
  padding: 10px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 50;
  max-width: 92vw;
  color: var(--text);
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast--show{ opacity: 1; transform: translateX(-50%) translateY(0px); }

/* =========================================
   Colorful Marvin + Details UI (v2)
   ========================================= */

.cards--marvin { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

.marvin-hero{
  border-radius: 26px;
  padding: 18px 18px;
  margin: 10px 0 16px;
  border: 1px solid rgba(11,18,32,0.10);
  background:
    radial-gradient(420px 260px at 14% 20%, rgba(37,99,235,0.18), transparent 60%),
    radial-gradient(420px 260px at 70% 30%, rgba(124,58,237,0.16), transparent 62%),
    radial-gradient(420px 260px at 90% 72%, rgba(236,72,153,0.12), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  overflow: hidden;
  position: relative;
}
@media (max-width: 980px){
  .marvin-hero{ grid-template-columns: 1fr; }
}

.hero-kicker{
  display:inline-flex;
  gap: 10px;
  align-items:center;
  font-weight: 900;
  letter-spacing: .3px;
  color: rgba(11,18,32,0.82);
  margin-bottom: 6px;
}
.hero-kicker::before{
  content: "✨";
  width: 30px;
  height: 30px;
  display:grid;
  place-items:center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(37,99,235,0.92), rgba(124,58,237,0.92));
  color: #fff;
  box-shadow: 0 16px 34px rgba(37,99,235,0.22);
}
.marvin-hero h1{ margin: 0 0 6px; font-size: 30px; line-height: 1.15; }
.hero-sub{ margin: 0; color: var(--muted); max-width: 62ch; }

.marvin-hero__stats{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}
@media (max-width: 640px){
  .marvin-hero__stats{ grid-template-columns: 1fr; }
}

.statcard{
  border-radius: 18px;
  padding: 14px 14px;
  border: 1px solid rgba(11,18,32,0.10);
  background: rgba(255,255,255,0.72);
  box-shadow: 0 14px 36px rgba(11,18,32,0.10);
  position: relative;
  overflow:hidden;
}
.statcard::before{
  content:"";
  position:absolute;
  inset:0;
  opacity: .9;
  pointer-events:none;
}
.statcard__label{ font-weight: 900; color: rgba(11,18,32,0.72); }
.statcard__value{ font-size: 28px; font-weight: 1000; margin-top: 6px; }
.statcard__hint{ margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 800; }

.statcard--yellow::before{ background: radial-gradient(240px 140px at 20% 20%, rgba(251,191,36,0.40), transparent 60%); }
.statcard--green::before{ background: radial-gradient(240px 140px at 20% 20%, rgba(0,230,118,0.30), transparent 60%); }
.statcard--red::before{ background: radial-gradient(240px 140px at 20% 20%, rgba(239,68,68,0.28), transparent 60%); }

.tabs--color .tab{
  border-radius: 999px;
  border: 1px solid rgba(11,18,32,0.12);
  background: rgba(255,255,255,0.78);
  box-shadow: 0 10px 22px rgba(11,18,32,0.08);
  font-weight: 900;
}
.tab--pill{ padding: 10px 14px; }
.tabs--color .tab:hover{ text-decoration:none; transform: translateY(-1px); }
.tabs--color .tab--active{
  color:#fff;
  border-color: rgba(37,99,235,0.40);
  background: linear-gradient(135deg, rgba(37,99,235,0.96), rgba(124,58,237,0.92));
  box-shadow: 0 14px 30px rgba(37,99,235,0.22);
}

.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.6px;
  border: 1px solid rgba(11,18,32,0.14);
  background: rgba(255,255,255,0.78);
}
.pill--green{
  border-color: rgba(0,230,118,0.52);
  background: rgba(0,230,118,0.14);
  color: #0b6b3a;
}
.pill--amber{
  border-color: rgba(251,191,36,0.60);
  background: rgba(251,191,36,0.16);
  color: #92400e;
}

.chips{ display:flex; gap: 10px; flex-wrap: wrap; justify-content:flex-end; }
.chip{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(11,18,32,0.10);
  background: rgba(255,255,255,0.75);
  font-size: 12px;
  color: rgba(11,18,32,0.74);
  font-weight: 800;
}
.chip--danger{
  border-color: rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.12);
  color: rgba(153,27,27,0.95);
}

/* Request card layout */
.req-card__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
}
@media (max-width: 720px){
  .req-card__top{ flex-direction: column; }
  .chips{ justify-content:flex-start; }
}
.req-title{ margin: 0 0 6px; font-size: 18px; line-height: 1.2; }
.req-sub{ color: var(--muted); font-weight: 800; }

.req-card__status{ display:flex; flex-direction: column; gap: 10px; align-items:flex-end; }
@media (max-width: 720px){
  .req-card__status{ align-items:flex-start; }
}

.req-card__actions{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.req-card__actions .btn{ box-shadow: 0 10px 24px rgba(11,18,32,0.08); }
.req-card__actions .btn:hover{ box-shadow: 0 14px 30px rgba(11,18,32,0.12); }

.req-card__footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(11,18,32,0.14);
}

/* Make cards more colorful */
.card::before{
  background: linear-gradient(90deg, rgba(37,99,235,0.95), rgba(124,58,237,0.90), rgba(236,72,153,0.82));
}
.card--yellow{
  border-color: rgba(251,191,36,0.38);
  background: linear-gradient(180deg, rgba(251,191,36,0.14), rgba(255,255,255,0.96));
}
.card--yellow::before{ background: linear-gradient(90deg, rgba(251,191,36,0.95), rgba(245,183,0,0.90)); }

.card--green{
  border-color: rgba(0,230,118,0.34);
  background: linear-gradient(180deg, rgba(0,230,118,0.12), rgba(255,255,255,0.96));
}
.card--green::before{ background: linear-gradient(90deg, rgba(0,230,118,0.95), rgba(0,200,83,0.86)); }

.card--overdue{
  border-color: rgba(239,68,68,0.40);
  background: linear-gradient(180deg, rgba(239,68,68,0.10), rgba(255,255,255,0.96));
}
.card--overdue::before{ background: linear-gradient(90deg, rgba(239,68,68,0.92), rgba(251,191,36,0.84)); }

.card--soft{
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.82));
}

/* Super-green completion button (very visible) */
.btn--complete{
  background: linear-gradient(135deg, #00c853, #00ff8a);
  border-color: rgba(0,255,138,0.55);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(0,200,83,0.28);
}
.btn--complete:hover{
  border-color: rgba(0,255,138,0.85);
  box-shadow: 0 22px 46px rgba(0,200,83,0.32);
  transform: translateY(-1px);
}
.btn--big{
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 15px;
}

/* Details hero */
.detail-hero{
  border-radius: 26px;
  padding: 16px 16px;
  margin: 10px 0 18px;
  border: 1px solid rgba(11,18,32,0.10);
  background:
    radial-gradient(520px 260px at 14% 28%, rgba(37,99,235,0.18), transparent 62%),
    radial-gradient(520px 260px at 80% 34%, rgba(124,58,237,0.14), transparent 64%),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
  box-shadow: var(--shadow);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
}
@media (max-width: 980px){
  .detail-hero{ flex-direction: column; }
}
.detail-hero__chips{ display:flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.detail-hero__actions{ display:flex; gap: 10px; flex-wrap: wrap; align-items:center; }

/* Email font preference toggle */
html.pref-arial .emailbox{
  font-family: Arial, Helvetica, sans-serif !important;
}

