/* VACMAIL panel - "Yön A" design language from the approved canvas.
   Embossed surfaces, a floating navy rail, a filled active tab. */

:root {
  --navy-900: #0B1424;
  --navy-800: #0E1A2E;
  --navy-700: #0F1D33;
  --navy-600: #14243D;
  --navy-500: #1D3050;
  --navy-400: #24406E;
  --line-navy: #2A3F63;

  --blue-600: #2448E0;
  --blue-500: #4A6FFF;
  --blue-300: #8FA6FF;
  --blue-100: #E6ECFF;
  --blue-050: #F4F7FF;

  --gold-500: #E7A21E;
  --gold-300: #FFD978;
  --gold-050: #FFF8EC;

  --green-700: #0F6B3A;
  --green-500: #22B864;
  --green-050: #E3F7EC;
  --red-700: #8E1B22;
  --red-500: #C9262E;
  --red-050: #FDECEC;
  --amber-700: #9A5200;
  --amber-050: #FFF3E0;
  --purple-600: #4B2FD1;
  --purple-050: #F1EDFF;

  --ink: #101A2C;
  --ink-2: #3C4A63;
  --ink-3: #5A6882;
  --ink-4: #8C98AE;
  --bg: #EEF1F7;
  --card: #FFFFFF;
  --line: #E3E8F2;
  --line-2: #EEF1F7;

  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 24px;
  --emboss: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 0 rgba(16,26,44,.07),
            0 6px 14px -6px rgba(16,26,44,.45);
  --card-shadow: 0 1px 0 rgba(16,26,44,.04), 0 12px 28px -18px rgba(16,26,44,.35);
  --rail-shadow: 0 24px 48px -20px rgba(8,16,32,.65), inset 0 1px 0 rgba(255,255,255,.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(1200px 500px at 70% -10%, #DCE4FA 0%, rgba(220,228,250,0) 70%), var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}
body.platform {
  background: radial-gradient(1200px 500px at 70% -10%, #F6E7C8 0%, rgba(246,231,200,0) 70%), var(--bg);
}
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
a { color: var(--blue-600); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- layout */
.shell { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 100vh; }
.rail-wrap { flex: 1 1 288px; max-width: 288px; padding: 14px; }
.main { flex: 999 1 560px; min-width: 0; padding: 26px 32px 48px 18px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 900px) {
  .rail-wrap { max-width: none; }
  .main { padding: 16px; }
}

/* ------------------------------------------------------------------ rail */
.rail {
  min-height: calc(100vh - 28px); border-radius: 22px; padding: 20px 14px 14px;
  display: flex; flex-direction: column; gap: 18px; color: #C3CDE0;
  background: linear-gradient(180deg, var(--navy-700) 0%, #0B1628 100%);
  box-shadow: var(--rail-shadow);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: linear-gradient(145deg, #3D63FF, #1E3BC4);
  box-shadow: 0 6px 14px -4px rgba(47,91,255,.7), inset 0 1px 0 rgba(255,255,255,.35);
}
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: .14em; color: #fff; }

/* The embossed firm block the owner asked for */
.firm-card {
  border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(180deg, var(--navy-500) 0%, var(--navy-600) 100%);
  border: 1px solid var(--line-navy);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -2px 0 rgba(0,0,0,.35),
              0 12px 22px -10px rgba(0,0,0,.7);
}
.firm-top { display: flex; align-items: center; gap: 10px; }
.firm-badge {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: #3A2600;
  background: linear-gradient(145deg, var(--gold-300), var(--gold-500));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 0 rgba(120,70,0,.35),
              0 4px 10px -2px rgba(0,0,0,.5);
}
.firm-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #8EA2C6; }
.firm-name { font-weight: 600; color: #fff; font-size: 15px; }
.firm-meter { height: 8px; border-radius: 4px; background: #0B1628; box-shadow: inset 0 1px 2px rgba(0,0,0,.6); }
.firm-meter > i {
  display: block; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, #4D72FF, #7FA0FF); box-shadow: 0 0 10px rgba(110,139,255,.6);
}
.firm-pill {
  align-self: flex-start; font-size: 11px; padding: 3px 8px; border-radius: 6px;
  background: var(--navy-700); color: #9FB3D9; box-shadow: inset 0 1px 2px rgba(0,0,0,.5);
}
.admin-card {
  border-radius: 16px; padding: 14px; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, #3B2A0C 0%, #2A1D07 100%); border: 1px solid #5A4214;
  box-shadow: inset 0 1px 0 rgba(255,220,150,.18), inset 0 -2px 0 rgba(0,0,0,.4),
              0 12px 22px -10px rgba(0,0,0,.7);
}

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-head { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #6F82A6; padding: 12px 12px 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
  border-radius: 12px; text-decoration: none; font-size: 14px; font-weight: 500; color: #B7C3DA;
}
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a.on {
  color: #fff; font-weight: 600;
  background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-600) 100%);
  box-shadow: 0 10px 22px -8px rgba(47,91,255,.85), 0 2px 4px rgba(0,0,0,.35),
              inset 0 1px 0 rgba(255,255,255,.28), inset 0 -2px 0 rgba(10,30,120,.35);
}
.nav .badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.rail-foot {
  margin-top: auto; border-radius: var(--r-md); padding: 10px; display: flex; align-items: center; gap: 10px;
  background: var(--navy-900); box-shadow: inset 0 1px 3px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.05);
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 600; font-size: 13px; color: #fff; background: linear-gradient(145deg, #7C5CFF, #4B2FD1);
}

/* --------------------------------------------------------------- top bar */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
/* Long code samples scroll inside their own box rather than widening the page. */
pre { max-width: 100%; overflow-x: auto; }
.topbar .title { flex: 1 1 280px; min-width: 0; }
.crumb { font-size: 12px; color: var(--ink-3); }
.topbar h1 { font-size: 26px; font-weight: 700; }
.search {
  flex: 0 1 300px; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border-radius: 12px; background: var(--card); border: 1px solid #DCE2EE;
  box-shadow: inset 0 1px 2px rgba(16,26,44,.06);
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 14px; background: transparent; }
.live {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; background: var(--green-050); color: var(--green-700);
  font-size: 13px; font-weight: 600; box-shadow: inset 0 0 0 1px #BFE8D0;
}
.live.off { background: var(--amber-050); color: var(--amber-700); box-shadow: inset 0 0 0 1px #F2D49A; }
.live .dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }

/* ----------------------------------------------------------------- cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--card-shadow); }
.card > header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
}
.card > header h2 { flex: 1 1 180px; font-size: 17px; font-weight: 700; }
.card-body { padding: 18px 20px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
@media (max-width: 1100px) { .g6 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 700px) { .g6, .g4, .g3, .g2 { grid-template-columns: 1fr; } }
.row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.row > .wide { flex: 999 1 560px; min-width: 0; }
.row > .side { flex: 1 1 320px; min-width: 0; }

.hero {
  border-radius: var(--r-xl); padding: 24px 28px; display: flex; flex-wrap: wrap; gap: 26px;
  align-items: center; color: #fff;
  background: linear-gradient(120deg, #13264A 0%, #1B3577 55%, var(--blue-600) 120%);
  box-shadow: 0 24px 50px -24px rgba(27,53,119,.85), inset 0 1px 0 rgba(255,255,255,.12);
}
.hero .big { font: 700 44px/1 'IBM Plex Mono', monospace; }
.hero .sub { font-size: 13px; color: #B9C8EE; }

.kpi { border-radius: 18px; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 8px;
       background: var(--card); border: 1px solid var(--line); box-shadow: var(--card-shadow); }
.kpi .tile { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; box-shadow: var(--emboss); }
.kpi .val { font: 700 24px/1.1 'IBM Plex Mono', monospace; }
.kpi .lbl { font-size: 12px; color: var(--ink-3); }

.meter { height: 8px; border-radius: 4px; background: var(--line-2); box-shadow: inset 0 1px 2px rgba(16,26,44,.12); overflow: hidden; }
.meter > i { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--blue-500), var(--blue-600)); }

/* ----------------------------------------------------------------- table */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
.scroll-x { overflow-x: auto; }
thead th {
  text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-3); background: #F6F8FC; padding: 10px 20px; white-space: nowrap;
}
tbody td { padding: 12px 20px; border-top: 1px solid var(--line-2); vertical-align: middle; }
tbody tr:hover { background: #FBFCFE; }
.num { text-align: right; font-family: 'IBM Plex Mono', monospace; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
       font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.ok { background: var(--green-050); color: var(--green-700); }
.tag.info { background: var(--blue-100); color: #1C3BB8; }
.tag.warn { background: var(--amber-050); color: var(--amber-700); }
.tag.bad { background: var(--red-050); color: var(--red-700); }
.tag.mute { background: var(--line-2); color: var(--ink-2); }
.tag.purple { background: var(--purple-050); color: var(--purple-600); }

/* --------------------------------------------------------------- buttons */
button, .btn {
  font: inherit; font-weight: 600; min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid #DCE2EE; background: linear-gradient(180deg, #fff, #F4F6FB); color: var(--ink);
  cursor: pointer; box-shadow: inset 0 -2px 0 rgba(16,26,44,.05), 0 4px 10px -8px rgba(16,26,44,.5);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
button:hover, .btn:hover { background: #fff; }
button.primary, .btn.primary {
  border: 0; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  box-shadow: 0 12px 24px -10px rgba(36,72,224,.8), inset 0 1px 0 rgba(255,255,255,.3);
}
button.danger { border-color: #F3C9CB; background: #FFF5F5; color: var(--red-700); }
button.good { border: 0; color: #06281A; background: linear-gradient(135deg, #5FE3A0, #13A05C); }
button:disabled { opacity: .55; cursor: not-allowed; background: var(--line-2); color: var(--ink-4); box-shadow: none; }
button.ghost { border: 0; background: transparent; box-shadow: none; min-height: 32px; padding: 0 8px; }
/* Wraps on purpose: the campaign filter has six segments and would push the
   page sideways on a phone otherwise. */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 16px;
       max-width: 100%; background: #DFE5F0; box-shadow: inset 0 1px 3px rgba(16,26,44,.15); }
.seg button { min-height: 38px; border: 0; background: transparent; box-shadow: none; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 6px 14px -6px rgba(16,26,44,.35), inset 0 -2px 0 rgba(16,26,44,.06); }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], select, textarea {
  min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid #DCE2EE;
  background: #F6F8FC; font: inherit; font-size: 14px; font-weight: 400; color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(16,26,44,.06);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-300); outline-offset: 1px; background: #fff; }

.switch { width: 46px; height: 26px; flex: 0 0 46px; border-radius: 13px; position: relative;
          background: #C9D1DE; box-shadow: inset 0 1px 3px rgba(16,26,44,.3); border: 0; padding: 0; }
.switch > i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
              background: #fff; box-shadow: 0 2px 5px rgba(16,26,44,.4); transition: left .15s; }
.switch[aria-checked=true] { background: linear-gradient(90deg, var(--blue-500), var(--blue-600)); }
.switch[aria-checked=true] > i { left: 23px; }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; top: 24px; right: 24px; width: 400px; max-width: calc(100vw - 32px);
          display: flex; flex-direction: column; gap: 12px; z-index: 60; }
.toast {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 14px 14px 18px;
  display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 18px 40px -16px rgba(16,26,44,.45), 0 2px 6px rgba(16,26,44,.08),
              inset 0 1px 0 rgba(255,255,255,.9);
  animation: toast-in .22s ease-out;
}
@keyframes toast-in { from { transform: translateX(16px); opacity: 0 } to { transform: none; opacity: 1 } }
.toast .icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center;
               background: #fff; box-shadow: inset 0 -2px 0 rgba(16,26,44,.06); }
.toast .kind { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.toast .ttl { font-size: 15px; font-weight: 700; }
.toast .msg { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.toast > .bar { position: absolute; left: 0; bottom: 0; height: 4px; opacity: .55; border-radius: 0 4px 4px 0; }
.toast.ok    { border-color: #C9EED9; } .toast.ok .kind, .toast.ok .bar { color: var(--green-700); background-color: currentColor; }
.toast.info  { border-color: #D3DCFF; } .toast.info .kind, .toast.info .bar { color: var(--blue-600); background-color: currentColor; }
.toast.warn  { border-color: #FBE0B0; } .toast.warn .kind, .toast.warn .bar { color: var(--amber-700); background-color: currentColor; }
.toast.bad   { border-color: #F8CACA; } .toast.bad .kind, .toast.bad .bar { color: var(--red-700); background-color: currentColor; }
.toast .kind { background: none !important; }

/* ----------------------------------------------------------------- login */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login form { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login .box {
  width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px;
  border-radius: 28px; padding: 36px 32px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(16,26,44,.5), inset 0 1px 0 #fff;
}
.login aside { flex: 1 1 420px; min-height: 320px; position: relative; overflow: hidden; background: var(--navy-800);
               display: flex; align-items: flex-end; padding: 48px 40px; }
.login aside .line { font-size: 32px; font-weight: 700; color: #fff; line-height: 1.18; text-shadow: 0 2px 20px rgba(0,0,0,.5); }

.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.notice { border-radius: 18px; padding: 14px 18px; display: flex; gap: 14px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; }
.notice.warn { background: var(--gold-050); border: 1px solid #F2D49A; color: var(--ink-2); }
.notice.bad { background: #FFF4F4; border: 1px solid #F3C9CB; color: var(--ink-2); }
.notice b { color: var(--ink); }
.skeleton { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #E8ECF3, #F6F8FC, #E8ECF3);
            background-size: 200% 100%; animation: sk 1.1s linear infinite; }
@keyframes sk { to { background-position: -200% 0 } }
