:root {
  --blue-900:#071f3f;
  --blue-800:#102b57;
  --blue-700:#173f73;
  --red-600:#ec2338;
  --gray-950:#111827;
  --gray-700:#374151;
  --gray-500:#667085;
  --gray-300:#d0d5dd;
  --gray-200:#eaecf0;
  --gray-100:#f2f4f7;
  --gray-50:#f9fafb;
  --white:#fff;
  --radius:16px;
  --shadow:0 14px 40px rgba(16,24,40,.12);
}
* { box-sizing:border-box; }
body { margin:0; font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; background:var(--gray-50); color:var(--gray-950); }
button, input, select, textarea { font:inherit; }
button { cursor:pointer; }
.app-loading { min-height:100vh; display:grid; place-items:center; background:linear-gradient(135deg,var(--blue-900),var(--blue-700)); }
.loading-card { background:#fff; border-radius:22px; padding:32px; width:min(420px,calc(100% - 32px)); box-shadow:var(--shadow); }
.login-page { min-height:100vh; display:grid; grid-template-columns:minmax(420px,520px) 1fr; background:var(--blue-900); }
.login-left { background:linear-gradient(135deg,#fff,#f8fafc); display:flex; align-items:center; justify-content:center; padding:56px; }
.login-card { width:100%; max-width:410px; }
.login-logo { width:285px; max-width:100%; margin:0 0 34px; }
.system-title { margin:0; color:var(--blue-900); font-size:34px; line-height:1.05; letter-spacing:-.04em; }
.system-subtitle { margin:10px 0 0; color:var(--gray-500); font-size:18px; }
.accent-line { width:48px; height:4px; background:var(--red-600); border-radius:999px; margin:28px 0; }
.login-right { display:flex; flex-direction:column; justify-content:center; padding:74px; color:#fff; position:relative; overflow:hidden; background:linear-gradient(135deg,#171955,#071f3f); }
.login-kicker { font-size:12px; letter-spacing:.16em; text-transform:uppercase; color:rgba(255,255,255,.68); font-weight:800; margin-bottom:18px; }
.login-headline { margin:0; max-width:760px; font-size:46px; line-height:1.04; letter-spacing:-.04em; }
.login-copy { max-width:700px; margin:22px 0 0; color:rgba(255,255,255,.78); font-size:17px; line-height:1.55; }
.login-points { display:grid; gap:14px; margin-top:54px; max-width:720px; }
.login-point { display:grid; grid-template-columns:34px 1fr; gap:14px; align-items:center; color:rgba(255,255,255,.88); }
.login-point-icon { width:34px; height:34px; border-radius:10px; background:rgba(255,255,255,.10); position:relative; }
.login-point-icon:before { content:""; width:9px; height:9px; border-radius:999px; background:var(--red-600); position:absolute; left:11px; top:12px; box-shadow:10px 0 0 rgba(255,255,255,.38); }
.shell { min-height:100vh; display:grid; grid-template-columns:280px 1fr; }
.sidebar { background:var(--blue-900); color:#fff; padding:24px 18px; position:sticky; top:0; height:100vh; overflow:auto; }
.brand { display:flex; gap:12px; align-items:center; padding:8px 8px 24px; border-bottom:1px solid rgba(255,255,255,.12); margin-bottom:18px; }
.brand-mark { width:44px; height:44px; border-radius:14px; background:#fff; color:var(--blue-900); display:grid; place-items:center; font-weight:900; }
.brand-title { font-weight:900; line-height:1.1; }
.brand-sub { color:rgba(255,255,255,.64); font-size:12px; margin-top:3px; }
.nav { display:grid; gap:8px; }
.nav button { background:transparent; border:0; color:rgba(255,255,255,.78); padding:12px 12px; border-radius:12px; text-align:left; font-weight:800; }
.nav button.active, .nav button:hover { background:rgba(255,255,255,.10); color:#fff; }
.sidebar-footer { margin-top:28px; padding:14px 10px; border-top:1px solid rgba(255,255,255,.12); color:rgba(255,255,255,.72); font-size:12px; }
.main { min-width:0; padding:26px; }
.topbar { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:18px; }
.page-title { margin:0; color:var(--blue-900); font-size:30px; letter-spacing:-.035em; }
.page-subtitle { color:var(--gray-500); margin:6px 0 0; }
.user-chip { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--gray-200); border-radius:999px; padding:8px 10px; box-shadow:0 3px 14px rgba(16,24,40,.06); }
.avatar { width:32px; height:32px; border-radius:999px; background:var(--red-600); color:#fff; display:grid; place-items:center; font-weight:900; }
.cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.stat { background:#fff; border:1px solid var(--gray-200); border-radius:var(--radius); padding:18px; box-shadow:0 6px 18px rgba(16,24,40,.04); }
.stat b { display:block; font-size:28px; color:var(--blue-900); line-height:1; }
.stat span { color:var(--gray-500); font-weight:700; font-size:13px; }
.card { background:#fff; border:1px solid var(--gray-200); border-radius:var(--radius); box-shadow:0 6px 22px rgba(16,24,40,.05); overflow:hidden; margin-bottom:18px; }
.card-head { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:16px 18px; border-bottom:1px solid var(--gray-200); }
.card-head h2 { margin:0; color:var(--blue-900); font-size:18px; }
.card-body { padding:18px; }
.grid { display:grid; grid-template-columns:repeat(12,1fr); gap:14px; }
.col-12 { grid-column:span 12; }
.col-8 { grid-column:span 8; }
.col-6 { grid-column:span 6; }
.col-4 { grid-column:span 4; }
.col-3 { grid-column:span 3; }
.field label { display:block; font-size:12px; font-weight:900; color:var(--gray-700); margin-bottom:6px; text-transform:uppercase; letter-spacing:.04em; }
.field input, .field select, .field textarea { width:100%; border:1px solid var(--gray-300); border-radius:11px; padding:11px 12px; background:#fff; color:var(--gray-950); min-height:44px; }
.field textarea { min-height:112px; resize:vertical; }
.check-list { display:grid; gap:8px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.check-item { display:flex; gap:8px; align-items:center; border:1px solid var(--gray-200); border-radius:11px; padding:10px; background:var(--gray-50); font-size:13px; font-weight:700; }
.actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.btn { border:0; border-radius:11px; padding:10px 14px; font-weight:900; display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:42px; }
.btn-primary { background:var(--blue-900); color:#fff; }
.btn-secondary { background:var(--gray-100); color:var(--gray-950); }
.btn-danger { background:#fee4e2; color:#b42318; }
.btn-red { background:var(--red-600); color:#fff; }
.btn-link { background:transparent; color:var(--blue-700); padding:0; min-height:auto; }
.btn-full { width:100%; }
.alert { border-radius:12px; padding:12px 14px; margin:10px 0; font-weight:800; }
.alert-error { background:#fee4e2; color:#b42318; }
.alert-ok { background:#dcfae6; color:#067647; }
.alert-info { background:#eff8ff; color:#175cd3; }
.table-wrap { overflow:auto; border:1px solid var(--gray-200); border-radius:14px; }
table { width:100%; border-collapse:collapse; min-width:780px; }
th, td { padding:11px 12px; border-bottom:1px solid var(--gray-200); text-align:left; vertical-align:top; font-size:13px; }
th { background:var(--gray-50); color:var(--gray-700); font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
.badge { display:inline-flex; border-radius:999px; padding:4px 9px; font-size:11px; font-weight:900; background:var(--gray-100); color:var(--gray-700); }
.badge.confirmado { background:#dcfae6; color:#067647; }
.badge.pendente { background:#fef0c7; color:#b54708; }
.badge.cancelado, .badge.rejeitado { background:#fee4e2; color:#b42318; }
.tabs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.tabs button { border:1px solid var(--gray-200); background:#fff; padding:10px 12px; border-radius:999px; font-weight:900; color:var(--gray-700); }
.tabs button.active { background:var(--blue-900); color:#fff; }
.calendar { border:1px solid var(--gray-200); border-radius:var(--radius); overflow:hidden; background:#fff; }
.calendar-head { display:grid; grid-template-columns:repeat(7,1fr); background:var(--blue-900); color:#fff; }
.calendar-head div { padding:10px; text-align:center; font-weight:900; font-size:12px; }
.calendar-grid { display:grid; grid-template-columns:repeat(7,1fr); }
.day { min-height:132px; border-right:1px solid var(--gray-200); border-bottom:1px solid var(--gray-200); padding:8px; background:#fff; }
.day:nth-child(7n) { border-right:0; }
.day.muted { background:#fafafa; color:#98a2b3; }
.day-number { font-weight:900; font-size:12px; margin-bottom:6px; }
.event { width:100%; text-align:left; border:0; border-left:3px solid var(--red-600); background:#f8fafc; border-radius:8px; padding:7px; margin:5px 0; font-size:11px; }
.event:hover { background:#eef4ff; }
.event strong { display:block; color:var(--blue-700); font-size:11px; }
.event small { display:block; color:var(--gray-500); margin-top:2px; }
.modal-backdrop { position:fixed; inset:0; background:rgba(15,23,42,.54); display:none; align-items:center; justify-content:center; padding:20px; z-index:999; }
.modal-backdrop.active { display:flex; }
.modal { width:min(840px,100%); max-height:92vh; overflow:auto; background:#fff; border-radius:22px; box-shadow:0 30px 90px rgba(0,0,0,.32); }
.modal-cover { height:76px; background:linear-gradient(135deg,var(--blue-900),var(--blue-700)); border-bottom:5px solid var(--red-600); }
.modal-body { padding:22px; }
.modal-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.modal-title { margin:0; font-size:24px; color:var(--blue-900); }
.close { border:0; width:34px; height:34px; border-radius:999px; background:var(--gray-100); color:var(--gray-700); font-size:22px; line-height:1; }
.detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:16px; }
.detail-box { border:1px solid var(--gray-200); border-radius:14px; padding:12px; background:#fbfcff; }
.detail-box.full { grid-column:span 2; }
.detail-label { display:block; font-size:11px; color:var(--gray-500); text-transform:uppercase; font-weight:900; letter-spacing:.05em; margin-bottom:5px; }
.detail-value { font-weight:700; color:var(--gray-950); white-space:pre-wrap; }
.hidden { display:none !important; }
.muted { color:var(--gray-500); }
@media(max-width:1080px){
  .shell{grid-template-columns:1fr}
  .sidebar{height:auto;position:relative}
  .cards{grid-template-columns:repeat(2,1fr)}
  .login-page{grid-template-columns:1fr}
  .login-right{display:none}
}
@media(max-width:760px){
  .main{padding:18px}
  .grid{grid-template-columns:1fr}
  .col-12,.col-8,.col-6,.col-4,.col-3{grid-column:auto}
  .cards{grid-template-columns:1fr}
  .check-list{grid-template-columns:1fr}
  .calendar-head{display:none}
  .calendar-grid{grid-template-columns:1fr;gap:10px}
  .day{border:1px solid var(--gray-200);border-radius:14px}
  .day.muted{display:none}
  .detail-grid{grid-template-columns:1fr}
  .detail-box.full{grid-column:auto}
}
