/* Migo Bill — light UI aligned with migo.host */

:root{
  --bg:#F7F8FB;
  --card:rgba(255,255,255,.78);
  --card2:rgba(255,255,255,.68);
  --text:#0B1220;
  --muted:rgba(11,18,32,.68);
  --acc:#2F6BFF;
  --acc2:#00C2FF;
  --primary: var(--acc);
  --ink: var(--text);
  --ok:#18B368;
  --warn:#F59E0B;
  --danger:#E11D48;
  --line:rgba(11,18,32,.08);
  --line2:rgba(11,18,32,.12);
  --shadow:0 30px 70px rgba(11,18,32,.14);
  --shadow2:0 18px 50px rgba(11,18,32,.10);
  --border:var(--line);
  --radius:22px;
  --radius2:16px;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:
    radial-gradient(900px 420px at 20% -10%, rgba(47,107,255,.14), transparent 60%),
    radial-gradient(900px 420px at 85% 0%, rgba(0,194,255,.12), transparent 55%),
    radial-gradient(700px 420px at 70% 120%, rgba(255,102,173,.10), transparent 55%),
    var(--bg);
  line-height:1.5;
}

a{color:var(--acc); text-decoration:none; font-weight:800}
a:hover{text-decoration:underline}

.container{max-width:1180px; margin:0 auto; padding:0 18px}
.main{padding:18px 0 40px}

.skip{position:absolute;left:-9999px;top:10px;background:#fff;padding:10px 12px;border-radius:12px;border:1px solid var(--line2);z-index:50}
.skip:focus{left:12px}

.header{
  position:sticky; top:0; z-index:1000;
  background: rgba(247,248,251,.74);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--line);
}
.topbar{
  border-bottom:1px solid var(--line);
  background: rgba(247,248,251,.66);
}
.topbar__inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
  padding:6px 0;
}
.topbar__tagline{
  font-size:11.5px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:56vw;
}
.topbar__right{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end}

.header__inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:14px 0;
  position:relative;
}

.brand{display:flex; align-items:center; gap:10px; min-width:240px; text-decoration:none; color:var(--text)}
.brand__dot{
  width:11px; height:11px; border-radius:50%;
  background: linear-gradient(135deg, var(--acc), var(--acc2));
  box-shadow: 0 0 0 7px rgba(47,107,255,.10);
}
.brand__name{font-weight:800; letter-spacing:.2px}
.brand__tag{font-size:12px; color:var(--muted); margin-left:6px}

.nav{
  display:none;
  gap:4px;
  align-items:center;
  padding:6px;
  border-radius:18px;
  border:1px solid var(--line2);
  background: rgba(255,255,255,.70);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
}
.nav__link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13.5px;
  font-weight:900;
  color:rgba(11,18,32,.62);
  padding:9px 12px;
  border-radius:14px;
  border:1px solid transparent;
  transition: background .18s ease, transform .18s ease, color .18s ease, box-shadow .18s ease;
  text-decoration:none;
}
.nav__link:hover{
  background: rgba(47,107,255,.08);
  border-color: rgba(47,107,255,.14);
  color:var(--text);
  transform: translateY(-1px);
}
.nav__link.is-active{
  background: linear-gradient(135deg, rgba(47,107,255,.18), rgba(0,194,255,.14));
  color:var(--text);
  border:1px solid rgba(47,107,255,.22);
  box-shadow: 0 10px 28px rgba(47,107,255,.10);
}

/* Dropdown (migo.host style) */
.nav__dropdown{position:relative}
.nav__link--drop{
  background:transparent;
  border:1px solid transparent;
  cursor:pointer;
}
.nav__link--drop svg{opacity:.7}
.nav__dropdown.is-active > .nav__link--drop{
  background: linear-gradient(135deg, rgba(47,107,255,.18), rgba(0,194,255,.14));
  color:var(--text);
  border:1px solid rgba(47,107,255,.22);
  box-shadow: 0 10px 28px rgba(47,107,255,.10);
}
.nav__dropdown.is-open > .nav__link--drop{
  background: rgba(47,107,255,.08);
  border-color: rgba(47,107,255,.14);
  color:var(--text);
}

