/* Movivita — identidade visual sobre Tabler */
:root, [data-bs-theme=light] {
  --mv-purple: #6047E1; --mv-purple-dark: #4b35c4; --mv-teal: #0AA894; --mv-ink: #1C1F30; --mv-bg: #FAFAFA;
  --tblr-primary: #6047E1; --tblr-primary-rgb: 96,71,225; --tblr-primary-fg: #fff;
  --tblr-link-color: #6047E1; --tblr-link-hover-color: #4b35c4;
  --tblr-body-bg: #FAFAFA; --tblr-body-color: #212121;
  --tblr-font-sans-serif: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tblr-border-radius: 10px; --tblr-border-radius-lg: 14px; --tblr-card-border-color: #ECEAF7;
  --tblr-teal: #0AA894; --tblr-purple: #6047E1;
}
body { font-family: var(--tblr-font-sans-serif); letter-spacing: .005em; -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4,.page-title,.card-title,.h1,.h2,.h3,.navbar-brand { font-family: "Quicksand", var(--tblr-font-sans-serif); font-weight: 700; }
.page-title { font-size: 1.35rem; color: var(--mv-ink); }
.card { box-shadow: 0 1px 2px rgba(28,31,48,.04), 0 6px 20px -12px rgba(96,71,225,.15); border: 1px solid #ECEAF7; }
.card-header { background: transparent; border-bottom-color: #F0EEF9; }
.card-title { font-size: .95rem; }
.btn { border-radius: 9px; font-weight: 500; }
.btn-primary { background: var(--mv-purple); border-color: var(--mv-purple); }
.btn-primary:hover, .btn-primary:focus { background: var(--mv-purple-dark); border-color: var(--mv-purple-dark); }
.btn-teal { background: var(--mv-teal); border-color: var(--mv-teal); color: #fff; }
.btn-teal:hover { background: #08917f; color: #fff; }
.form-control, .form-select { border-radius: 9px; border-color: #E2DFF3; }
.form-control:focus, .form-select:focus { border-color: var(--mv-purple); box-shadow: 0 0 0 .2rem rgba(96,71,225,.12); }
.form-label { font-weight: 500; color: #3a3d52; }
.form-label.required:after { content: " *"; color: #d63939; }
.table thead th { font-family: Quicksand, sans-serif; font-weight: 700; text-transform: none; letter-spacing: 0; font-size: .78rem; color: #6b6f86; background: #FBFAFE; }
.table tbody tr:hover { background: #F8F6FF; }
.table td { vertical-align: middle; }
.badge { font-weight: 600; border-radius: 6px; padding: .35em .6em; letter-spacing: 0; text-transform: none; }
.bg-teal-lt { background: rgba(10,168,148,.12) !important; color: #087f70 !important; }
.bg-purple-lt { background: rgba(96,71,225,.12) !important; color: #4b35c4 !important; }
.bg-orange-lt { background: rgba(247,103,7,.12) !important; color: #b34d00 !important; }
.bg-indigo-lt { background: rgba(66,99,235,.12) !important; color: #2f4bc4 !important; }

/* Sidebar */
.navbar-vertical.navbar-expand-lg { background: linear-gradient(180deg, #1C1F30 0%, #23264a 60%, #2a2c5a 100%) !important; border-right: 0; }
.navbar-vertical .navbar-brand { padding: 1.1rem 1rem .6rem; margin: 0; }
.brand-mark { height: 34px; width: auto; filter: brightness(0) invert(1); }
.brand-text { font-family: Quicksand, sans-serif; font-weight: 700; font-size: 1.15rem; line-height: 1; display: flex; flex-direction: column; color: #fff; }
.brand-text small { font-size: .62rem; font-weight: 500; opacity: .6; letter-spacing: .04em; margin-top: 3px; }
.navbar-vertical .nav-link { border-radius: 9px; margin: 1px 10px; padding: .5rem .8rem; color: rgba(255,255,255,.72) !important; font-weight: 500; font-size: .86rem; }
.navbar-vertical .nav-link:hover { background: rgba(255,255,255,.07); color: #fff !important; }
.navbar-vertical .nav-item.active .nav-link { background: var(--mv-purple); color: #fff !important; box-shadow: 0 6px 16px -6px rgba(96,71,225,.7); }
.navbar-vertical .nav-link-icon { color: inherit; opacity: .9; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.08); color: #fff; }
.sidebar-footer .text-secondary { color: rgba(255,255,255,.55) !important; }
@media (min-width: 992px) { .navbar-vertical.navbar-expand-lg ~ .page-wrapper { margin-left: 15.5rem; } .navbar-vertical.navbar-expand-lg { width: 15.5rem; } }

/* Topbar */
.topbar { background: #fff; border-bottom: 1px solid #ECEAF7; min-height: 3.6rem; }
.topbar-search { position: relative; flex: 1; max-width: 520px; }
.topbar-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9a9db3; }
.topbar-search input { padding-left: 36px; background: #F6F5FB; border-color: transparent; }

/* KPI */
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 1rem 1.1rem; }
.kpi .kpi-label { font-size: .74rem; color: #6b6f86; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.kpi .kpi-value { font-family: Quicksand, sans-serif; font-weight: 700; font-size: 1.55rem; color: var(--mv-ink); line-height: 1.15; white-space: nowrap; }
.kpi .kpi-value.money, .kpi-money .kpi-value { font-size: 1.2rem; }
.kpi .kpi-sub { font-size: .76rem; color: #8a8ea3; }
.kpi.kpi-danger .kpi-value { color: #d63939; } .kpi.kpi-warn .kpi-value { color: #b34d00; } .kpi.kpi-ok .kpi-value { color: #087f70; } .kpi.kpi-primary .kpi-value { color: var(--mv-purple); }
.kpi-icon { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; background: rgba(96,71,225,.1); color: var(--mv-purple); }

/* Tabs */
.nav-tabs .nav-link { font-weight: 500; color: #6b6f86; border: 0; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--mv-purple); border-bottom-color: var(--mv-purple); background: transparent; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { font-size: .72rem; font-weight: 700; color: #6b6f86; text-align: center; text-transform: uppercase; padding: 4px 0; }
.cal-day { background: #fff; border: 1px solid #ECEAF7; border-radius: 10px; min-height: 108px; padding: 6px; font-size: .74rem; }
.cal-day.muted { background: #F6F5FB; opacity: .6; } .cal-day.today { border-color: var(--mv-purple); box-shadow: inset 0 0 0 1px var(--mv-purple); }
.cal-day.holiday { background: #FFF7ED; } .cal-day.weekend { background: #FBFAFE; }
.cal-num { font-weight: 700; color: #3a3d52; display: flex; justify-content: space-between; margin-bottom: 4px; }
.cal-ev { display: block; border-radius: 6px; padding: 2px 6px; margin-bottom: 3px; color: #fff; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--mv-purple); }
.cal-ev.st-pre_agendado, .cal-ev.st-aguardando_familia, .cal-ev.st-aguardando_cuidador { background: #f59f00; } .cal-ev.st-sem_cobertura, .cal-ev.st-cancelado_familia, .cal-ev.st-cancelado_movivita { background: #d63939; }
.cal-ev.st-em_andamento { background: var(--mv-teal); } .cal-ev.st-concluido, .cal-ev.st-faturado, .cal-ev.st-pago_familia, .cal-ev.st-pago_cuidador { background: #2fb344; } .cal-ev.st-substituido, .cal-ev.st-suspenso { background: #9a9db3; }
@media (max-width: 767px) { .cal { grid-template-columns: repeat(1, 1fr); } .cal-head { display: none; } .cal-day.muted { display: none; } .cal-day { min-height: auto; } }

/* Calc box */
.calc-box { background: linear-gradient(135deg, #F6F4FF, #EEFBF8); border: 1px solid #E2DFF3; border-radius: 14px; padding: 1rem 1.2rem; }
.calc-big { font-family: Quicksand, sans-serif; font-weight: 700; font-size: 1.5rem; }
.calc-step { display: flex; justify-content: space-between; font-size: .8rem; padding: 3px 0; border-bottom: 1px dashed #E2DFF3; }

/* Alerts list */
.alert-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid #F0EEF9; }
.sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; }
.sev-critica { background: #d63939; box-shadow: 0 0 0 4px rgba(214,57,57,.15); } .sev-alta { background: #f76707; } .sev-media { background: #f59f00; } .sev-baixa { background: #9a9db3; }

/* Auth */
.auth-body { background: var(--mv-bg); margin: 0; }
.auth-wrap { min-height: 100vh; display: flex; }
.auth-side { flex: 1.1; background: linear-gradient(160deg, #6047E1 0%, #4b35c4 55%, #1C1F30 140%); color: #fff; padding: 64px; align-items: center; position: relative; overflow: hidden; }
.auth-side:before { content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%; background: rgba(10,168,148,.35); right: -180px; bottom: -220px; filter: blur(10px); }
.auth-side > div { position: relative; max-width: 520px; }
.auth-logo { height: 64px; filter: brightness(0) invert(1); margin-bottom: 28px; }
.auth-tagline { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; opacity: .75; margin-bottom: 8px; }
.auth-title { font-family: Quicksand, sans-serif; font-weight: 700; font-size: 2.4rem; line-height: 1.15; margin-bottom: 16px; }
.auth-sub { opacity: .85; font-size: .95rem; line-height: 1.6; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 18px; padding: 40px 36px; box-shadow: 0 20px 60px -30px rgba(96,71,225,.35); }

/* Portal (cuidador / família) */
.portal-body { background: var(--mv-bg); }
.portal-header { background: linear-gradient(90deg, #1C1F30, #2a2c5a); padding: 12px 0; position: sticky; top: 0; z-index: 10; }
.portal-header .brand-text { font-size: 1.1rem; }
.shift-card { border-left: 4px solid var(--mv-purple); }
.shift-card.today { border-left-color: var(--mv-teal); background: #F3FBF9; }
.big-btn { padding: 16px; font-size: 1.05rem; border-radius: 14px; }
.scope-box { background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 12px; padding: 12px 14px; font-size: .85rem; }
.scope-box.ok { background: #F0FDF9; border-color: #A7F3D0; }
.stars label { cursor: pointer; font-size: 1.4rem; color: #d9d7e8; } .stars input { display: none; } .stars input:checked ~ label { color: #f59f00; }

.text-purple { color: var(--mv-purple) !important; } .text-teal { color: var(--mv-teal) !important; }
.min-w-0 { min-width: 0; }
.avatar { font-family: Quicksand, sans-serif; font-weight: 700; }
.dropdown-menu { border-radius: 12px; border-color: #ECEAF7; box-shadow: 0 10px 30px -10px rgba(28,31,48,.2); }
.page-header .btn-list { gap: 6px; }
@media (max-width: 575px) { .card-body { padding: 1rem; } .kpi .kpi-value { font-size: 1.3rem; } .page-title { font-size: 1.15rem; } }
@media print { .navbar, .topbar, .footer, .btn, .alert { display: none !important; } .page-wrapper { margin: 0 !important; } .card { box-shadow: none; border: 1px solid #ddd; } }

.input-group input[type=number] { min-width: 72px; }
.shift-card .badge { white-space: normal; text-align: center; line-height: 1.25; max-width: 130px; }
.shift-card .text-end { flex: 0 0 auto; max-width: 38%; }
@media (max-width: 575px) { .kpi-money .kpi-value { font-size: 1rem; } .portal-body .kpi { padding: .75rem .7rem; } .shift-card .badge { font-size: .68rem; } }

/* ---- Mobile header (hambúrguer universal) ---- */
@media (max-width: 991.98px) {
  .navbar-vertical.navbar-expand-lg { width: 100%; position: sticky; top: 0; z-index: 1030; padding: 0; box-shadow: 0 4px 16px -8px rgba(28,31,48,.5); }
  .navbar-vertical.navbar-expand-lg > .container-fluid { display: flex; align-items: center; flex-wrap: wrap; min-height: 56px; padding: 0 .75rem; }
  .navbar-vertical .navbar-toggler { order: 0; border: 0; padding: .4rem .5rem; margin-right: .25rem; color: #fff; box-shadow: none !important; }
  .navbar-vertical .navbar-toggler-icon { width: 1.4em; height: 1.4em; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,.9)' stroke-linecap='round' stroke-width='2.4' d='M4 8h22M4 15h22M4 22h22'/%3e%3c/svg%3e"); }
  .navbar-vertical .navbar-brand { order: 1; flex: 1; padding: .55rem 0; }
  .brand-mark { height: 28px; } .brand-text { font-size: 1.02rem; } .brand-text small { display: none; }
  .navbar-vertical .navbar-nav.flex-row { order: 2; align-items: center; gap: .25rem; }
  .navbar-vertical .navbar-nav.flex-row .nav-link { color: #fff !important; padding: .3rem .4rem; margin: 0; }
  .navbar-vertical .navbar-collapse { order: 3; flex-basis: 100%; border-top: 1px solid rgba(255,255,255,.08); max-height: calc(100vh - 56px); overflow-y: auto; }
  .navbar-vertical .navbar-collapse .navbar-nav { padding: .5rem 0 .75rem; }
  .navbar-vertical .nav-link { padding: .65rem .9rem; font-size: .95rem; }
  .navbar-vertical .sidebar-footer { display: block !important; }
  .page-wrapper { margin-left: 0 !important; }
  .page-body { margin-top: 1rem; }
  .page-header .btn-list { width: 100%; margin-top: .25rem; }
  .page-header .btn-list .btn { flex: 1 1 auto; justify-content: center; }
  .page-header .col-auto { width: 100%; }
  .page-pretitle { font-size: .68rem; }
  .card-header .nav-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .card-header .nav-tabs .nav-link { white-space: nowrap; }
  .kpi { padding: .8rem .85rem; } .kpi .kpi-label { font-size: .66rem; } .kpi .kpi-value { font-size: 1.3rem; }
  .calc-box.sticky-top { position: static; }
  .modal-dialog { margin: .5rem; }
}
/* ---- Polimento geral do admin ---- */
.page-body { padding-top: 1.25rem; }
.page-header { margin-bottom: 1.25rem; }
.card { border-radius: 14px; }
.card-header { padding: .8rem 1.1rem; }
.table thead th { padding-top: .6rem; padding-bottom: .6rem; }
.table td, .table th { padding: .65rem .8rem; }
.table-responsive { scrollbar-width: thin; }
.kpi { position: relative; overflow: hidden; }
.kpi:before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #E2DFF3; border-radius: 4px 0 0 4px; }
.kpi.kpi-primary:before { background: var(--mv-purple); } .kpi.kpi-ok:before { background: var(--mv-teal); } .kpi.kpi-warn:before { background: #f59f00; } .kpi.kpi-danger:before { background: #d63939; }
.kpi .kpi-sub { margin-top: 2px; }
.btn-primary { box-shadow: 0 6px 16px -8px rgba(96,71,225,.8); }
.btn-ghost-secondary { color: #4a4e66; }
.list-group-item { border-color: #F0EEF9; }
.empty-title { font-family: Quicksand, sans-serif; }
.dropdown-item { border-radius: 8px; margin: 0 4px; width: auto; }
.form-control-sm, .form-select-sm { border-radius: 8px; }
.alert { border-radius: 12px; border: 0; }
.alert-danger { background: #FDECEC; color: #a12626; } .alert-warning { background: #FFF4DC; color: #7a4d00; } .alert-success { background: #E6F7F3; color: #0b6b5e; } .alert-info { background: #EEF0FF; color: #3a30a0; }
.avatar { border-radius: 10px; }
.navbar-vertical .navbar-toggler, .navbar-vertical .navbar-toggler:focus { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.navbar-vertical .navbar-toggler-icon { display: block; }
.badge-notification { top: 2px !important; right: 0 !important; transform: none; font-size: .6rem; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; }
.navbar-vertical .navbar-nav.flex-row .nav-link.position-relative { padding-right: .6rem; }
.table-responsive .table { min-width: 640px; }
.card > .table-responsive:first-child .table { min-width: 0; }
.navbar-vertical .navbar-toggler i { font-size: 1.7rem; color: #fff; line-height: 1; display: block; }
.navbar-vertical .navbar-toggler-icon { display: none; }
.topbar .nav-link.position-relative { padding-top: .55rem; padding-bottom: .55rem; }
.topbar .badge-notification { top: 4px !important; right: -2px !important; }