.nav__menu{
  position:absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--line2);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(10px);
  display:none;
  z-index: 1200;
}
.nav__dropdown.is-open .nav__menu{display:block}

.nav__menu-link{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 13.5px;
  color: rgba(11,18,32,.74);
  border: 1px solid transparent;
  text-decoration:none;
}
.nav__menu-link:hover{
  background: rgba(47,107,255,.08);
  border-color: rgba(47,107,255,.14);
  color: var(--text);
  text-decoration:none;
}
.nav__menu-link.is-active{
  background: linear-gradient(135deg, rgba(47,107,255,.16), rgba(0,194,255,.12));
  border-color: rgba(47,107,255,.24);
  color: var(--text);
}

@media (min-width:980px){ .nav{display:flex} }

.subnav{padding-bottom:10px}
.nav--sub{overflow:auto; -webkit-overflow-scrolling:touch}

.burger{
  width:42px; height:42px; border-radius:14px;
  background: rgba(255,255,255,.70);
  border:1px solid var(--line2);
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.burger span{display:block; width:18px; height:2px; background:var(--text); margin:2px 0; border-radius:3px}
@media (min-width:980px){ .burger{display:none} }

.mobile{display:none; border-top:1px solid var(--line); background: rgba(255,255,255,.82); backdrop-filter: blur(12px)}
.mobile.is-open{display:block}
.mobile__inner{padding:14px 0; display:grid; gap:14px}
.mobile__section{border:1px solid var(--line2); border-radius:18px; background: rgba(255,255,255,.88); box-shadow:var(--shadow2); padding:12px}
.mobile__title{font-weight:900; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; margin:0 0 8px}
.mobile__link{display:block; padding:10px 12px; border-radius:14px; color:var(--text); text-decoration:none; font-weight:900; font-size:14px; border:1px solid transparent; background:transparent; cursor:pointer}
.mobile__link:hover{background: rgba(47,107,255,.08)}
.mobile__link.is-active{background: linear-gradient(135deg, rgba(47,107,255,.18), rgba(0,194,255,.14)); border-color: rgba(47,107,255,.22)}
@media (min-width:980px){ .mobile{display:none!important} }

.card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  padding:16px 16px;
  backdrop-filter: blur(10px);
  overflow:auto;
}

.card--scroll{overflow:auto}

.card--warning{
  border-color: rgba(245,158,11,.35);
  background: rgba(245,158,11,.10);
}
@media(max-width:560px){.card{padding:14px}}

.row{display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap}
.grid{display:grid; gap:14px}

/* Responsive 12-col form grid (admin forms) */
.form-grid{display:grid; grid-template-columns:repeat(12, minmax(0,1fr)); gap:12px}
.form-grid .col-12{grid-column:span 12}
.form-grid .col-8{grid-column:span 8}
.form-grid .col-6{grid-column:span 6}
.form-grid .col-4{grid-column:span 4}
.form-grid .col-2{grid-column:span 2}
@media(max-width:860px){
  .form-grid{grid-template-columns:repeat(6, minmax(0,1fr))}
  .form-grid .col-2{grid-column:span 3}
}
@media(max-width:640px){
  .form-grid{grid-template-columns:1fr}
  .form-grid .col-2,.form-grid .col-4,.form-grid .col-6,.form-grid .col-8,.form-grid .col-12{grid-column:span 1}
}
.grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:860px){.grid--2,.grid--3{grid-template-columns:1fr}}
@media(min-width:861px) and (max-width:1080px){.grid--3{grid-template-columns:repeat(2,minmax(0,1fr))}}
.muted{color:var(--muted)}
.small{font-size:12px}
.label{display:block;margin:10px 0 6px 0;font-weight:900;color:var(--text)}
.danger{color:var(--danger); font-weight:900}

.tabs{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:6px;
  border-radius:18px;
  background: rgba(255,255,255,.55);
  border:1px solid var(--line2);
}
.tab{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:14px;
  font-weight:950;
  color:var(--text);
  text-decoration:none;
  border:1px solid transparent;
}
.tab:hover{background: rgba(47,107,255,.08); text-decoration:none}
.tab--active{
  background: linear-gradient(135deg, rgba(47,107,255,.16), rgba(0,194,255,.12));
  border-color: rgba(47,107,255,.26);
  box-shadow:0 0 0 4px rgba(47,107,255,.08);
}
.tab__count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  background: rgba(11,18,32,.06);
  color: rgba(11,18,32,.72);
  font-size:12px;
  font-weight:950;
}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 16px;
  border-radius:14px;
  background: rgba(255,255,255,.70);
  color:var(--text);
  border:1px solid var(--line2);
  font-weight:900;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover{transform: translateY(-1px); box-shadow:var(--shadow2); text-decoration:none}
.btn:active{transform: translateY(0)}
.btn--primary{
  background: linear-gradient(135deg, rgba(47,107,255,.95), rgba(0,194,255,.95));
  color:#fff;
  border:0;
  box-shadow: var(--shadow2);
}
.btn--primary:hover{box-shadow:var(--shadow)}
.btn--ghost{
  background: rgba(255,255,255,.55);
  border:1px solid var(--line2);
}
.btn--small{padding:10px 12px; border-radius:12px; font-size:13px}
.btn--full{width:100%}

.chip, .pill{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--line2);
  background: rgba(255,255,255,.72);
  font-weight:900;
  font-size:12px;
  color: rgba(11,18,32,.86);
  white-space:nowrap;
}
.chip--green, .pill--ok{border-color: rgba(24,179,104,.35); background: rgba(24,179,104,.10); color: rgba(14,90,53,.95)}
.chip--yellow, .pill--warn{border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.10); color: rgba(120,78,0,.95)}
.chip--red, .pill--danger{border-color: rgba(225,29,72,.35); background: rgba(225,29,72,.10); color: rgba(120,10,40,.95)}

.bubble{
  border:1px solid var(--border);
  border-radius:18px;
  padding:12px;
  background: rgba(255,255,255,.70);
}
.bubble--staff{
  background: rgba(47,107,255,.08);
  border-color: rgba(47,107,255,.22);
}
.bubble--client{
  background: rgba(255,255,255,.62);
}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:640px;
}
.table thead th{
  text-align:left;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.06em;
  color: rgba(11,18,32,.62);
  padding:12px 14px;
  border-bottom:1px solid var(--line);
}
.table tbody td{
  padding:12px 14px;
  border-bottom:1px solid rgba(11,18,32,.06);
  vertical-align:top;
}
.table tbody tr:hover td{background: rgba(255,255,255,.50)}
.table a{font-weight:900}

.stats{display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px}
@media(max-width:980px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.stats{grid-template-columns:1fr}}
.stat{
  padding:14px 14px;
  border-radius: var(--radius2);
  background: rgba(255,255,255,.70);
  border:1px solid var(--line2);
}
.big{font-size:22px; font-weight:950; letter-spacing:-.4px; margin-top:4px}

label{
  display:block;
  margin-top:12px;
  font-weight:900;
  font-size:12px;
  color: rgba(11,18,32,.72);
  letter-spacing:.02em;
}
input, select, textarea{
  width:100%;
  margin-top:8px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(11,18,32,.12);
  background: rgba(255,255,255,.80);
  color: rgba(11,18,32,.92);
  font-weight:700;
  outline:none;
  box-shadow:0 10px 26px rgba(11,18,32,.06);
}
textarea{min-height:120px; resize:vertical}
input:focus, select:focus, textarea:focus{
  box-shadow:0 0 0 4px rgba(47,107,255,.16), 0 10px 26px rgba(11,18,32,.08);
  border-color: rgba(47,107,255,.25);
}

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

/* ================================
   TOOLBARS + PAGINATION
   ================================ */

.toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.toolbar__left{display:flex; align-items:center; gap:12px; flex-wrap:wrap}
.toolbar__right{display:flex; align-items:center; gap:10px; flex-wrap:wrap}

.search{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.search input[type="text"]{
  margin-top:0;
  max-width:380px;
}
.search select{
  margin-top:0;
  width:auto;
}

.filters{
  display:flex;
  align-items:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.filters input,
.filters select{
  margin-top:0;
  width:auto;
}
.filters input[type="text"]{max-width:380px}
.filters input[type="date"]{min-width:160px}

.bulkbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid var(--line2);
  background: rgba(255,255,255,.55);
}
.bulkbar__left, .bulkbar__right{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.bulkbar select{width:auto}

.sort-link{color:inherit; text-decoration:none; display:inline-flex; align-items:center; gap:6px}
.sort-link:hover{text-decoration:none}
.sort-ind{font-size:11px; opacity:.6}

.table .check{width:16px; height:16px}

.pager{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top:14px;
}
.pager__links{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.pager__info{font-size:12px; font-weight:900; color: rgba(11,18,32,.62)}

.pager__btn, .pager__num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line2);
  background: rgba(255,255,255,.75);
  color: var(--text);
  font-weight:950;
  font-size:13px;
  text-decoration:none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.pager__btn:hover, .pager__num:hover{transform: translateY(-1px); box-shadow: var(--shadow2)}
.pager__num.is-active{
  background: linear-gradient(135deg, rgba(47,107,255,.16), rgba(0,194,255,.12));
  border-color: rgba(47,107,255,.26);
  box-shadow:0 0 0 4px rgba(47,107,255,.08);
}
.pager__btn.is-disabled{
  opacity:.45;
  pointer-events:none;
  transform:none;
  box-shadow:none;
}
.pager__dots{color: rgba(11,18,32,.48); font-weight:950; padding:0 4px}

/* =========================
   Step 6 — Premium view pages
   - page layout (main + aside)
   - timeline
   - action drawer (mobile)
   ========================= */

.page{
  display:grid;
  grid-template-columns: minmax(0,1fr) 340px;
  gap:14px;
  align-items:start;
}
.page__main{min-width:0}
.page__aside{min-width:0}

.stack > * + *{margin-top:14px}

.sticky{
  position:sticky;
  top:110px; /* below header */
}

@media (max-width:980px){
  .page{grid-template-columns:1fr}
  .sticky{position:static; top:auto}
}

/* Utilities */
.only-mobile{display:none}
.only-desktop{display:inline-flex}
@media (max-width:980px){
  .only-mobile{display:inline-flex}
  .only-desktop{display:none}
}

/* Timeline */
.timeline{list-style:none; padding:0; margin:0}
.timeline li{
  position:relative;
  padding:10px 0 10px 24px;
  border-top:1px solid var(--line);
}
.timeline li:first-child{border-top:0}
.timeline li:before{
  content:"";
  position:absolute;
  left:6px;
  top:16px;
  width:10px;
  height:10px;
  border-radius:50%;
  background: linear-gradient(135deg, rgba(47,107,255,.95), rgba(0,194,255,.85));
  box-shadow: 0 0 0 6px rgba(47,107,255,.08);
}
.timeline__title{font-weight:950; font-size:13px; margin:0}
.timeline__meta{font-size:12px; color: var(--muted); margin-top:2px}

/* Drawer (mobile actions) */
.drawer{display:none}
.drawer.is-open{display:block}
.drawer__overlay{
  position:fixed;
  inset:0;
  background: rgba(11,18,32,.44);
  backdrop-filter: blur(4px);
  z-index: 1600;
}
.drawer__panel{
  position:fixed;
  left:50%;
  transform: translateX(-50%);
  bottom: 14px;
  width: min(720px, calc(100% - 28px));
  max-height: calc(100% - 120px);
  overflow:auto;
  border-radius: 22px;
  border: 1px solid var(--line2);
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  z-index: 1700;
  padding: 14px;
}
.drawer__head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px}
.drawer__title{font-weight:950; margin:0}

/* Print */
.print-page{
  background: #fff;
  border: 1px solid var(--line2);
  border-radius: 18px;
  padding: 18px;
}
.print-head{display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap}
.print-h1{margin:0; font-size:20px; font-weight:950}
.print-meta{color:var(--muted); font-size:12px; margin-top:4px}

@media print{
  .header, .mobile, .burger, .nav, .topbar, .no-print{display:none!important}
  body{background:#fff!important}
  .container{max-width:none!important; padding:0!important}
  .main{padding:0!important}
  .card{box-shadow:none!important; border:0!important; background:#fff!important}
  a{text-decoration:none}
}
