:root {
    --brand: #f2c428;
    --brand-dark: #d5a900;
    --ink: #171717;
    --muted: #737373;
    --line: #e8e8e8;
    --surface: #ffffff;
    --surface-soft: #f8f8f6;
    --bg: #f4f4f2;
    --dark: #101010;
    --dark-soft: #191919;
    --danger: #b42318;
    --sidebar-width: 260px;
    --topbar-height: 76px;
    --radius: 16px;
    --shadow: 0 14px 38px rgba(16, 16, 16, .08);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }

/* =========================================================
   LOGIN
   ========================================================= */
.login-page { min-height: 100vh; background: linear-gradient(120deg, #0b0b0b 0 48%, #f5f5f3 48% 100%); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 8vw; padding: 7vw; }
.login-brand { color: #fff; max-width: 560px; }
.login-brand .eyebrow { color: var(--brand); }
.login-brand h1 { font-size: clamp(42px, 6vw, 78px); line-height: .95; margin: 12px 0 24px; }
.login-brand p { max-width: 520px; color: #cfcfcf; font-size: 18px; line-height: 1.6; }
.eyebrow, .page-kicker { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #9a7b00; }
.login-card { width: min(440px, 100%); justify-self: end; background: var(--surface); padding: 36px; border-radius: 22px; box-shadow: 0 25px 80px rgba(0,0,0,.12); }
.login-card__header { margin-bottom: 28px; }
.login-card__header h2 { font-size: 28px; margin: 8px 0; }
.login-card__header p { margin: 0; color: var(--muted); line-height: 1.5; }
.login-card label { display: block; font-size: 14px; font-weight: 700; margin: 16px 0 7px; }
.login-card input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #d8d8d8; border-radius: 10px; background: #fff; outline: none; }
.login-card input:focus { border-color: #b89512; box-shadow: 0 0 0 3px rgba(242,196,40,.18); }
.login-card button { width: 100%; height: 50px; margin-top: 24px; border: 0; border-radius: 10px; background: var(--brand); color: #171717; font-weight: 800; cursor: pointer; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.4; }
.alert-error { background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; }

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar {
    position: fixed;
    z-index: 1000;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background: var(--dark);
    color: #fff;
    border-right: 1px solid rgba(255,255,255,.06);
    transition: transform .24s ease;
}
.sidebar-header {
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo { width: 36px; height: 36px; object-fit: contain; }
.sidebar-brand { display: flex; align-items: baseline; gap: 6px; }
.sidebar-brand strong { font-size: 16px; letter-spacing: .08em; }
.sidebar-brand span { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.sidebar-menu { flex: 1; overflow-y: auto; padding: 14px 10px 20px; scrollbar-width: thin; scrollbar-color: #363636 transparent; }
.menu-section { margin-bottom: 5px; }
.nav-link, .menu-toggle, .logout {
    width: 100%;
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #d5d5d5;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: .18s ease;
}
.nav-link:hover, .menu-toggle:hover, .logout:hover { background: #202020; color: #fff; }
.nav-link.active { background: rgba(242,196,40,.12); color: var(--brand); font-weight: 700; }
.nav-link i, .menu-toggle i:first-child, .logout i { width: 19px; font-size: 17px; text-align: center; flex: 0 0 19px; }
.menu-toggle { justify-content: space-between; margin-top: 4px; }
.menu-toggle > span { min-width: 0; display: flex; align-items: center; gap: 12px; }
.menu-chevron { width: auto !important; font-size: 11px !important; transition: transform .2s ease; }
.menu-group.open > .menu-toggle .menu-chevron { transform: rotate(180deg); }
.submenu { display: none; padding: 4px 0 5px 14px; }
.menu-group.open > .submenu { display: block; }
.submenu .nav-link { min-height: 38px; padding-top: 7px; padding-bottom: 7px; font-size: 12.8px; }
.submenu .nav-link i { font-size: 14px; }
.submenu-divider { height: 1px; margin: 6px 12px; background: rgba(255,255,255,.08); }
.sidebar-footer { flex: 0 0 auto; padding: 10px; border-top: 1px solid rgba(255,255,255,.08); background: #0d0d0d; }
.sidebar-footer .menu-toggle { margin-top: 0; }
.sidebar-footer .submenu { max-height: 240px; overflow-y: auto; }
.logout { margin-top: 4px; color: #f0b6b6; }

/* =========================================================
   MAIN / TOPBAR
   ========================================================= */
.main-shell { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 26px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    font-size: 22px;
    cursor: pointer;
}
.hub-brand { font-size: 14px; font-weight: 800; letter-spacing: .08em; }
.hub-brand span { color: #a58100; }
.hub-greeting { margin-top: 3px; font-size: 12px; color: var(--muted); }
.topbar-action {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: #4c4c4c;
    text-decoration: none;
    transition: .18s ease;
}
.topbar-action:hover { color: #111; border-color: #d5d5d5; transform: translateY(-1px); }
.topbar-user { display: flex; align-items: center; gap: 11px; margin-left: 5px; padding-left: 14px; border-left: 1px solid var(--line); }
.topbar-user-text { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.topbar-user-text strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.topbar-user-text small { margin-top: 2px; color: var(--muted); font-size: 11px; text-transform: capitalize; }
.topbar-user img { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; border: 2px solid #efefef; background: #eee; }

/* =========================================================
   CONTENT
   ========================================================= */
.page-content { padding: 28px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 18px; }
.page-heading h1 { margin: 5px 0 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.03em; }
.page {
    background: var(--surface);
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.page h2:first-child, .page h1:first-child { margin-top: 0; }
.module-placeholder { min-height: 260px; display: flex; align-items: center; justify-content: center; gap: 22px; color: var(--muted); }
.module-placeholder h2 { margin: 5px 0 8px; color: var(--ink); }
.module-placeholder p { max-width: 620px; margin: 0; line-height: 1.6; }
.placeholder-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 16px; background: #fff7d7; color: #a58100; font-size: 27px; flex: 0 0 auto; }
.sidebar-backdrop { display: none; }

/* Basic reusable controls */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--brand); color: #181818; font-weight: 800; text-decoration: none; cursor: pointer; }
.btn-primary:hover { background: #e8b900; }

@media (max-width: 980px) {
    :root { --sidebar-width: 260px; }
    .sidebar { transform: translateX(-100%); box-shadow: 20px 0 50px rgba(0,0,0,.18); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 950; background: rgba(0,0,0,.36); }
    body.sidebar-open .sidebar-backdrop { display: block; }
    .main-shell { margin-left: 0; }
    .mobile-toggle { display: grid; }
}

@media (max-width: 680px) {
    .topbar { height: 68px; padding: 0 14px; }
    .hub-brand { display: none; }
    .hub-greeting { margin: 0; max-width: 160px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .topbar-user-text { display: none; }
    .topbar-user { margin-left: 0; padding-left: 0; border-left: 0; }
    .desktop-action { display: none; }
    .page-content { padding: 18px 14px 26px; }
    .page { padding: 18px; border-radius: 14px; }
    .module-placeholder { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 800px) {
    .login-page { background: #f5f5f3; }
    .login-shell { display: block; padding: 28px 20px; }
    .login-brand { color: var(--ink); margin: 28px auto 36px; }
    .login-brand p { color: var(--muted); }
    .login-brand h1 { font-size: 44px; }
    .login-card { justify-self: auto; margin: 0 auto; padding: 28px; }
}


/* =========================================================
   CADASTROS DE USUÁRIOS
   ========================================================= */
.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}
.page-heading h1{margin:3px 0 5px;font-size:28px;letter-spacing:-.04em}
.page-heading p,.card-heading p{margin:0;color:#7b7b83}
.page-eyebrow{font-size:11px;font-weight:700;letter-spacing:.14em;color:#9a7b00}
.btn-primary-app,.btn-secondary-app,.icon-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:10px;text-decoration:none;font-weight:700;border:0;cursor:pointer}
.btn-primary-app{background:#111;color:#fff;padding:11px 16px}
.btn-primary-app:hover{background:#292929;color:#fff}
.btn-secondary-app{background:#f1f1f3;color:#333;padding:11px 16px}
.icon-button{width:38px;height:38px;background:#f4f4f5;color:#333}
.app-alert{display:flex;align-items:center;gap:9px;padding:12px 14px;border-radius:10px;margin-bottom:16px;font-size:14px}
.app-alert.success{background:#edf9f1;color:#1c6b37}
.app-alert.danger{background:#fff0f0;color:#a62c2c}
.user-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:18px}
.summary-card,.app-card{background:#fff;border:1px solid #ececef;border-radius:16px;box-shadow:0 8px 30px rgba(0,0,0,.035)}
.summary-card{padding:18px}
.summary-card span{display:block;color:#85858c;font-size:13px;margin-bottom:6px}
.summary-card strong{font-size:27px}
.app-card{padding:20px;margin-bottom:18px}
.card-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.card-heading h2{font-size:18px;margin:0 0 4px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.field{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:600;color:#4b4b52}
.field small{font-weight:400;color:#929298}
.field input,.field select{width:100%;border:1px solid #dedee3;background:#fff;border-radius:10px;padding:11px 12px;outline:none;font:inherit;font-weight:400}
.field input:focus,.field select:focus{border-color:#999;box-shadow:0 0 0 3px rgba(0,0,0,.05)}
.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
.table-search{position:relative;max-width:280px;width:100%}
.table-search i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#999}
.table-search input{width:100%;border:1px solid #e0e0e4;border-radius:10px;padding:10px 12px 10px 35px;outline:none}
.table-responsive-app{overflow:auto}
.app-table{width:100%;border-collapse:collapse;min-width:650px}
.app-table th{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#8b8b92;text-align:left;padding:11px 12px;border-bottom:1px solid #ececef}
.app-table td{padding:13px 12px;border-bottom:1px solid #f0f0f2;vertical-align:middle}
.user-cell{display:flex;align-items:center;gap:11px}
.user-cell img{width:40px;height:40px;border-radius:50%;object-fit:cover;background:#f0f0f0}
.user-cell strong,.user-cell span{display:block}
.user-cell span{font-size:12px;color:#8b8b92;margin-top:2px}
.status-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;font-size:12px;font-weight:700}
.status-pill i{width:6px;height:6px;border-radius:50%;background:currentColor}
.status-pill.active{background:#edf9f1;color:#287a43}
.status-pill.inactive{background:#f3f3f4;color:#777}
.row-actions{display:flex;gap:6px;justify-content:flex-end}
.row-actions a{width:34px;height:34px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;background:#f3f3f4;color:#333;text-decoration:none}
.row-actions a.danger{color:#a83232;background:#fff0f0}
.row-actions a.success{color:#287a43;background:#edf9f1}
.actions-col{text-align:right!important}
.empty-state{text-align:center;color:#888;padding:28px!important}
@media(max-width:760px){
  .page-heading,.card-heading{align-items:stretch;flex-direction:column}
  .form-grid,.user-summary-grid{grid-template-columns:1fr}
  .table-search{max-width:none}
}


/* =========================================================
   CLIENTES
   ========================================================= */
.client-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.form-section-title{font-size:11px;font-weight:800;letter-spacing:.11em;text-transform:uppercase;color:#8b8b92;border-bottom:1px solid #eeeeef;padding-bottom:9px;margin:5px 0 15px}
.client-form-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:22px}
.field-full{grid-column:1/-1}
.field textarea{width:100%;border:1px solid #dedee3;background:#fff;border-radius:10px;padding:11px 12px;outline:none;font:inherit;font-weight:400;resize:vertical}
.field-action-wrap{display:flex;gap:7px}
.field-action-wrap input{flex:1;min-width:0}
.field-action-btn{width:43px;flex:0 0 43px;border:0;border-radius:10px;background:#111;color:#fff;cursor:pointer}
.field-action-btn:disabled{opacity:.55;cursor:wait}
.field-hint{font-size:11px!important;font-weight:400!important;color:#909097}
.field-hint.warning{color:#a06a00}
.mini-spinner{display:inline-block;width:15px;height:15px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.client-main-cell{display:flex;align-items:center;gap:11px}
.client-main-cell strong,.client-main-cell span{display:block}
.client-main-cell span{font-size:12px;color:#8b8b92;margin-top:2px}
.client-icon{width:38px;height:38px;border-radius:10px;background:#f3f3f4;display:flex;align-items:center;justify-content:center;font-size:18px}
.status-pill.contract{background:#fff8dd;color:#8b6900}
.status-pill.neutral{background:#f3f3f4;color:#777}
.client-detail-grid{display:grid;grid-template-columns:minmax(260px,.75fr) minmax(360px,1.25fr);gap:18px;margin-bottom:24px}
.client-profile-box{border:1px solid #ececef;border-radius:13px;padding:4px 16px}
.detail-line{padding:12px 0;border-bottom:1px solid #f0f0f2}
.detail-line:last-child{border-bottom:0}
.detail-line span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#96969d;margin-bottom:4px}
.detail-line strong{font-size:13px;line-height:1.45}
.note-form{background:#fafafa;border:1px solid #eeeeef;border-radius:13px;padding:16px}
.notes-list{margin-top:8px}
.note-item{position:relative;display:flex;gap:13px;padding:14px 0;border-bottom:1px solid #efeff1}
.note-marker{width:9px;height:9px;border-radius:50%;background:#111;margin-top:6px;flex:0 0 9px}
.note-content{flex:1;min-width:0}
.note-top{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.note-top strong{font-size:14px}
.note-top time{font-size:11px;color:#999;white-space:nowrap}
.note-sector{display:inline-flex;margin-left:7px;padding:3px 7px;background:#f0f0f2;border-radius:999px;font-size:10px;color:#666}
.note-content p{margin:7px 0 5px;font-size:13px;line-height:1.55;color:#45454c}
.note-content small{color:#999}
.client-search-form{display:block}
@media(max-width:900px){
  .client-form-grid{grid-template-columns:1fr 1fr}
  .client-detail-grid{grid-template-columns:1fr}
}
@media(max-width:650px){
  .client-form-grid{grid-template-columns:1fr}
  .field-wide,.field-full{grid-column:auto}
}


/* =========================================================
   CONFIGURAÇÃO DA ORDEM DE SERVIÇO
   ========================================================= */
.os-config-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
.os-config-summary small{font-size:13px;font-weight:600;color:#888}
.os-config-form{grid-template-columns:minmax(0,1.5fr) minmax(180px,.5fr)}
.input-suffix,.input-prefix{display:flex;align-items:stretch;border:1px solid #dedee3;border-radius:10px;overflow:hidden;background:#fff}
.input-suffix:focus-within,.input-prefix:focus-within{border-color:#999;box-shadow:0 0 0 3px rgba(0,0,0,.05)}
.input-suffix input,.input-prefix input{border:0!important;border-radius:0!important;box-shadow:none!important}
.input-suffix span,.input-prefix span{display:flex;align-items:center;padding:0 12px;background:#f5f5f6;color:#777;font-size:12px;font-weight:700;white-space:nowrap}
.config-name-cell{display:flex;align-items:center;gap:10px}
.config-icon{width:34px;height:34px;border-radius:9px;background:#f3f3f4;display:flex;align-items:center;justify-content:center}
.time-pill{display:inline-flex;padding:6px 9px;border-radius:999px;background:#f3f3f4;color:#555;font-size:12px;font-weight:700}
.service-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}
.service-form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.service-filters{display:flex;align-items:center;gap:9px}
.service-filters select{height:41px;border:1px solid #e0e0e4;border-radius:10px;padding:0 11px;background:#fff;color:#555;outline:none}
.service-type{display:inline-flex;padding:6px 9px;border-radius:999px;font-size:11px;font-weight:800}
.service-type.install{background:#edf7ff;color:#216692}
.service-type.maintenance{background:#fff7df;color:#8a6900}
.porte-badge{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:9px;background:#111;color:#fff;font-size:11px;font-weight:800}
@media(max-width:800px){
  .os-config-form,.service-form-grid,.service-summary-grid{grid-template-columns:1fr}
  .service-filters{align-items:stretch;flex-direction:column;width:100%}
  .service-filters select,.service-filters .table-search{width:100%;max-width:none}
}


/* =========================================================
   SETORES
   ========================================================= */
.sectors-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
}
.summary-text{
    font-size:18px!important;
}
.sector-form-grid{
    grid-template-columns:minmax(260px,.7fr) minmax(0,1.3fr);
}
.sector-description{
    max-width:520px;
    white-space:normal;
    line-height:1.45;
    color:#666;
}
.inline-action-form{
    display:inline-flex;
    margin:0;
}
.row-action-button{
    width:34px;
    height:34px;
    border:0;
    border-radius:9px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    background:#f3f3f4;
    color:#333;
}
.row-action-button.danger{
    color:#a83232;
    background:#fff0f0;
}
.row-action-button:hover{
    filter:brightness(.97);
}
@media(max-width:760px){
    .sector-form-grid,
    .sectors-summary-grid{
        grid-template-columns:1fr;
    }
}


/* =========================================================
   DASHBOARD OPERACIONAL
   ========================================================= */
.dashboard-heading{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:20px;
    margin-bottom:18px;
}
.dashboard-heading h1{
    margin:3px 0 5px;
    font-size:29px;
    letter-spacing:-.04em;
}
.dashboard-heading p{
    margin:0;
    color:#7b7b83;
}
.day-toolbar{
    display:flex;
    align-items:center;
    gap:9px;
    background:#fff;
    border:1px solid #ececef;
    border-radius:15px;
    padding:10px;
    margin-bottom:14px;
}
.day-nav-button,
.today-button{
    height:39px;
    border-radius:10px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
}
.day-nav-button{
    width:39px;
    background:#f3f3f4;
    color:#333;
}
.today-button{
    padding:0 13px;
    background:#111;
    color:#fff;
    font-size:12px;
    font-weight:700;
}
.day-picker-form label{
    height:39px;
    display:flex;
    align-items:center;
    gap:8px;
    background:#f7f7f8;
    border-radius:10px;
    padding:0 10px;
}
.day-picker-form input{
    border:0;
    outline:0;
    background:transparent;
    font:inherit;
    color:#333;
}
.day-label{
    flex:1;
    min-width:0;
    display:flex;
    align-items:center;
    gap:9px;
    padding:0 5px;
}
.day-label strong{
    font-size:14px;
}
.day-label span{
    padding:4px 8px;
    border-radius:999px;
    background:#fff4c8;
    color:#785d00;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
}
.dashboard-summary-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin-bottom:14px;
}
.dashboard-stat{
    display:flex;
    align-items:center;
    gap:13px;
    background:#fff;
    border:1px solid #ececef;
    border-radius:15px;
    padding:16px;
}
.dashboard-stat-icon{
    width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    background:#f3f3f4;
    font-size:19px;
}
.dashboard-stat small,
.dashboard-stat strong{
    display:block;
}
.dashboard-stat small{
    color:#85858d;
    font-size:11px;
    margin-bottom:3px;
}
.dashboard-stat strong{
    font-size:22px;
}
.dashboard-stat strong em{
    color:#999;
    font-size:12px;
    font-style:normal;
    font-weight:600;
    margin-left:2px;
}
.dashboard-board{
    background:#fff;
    border:1px solid #ececef;
    border-radius:17px;
    padding:18px;
    box-shadow:0 8px 30px rgba(0,0,0,.025);
}
.board-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:17px;
}
.board-heading h2{
    margin:0 0 4px;
    font-size:18px;
}
.board-heading p{
    margin:0;
    color:#888;
    font-size:12px;
}
.dashboard-legend{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:12px;
    color:#777;
    font-size:11px;
}
.dashboard-legend span{
    display:inline-flex;
    align-items:center;
    gap:5px;
}
.legend-dot{
    width:7px;
    height:7px;
    border-radius:50%;
}
.legend-dot.scheduled{background:#3b82f6}
.legend-dot.progress{background:#e99b16}
.legend-dot.blocked{background:#d84c4c}
.legend-dot.done{background:#3a9a5d}
.technician-board{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(290px,1fr));
    gap:13px;
    align-items:start;
}
.technician-column{
    min-width:0;
    border:1px solid #e9e9ec;
    border-radius:14px;
    background:#f8f8f9;
    overflow:hidden;
}
.technician-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:13px;
    background:#fff;
    border-bottom:1px solid #ececef;
}
.technician-identity{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}
.technician-identity img,
.unassigned-avatar{
    width:39px;
    height:39px;
    border-radius:50%;
    flex:0 0 39px;
    object-fit:cover;
    background:#eeeeef;
}
.unassigned-avatar{
    display:flex;
    align-items:center;
    justify-content:center;
    color:#a13b3b;
    background:#fff0f0;
}
.technician-identity strong,
.technician-identity span{
    display:block;
}
.technician-identity strong{
    font-size:13px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.technician-identity span{
    color:#929299;
    font-size:10px;
    margin-top:2px;
}
.technician-count{
    min-width:27px;
    height:27px;
    padding:0 7px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#111;
    color:#fff;
    font-size:10px;
    font-weight:800;
}
.technician-orders{
    display:flex;
    flex-direction:column;
    gap:9px;
    padding:10px;
}
.technician-empty{
    min-height:132px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    color:#9a9aa0;
}
.technician-empty i{
    font-size:24px;
    margin-bottom:7px;
}
.technician-empty strong{
    color:#696970;
    font-size:12px;
}
.technician-empty span{
    font-size:10px;
    margin-top:3px;
}
.dashboard-order{
    position:relative;
    overflow:hidden;
    background:#fff;
    border:1px solid #e8e8eb;
    border-radius:12px;
    padding:12px;
}
.dashboard-order:before{
    content:"";
    position:absolute;
    top:0;
    left:0;
    bottom:0;
    width:3px;
    background:#aaa;
}
.dashboard-order.scheduled:before{background:#3b82f6}
.dashboard-order.progress:before{background:#e99b16}
.dashboard-order.blocked:before{background:#d84c4c}
.dashboard-order.done:before{background:#3a9a5d}
.order-topline{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-bottom:8px;
}
.order-time{
    display:inline-flex;
    align-items:center;
    gap:5px;
    font-size:11px;
    font-weight:800;
    color:#4f4f55;
}
.order-status{
    padding:4px 7px;
    border-radius:999px;
    font-size:9px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.02em;
}
.order-status.scheduled{background:#edf5ff;color:#2167a0}
.order-status.progress{background:#fff6df;color:#8a6300}
.order-status.blocked{background:#fff0f0;color:#a53030}
.order-status.done{background:#edf9f1;color:#287a43}
.order-status.neutral{background:#f1f1f2;color:#666}
.order-client{
    font-size:13px;
    font-weight:800;
    line-height:1.35;
    margin-bottom:3px;
}
.order-type{
    color:#707078;
    font-size:11px;
    font-weight:600;
    margin-bottom:8px;
}
.order-info{
    display:flex;
    align-items:flex-start;
    gap:6px;
    color:#888;
    font-size:10px;
    line-height:1.4;
    margin:6px 0;
}
.order-description{
    margin-top:7px;
    padding:8px 9px;
    background:#f7f7f8;
    border-radius:8px;
    color:#5b5b62;
    font-size:10px;
    line-height:1.45;
    max-height:52px;
    overflow:hidden;
}
.order-helpers{
    display:flex;
    align-items:flex-start;
    gap:7px;
    margin-top:8px;
    color:#777;
    font-size:10px;
}
.order-helpers div{
    display:flex;
    flex-wrap:wrap;
    gap:4px;
}
.order-helpers span{
    padding:3px 6px;
    background:#f1f1f3;
    border-radius:999px;
}
.order-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    border-top:1px solid #f0f0f1;
    margin-top:9px;
    padding-top:8px;
    font-size:9px;
    color:#aaa;
}
.order-footer a{
    display:inline-flex;
    align-items:center;
    gap:4px;
    color:#333;
    text-decoration:none;
    font-weight:800;
}
.unassigned-column{
    border-color:#f0cccc;
}
.unassigned-column .technician-header{
    background:#fffafa;
}
@media(max-width:1050px){
    .dashboard-summary-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media(max-width:700px){
    .dashboard-heading,
    .board-heading{
        align-items:stretch;
        flex-direction:column;
    }
    .day-toolbar{
        flex-wrap:wrap;
    }
    .day-label{
        order:-1;
        flex-basis:100%;
    }
    .dashboard-summary-grid{
        grid-template-columns:1fr 1fr;
    }
    .technician-board{
        grid-template-columns:1fr;
    }
}
@media(max-width:460px){
    .dashboard-summary-grid{
        grid-template-columns:1fr;
    }
    .day-picker-form{
        flex:1;
    }
    .day-picker-form label{
        width:100%;
    }
}


/* =========================================================
   ORDENS DE SERVIÇO
   ========================================================= */
.os-form-card{padding:22px}
.os-form-section{padding:4px 0 20px;margin-bottom:18px;border-bottom:1px solid #efeff1}
.os-form-section:last-of-type{border-bottom:0}
.os-main-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.os-helper-title{display:flex;align-items:baseline;gap:9px;margin:17px 0 10px}
.os-helper-title strong{font-size:13px}
.os-helper-title span{font-size:11px;color:#919197}
.os-check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}
.os-check-card{display:flex;align-items:center;gap:9px;padding:10px;border:1px solid #e8e8eb;border-radius:11px;background:#fff;cursor:pointer}
.os-check-card input{accent-color:#111}
.os-check-card strong,.os-check-card small{display:block}
.os-check-card strong{font-size:12px}
.os-check-card small{font-size:10px;color:#999;margin-top:1px}
.check-avatar{width:30px;height:30px;border-radius:50%;background:#f2f2f3;display:flex;align-items:center;justify-content:center}
.os-check-card.hidden-helper{display:none}
.os-bonus-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:10px}
.os-bonus-toolbar strong,.os-bonus-toolbar span{display:block}
.os-bonus-toolbar strong{font-size:13px}
.os-bonus-toolbar span{font-size:10px;color:#999;margin-top:2px}
.os-bonus-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:8px;max-height:340px;overflow:auto;padding-right:3px}
.os-bonus-card{display:flex;align-items:center;gap:9px;border:1px solid #e8e8eb;border-radius:11px;padding:11px;background:#fff;cursor:pointer}
.os-bonus-card:has(input:checked){border-color:#111;background:#fafafa}
.os-bonus-card input{accent-color:#111}
.bonus-card-main{min-width:0;flex:1}
.bonus-card-main strong,.bonus-card-main small{display:block}
.bonus-card-main strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bonus-card-main small{font-size:10px;color:#999;margin-top:2px}
.bonus-card-value{font-size:11px;font-weight:800;white-space:nowrap}
.os-bonus-total{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:12px;padding-top:12px;border-top:1px solid #eeeeef}
.os-bonus-total span{font-size:11px;color:#888}
.os-bonus-total strong{font-size:17px}
.os-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:10px;align-items:end;margin-bottom:17px;padding:14px;background:#fafafa;border:1px solid #eeeeef;border-radius:12px}
.os-filter-actions{display:flex;gap:7px}
.table-secondary-line{display:block;font-size:10px;color:#96969c;margin-top:2px}
.table-muted{color:#aaa}
.media-count{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;background:#f1f1f3;border-radius:999px;font-size:10px;font-weight:700}
.os-detail-card{padding:0;overflow:hidden}
.os-detail-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px;border-bottom:1px solid #ececef}
.os-detail-title{display:flex;align-items:center;gap:9px;margin-bottom:5px}
.os-detail-title>span:first-child{font-size:11px;font-weight:800;color:#777}
.os-detail-header h2{margin:0 0 5px;font-size:22px}
.os-detail-header p{margin:0;color:#8c8c93;font-size:11px;line-height:1.5}
.os-detail-actions{display:flex;gap:8px}
.os-detail-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.65fr);gap:0}
.os-detail-main{padding:18px;border-right:1px solid #ececef}
.os-detail-side{padding:18px;background:#fafafa}
.os-info-panel,.os-action-panel,.os-history-panel{background:#fff;border:1px solid #e9e9ec;border-radius:13px;padding:15px;margin-bottom:13px}
.os-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.os-info-grid>div{padding:10px;background:#fafafa;border-radius:9px}
.os-info-grid span,.os-info-grid strong{display:block}
.os-info-grid span{font-size:9px;text-transform:uppercase;letter-spacing:.06em;color:#96969d;margin-bottom:4px}
.os-info-grid strong{font-size:12px;line-height:1.5}
.info-wide{grid-column:1/-1}
.os-description-box{padding:13px;background:#fafafa;border-radius:10px;font-size:12px;line-height:1.6;color:#4c4c53;min-height:70px}
.impediment-panel{border-color:#f0cccc}
.execution-panel{border-color:#d2ead8}
.os-team-list{display:flex;flex-direction:column}
.os-team-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid #f0f0f2;font-size:11px}
.os-team-row:last-child{border-bottom:0}
.os-team-row span{color:#777}
.os-team-row.primary span{color:#222;font-weight:700}
.os-bonus-detail-list>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid #f0f0f2;font-size:11px}
.os-bonus-detail-list .total{padding-top:12px;border-bottom:0}
.os-bonus-detail-list .total strong{font-size:14px}
.os-media-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px}
.os-media-item{display:flex;align-items:center;gap:9px;padding:10px;border:1px solid #ececef;border-radius:10px;color:#333;text-decoration:none}
.os-media-item>span{width:34px;height:34px;border-radius:9px;background:#f2f2f3;display:flex;align-items:center;justify-content:center}
.os-media-item strong,.os-media-item small{display:block}
.os-media-item strong{font-size:10px;max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.os-media-item small{font-size:9px;color:#999;margin-top:2px}
.section-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#f1f1f3;color:#666;font-size:9px;margin-left:5px}
.os-action-panel form+form{margin-top:10px;padding-top:10px;border-top:1px solid #eeeeef}
.os-side-form{display:flex;flex-direction:column;gap:8px}
.os-action-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:10px;padding:10px 12px;background:#ececef;color:#333;font-size:11px;font-weight:800;cursor:pointer}
.os-action-btn.primary{background:#111;color:#fff}
.os-action-btn.success{background:#e9f8ee;color:#26733f}
.os-action-btn.danger{background:#fff0f0;color:#a12e2e}
.os-history-list{display:flex;flex-direction:column}
.os-history-item{position:relative;display:flex;gap:10px;padding:0 0 14px}
.os-history-item:not(:last-child):before{content:"";position:absolute;left:4px;top:10px;bottom:0;width:1px;background:#e0e0e3}
.history-marker{width:9px;height:9px;margin-top:4px;border-radius:50%;background:#111;flex:0 0 9px;z-index:1}
.os-history-item strong{display:block;font-size:10px}
.os-history-item p{margin:3px 0;color:#777;font-size:9px}
.os-history-item small{font-size:9px;color:#aaa}
@media(max-width:1050px){
    .os-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .os-filter-actions{grid-column:1/-1}
    .os-detail-grid{grid-template-columns:1fr}
    .os-detail-main{border-right:0;border-bottom:1px solid #ececef}
}
@media(max-width:760px){
    .os-main-grid{grid-template-columns:1fr}
    .os-bonus-toolbar,.os-detail-header{align-items:stretch;flex-direction:column}
    .os-filter-grid{grid-template-columns:1fr}
    .os-info-grid{grid-template-columns:1fr}
    .info-wide{grid-column:auto}
}


/* =========================================================
   BUSCA DE CLIENTE NA CRIAÇÃO / EDIÇÃO DA OS
   ========================================================= */
.os-client-field{
    position:relative;
}
.os-client-search-wrap{
    position:relative;
}
.os-client-search-wrap>i{
    position:absolute;
    left:12px;
    top:50%;
    transform:translateY(-50%);
    color:#8d8d94;
    z-index:2;
}
.os-client-search-wrap>input[type="search"]{
    width:100%;
    border:1px solid #dedee3;
    background:#fff;
    border-radius:10px;
    padding:11px 42px 11px 36px;
    outline:none;
    font:inherit;
    font-weight:400;
}
.os-client-search-wrap>input[type="search"]:focus{
    border-color:#999;
    box-shadow:0 0 0 3px rgba(0,0,0,.05);
}
.os-client-clear{
    position:absolute;
    right:7px;
    top:50%;
    transform:translateY(-50%);
    width:30px;
    height:30px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:0;
    border-radius:8px;
    background:transparent;
    color:#888;
    cursor:pointer;
    z-index:2;
}
.os-client-clear:hover{
    background:#f1f1f3;
    color:#222;
}
.os-client-results{
    position:absolute;
    left:0;
    right:0;
    top:calc(100% + 6px);
    display:none;
    max-height:360px;
    overflow:auto;
    background:#fff;
    border:1px solid #dedee3;
    border-radius:12px;
    box-shadow:0 16px 45px rgba(0,0,0,.12);
    z-index:50;
    padding:5px;
}
.os-client-results.show{
    display:block;
}
.os-client-result-item{
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    border:0;
    background:#fff;
    border-radius:9px;
    padding:10px;
    text-align:left;
    cursor:pointer;
}
.os-client-result-item:hover{
    background:#f6f6f7;
}
.os-client-result-icon{
    width:36px;
    height:36px;
    flex:0 0 36px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f0f0f2;
    color:#555;
}
.os-client-result-main{
    flex:1;
    min-width:0;
}
.os-client-result-main strong,
.os-client-result-main small,
.os-client-result-main em{
    display:block;
}
.os-client-result-main strong{
    font-size:12px;
    color:#222;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.os-client-result-main small{
    margin-top:2px;
    font-size:10px;
    color:#797980;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.os-client-result-main em{
    margin-top:3px;
    font-size:9px;
    color:#a0a0a6;
    font-style:normal;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.os-client-result-contract{
    padding:4px 7px;
    border-radius:999px;
    background:#fff5cf;
    color:#816200;
    font-size:9px;
    font-weight:800;
    flex:0 0 auto;
}
.os-client-result-empty{
    padding:15px;
    text-align:center;
    color:#999;
    font-size:11px;
}
.os-client-selected{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:9px;
    padding:11px;
    background:#fafafa;
    border:1px solid #e8e8eb;
    border-radius:11px;
}
.os-client-selected-icon{
    width:38px;
    height:38px;
    flex:0 0 38px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    background:#111;
    color:#fff;
}
.os-client-selected-main{
    flex:1;
    min-width:0;
}
.os-client-selected-main strong,
.os-client-selected-main span{
    display:block;
}
.os-client-selected-main strong{
    font-size:12px;
}
.os-client-selected-main span{
    margin-top:2px;
    color:#777;
    font-size:10px;
    line-height:1.4;
}
.os-client-contract-badge{
    padding:5px 8px;
    border-radius:999px;
    background:#fff5cf;
    color:#816200;
    font-size:9px;
    font-weight:800;
}


/* =========================================================
   CALENDÁRIO SEMANAL
   ========================================================= */
.calendar-page-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:20px;
    margin-bottom:18px;
}
.calendar-page-heading h1{
    margin:3px 0 5px;
    font-size:28px;
    letter-spacing:-.04em;
}
.calendar-page-heading p{
    margin:0;
    color:#7b7b83;
}
.calendar-filter-card{
    background:#fff;
    border:1px solid #ececef;
    border-radius:15px;
    padding:14px;
    margin-bottom:13px;
}
.calendar-filter-grid{
    display:grid;
    grid-template-columns:minmax(150px,.7fr) minmax(230px,1.2fr) minmax(190px,.9fr) auto;
    gap:10px;
    align-items:end;
}
.calendar-filter-input{
    position:relative;
}
.calendar-filter-input i{
    position:absolute;
    left:11px;
    top:50%;
    transform:translateY(-50%);
    color:#999;
}
.calendar-filter-input input{
    padding-left:34px!important;
}
.calendar-filter-action{
    display:flex;
    align-items:flex-end;
}
.calendar-filter-action .btn-secondary-app{
    height:42px;
}
.calendar-shell{
    position:relative;
    background:#fff;
    border:1px solid #ececef;
    border-radius:17px;
    padding:16px;
    box-shadow:0 8px 30px rgba(0,0,0,.025);
}
.calendar-info-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:13px;
}
.calendar-status-legend{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:12px;
    color:#777;
    font-size:10px;
}
.calendar-status-legend span{
    display:inline-flex;
    align-items:center;
    gap:5px;
}
.calendar-dot{
    width:7px;
    height:7px;
    border-radius:50%;
}
.calendar-dot.scheduled{background:#3b82f6}
.calendar-dot.progress{background:#e99b16}
.calendar-dot.blocked{background:#d84c4c}
.calendar-dot.done{background:#3a9a5d}
.calendar-help{
    display:flex;
    align-items:center;
    gap:6px;
    color:#999;
    font-size:10px;
}
#agendaCalendario{
    min-height:650px;
}
#agendaCalendario .fc{
    font-family:Inter,Arial,sans-serif;
}
#agendaCalendario .fc .fc-toolbar{
    margin-bottom:14px;
}
#agendaCalendario .fc .fc-toolbar-title{
    font-size:17px;
    font-weight:800;
    letter-spacing:-.025em;
}
#agendaCalendario .fc .fc-button{
    border:0;
    border-radius:9px!important;
    box-shadow:none!important;
    background:#111;
    font-size:11px;
    font-weight:700;
    padding:8px 10px;
}
#agendaCalendario .fc .fc-button:hover{
    background:#292929;
}
#agendaCalendario .fc .fc-today-button:disabled{
    background:#e8e8ea;
    color:#8a8a90;
    opacity:1;
}
#agendaCalendario .fc .fc-scrollgrid{
    border-color:#e9e9ec;
    border-radius:12px;
    overflow:hidden;
}
#agendaCalendario .fc td,
#agendaCalendario .fc th{
    border-color:#ededf0;
}
#agendaCalendario .fc .fc-col-header-cell{
    background:#fafafa;
}
#agendaCalendario .fc .fc-col-header-cell-cushion{
    padding:10px 5px;
    color:#555;
    text-decoration:none;
    font-size:11px;
    font-weight:800;
    text-transform:capitalize;
}
#agendaCalendario .fc .fc-timegrid-slot{
    height:34px;
}
#agendaCalendario .fc .fc-timegrid-slot-label-cushion{
    color:#9b9ba1;
    font-size:9px;
}
#agendaCalendario .fc .fc-timegrid-now-indicator-line{
    border-color:#d93434;
}
#agendaCalendario .fc .fc-timegrid-now-indicator-arrow{
    border-color:#d93434;
    border-top-color:transparent;
    border-bottom-color:transparent;
}
#agendaCalendario .fc .fc-day-today{
    background:#fffdf4!important;
}
.brava-calendar-event{
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    cursor:pointer;
}
.weekly-event{
    height:100%;
    min-height:40px;
    overflow:hidden;
    border-radius:8px;
    padding:6px 7px;
    background:#eef5ff;
    border-left:3px solid #3b82f6;
    color:#253243;
}
.weekly-event.progress{
    background:#fff6df;
    border-left-color:#e99b16;
}
.weekly-event.blocked{
    background:#fff0f0;
    border-left-color:#d84c4c;
}
.weekly-event.done{
    background:#edf9f1;
    border-left-color:#3a9a5d;
}
.weekly-event.neutral{
    background:#f3f3f4;
    border-left-color:#888;
}
.weekly-event-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:5px;
    margin-bottom:2px;
}
.weekly-event-time{
    font-size:9px;
    font-weight:800;
}
.weekly-event-contract{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:16px;
    height:16px;
    border-radius:50%;
    background:#111;
    color:#fff;
    font-size:8px;
    font-weight:800;
}
.weekly-event-client{
    font-size:10px;
    line-height:1.25;
    font-weight:800;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.weekly-event-tech{
    margin-top:2px;
    font-size:8px;
    line-height:1.2;
    color:#777;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.calendar-popover{
    position:absolute;
    z-index:9990;
    background:#fff;
    border:1px solid #dedee3;
    border-radius:14px;
    padding:14px;
    box-shadow:0 18px 55px rgba(0,0,0,.17);
}
.calendar-popover[hidden]{
    display:none!important;
}
.calendar-popover-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}
.calendar-popover-head span,
.calendar-popover-head strong{
    display:block;
}
.calendar-popover-head span{
    font-size:9px;
    font-weight:800;
    color:#999;
}
.calendar-popover-head strong{
    margin-top:2px;
    font-size:14px;
}
.calendar-popover-head button{
    width:30px;
    height:30px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:0;
    border-radius:8px;
    background:#f2f2f3;
    color:#555;
    cursor:pointer;
}
.calendar-popover-status{
    display:inline-flex;
    margin-top:9px;
    padding:5px 8px;
    border-radius:999px;
    font-size:9px;
    font-weight:800;
}
.calendar-popover-status.scheduled{background:#edf5ff;color:#2167a0}
.calendar-popover-status.progress{background:#fff6df;color:#8a6300}
.calendar-popover-status.blocked{background:#fff0f0;color:#a53030}
.calendar-popover-status.done{background:#edf9f1;color:#287a43}
.calendar-popover-status.neutral{background:#f1f1f2;color:#666}
.calendar-popover-info{
    display:flex;
    flex-direction:column;
    gap:7px;
    margin:12px 0;
}
.calendar-popover-info>div{
    display:flex;
    align-items:flex-start;
    gap:7px;
    color:#666;
    font-size:10px;
    line-height:1.4;
}
.calendar-popover-info i{
    color:#999;
}
.calendar-popover-description{
    max-height:90px;
    overflow:auto;
    padding:9px;
    margin-bottom:11px;
    border-radius:9px;
    background:#f7f7f8;
    color:#555;
    font-size:10px;
    line-height:1.5;
}
.calendar-popover-description.danger{
    background:#fff0f0;
    color:#923232;
}
.calendar-popover .btn-primary-app{
    width:100%;
}
@media(max-width:900px){
    .calendar-filter-grid{
        grid-template-columns:1fr 1fr;
    }
    .calendar-filter-action{
        grid-column:1/-1;
    }
    .calendar-info-row{
        align-items:flex-start;
        flex-direction:column;
    }
}
@media(max-width:650px){
    .calendar-page-heading{
        align-items:stretch;
        flex-direction:column;
    }
    .calendar-filter-grid{
        grid-template-columns:1fr;
    }
    .calendar-filter-action{
        grid-column:auto;
    }
    .calendar-filter-action .btn-secondary-app{
        width:100%;
    }
    #agendaCalendario{
        min-height:600px;
    }
    #agendaCalendario .fc .fc-toolbar{
        align-items:stretch;
        flex-direction:column;
        gap:8px;
    }
    #agendaCalendario .fc .fc-toolbar-chunk{
        display:flex;
        justify-content:center;
    }
}


/* =========================================================
   CALENDÁRIO MENSAL
   ========================================================= */
#agendaCalendario .fc .fc-daygrid-day-frame{
    min-height:118px;
}
#agendaCalendario .fc .fc-daygrid-day-number{
    padding:7px 8px;
    color:#5f5f66;
    text-decoration:none;
    font-size:11px;
    font-weight:800;
}
#agendaCalendario .fc .fc-day-other{
    background:#fafafa;
}
#agendaCalendario .fc .fc-day-other .fc-daygrid-day-number{
    color:#b0b0b5;
}
#agendaCalendario .fc .fc-daygrid-day.fc-day-today{
    background:#fffbea!important;
}
#agendaCalendario .fc .fc-daygrid-event{
    margin:2px 4px;
}
.month-event{
    overflow:hidden;
    border-radius:7px;
    padding:5px 6px;
    background:#eef5ff;
    border-left:3px solid #3b82f6;
    color:#263442;
}
.month-event.progress{
    background:#fff6df;
    border-left-color:#e99b16;
}
.month-event.blocked{
    background:#fff0f0;
    border-left-color:#d84c4c;
}
.month-event.done{
    background:#edf9f1;
    border-left-color:#3a9a5d;
}
.month-event.neutral{
    background:#f3f3f4;
    border-left-color:#888;
}
.month-event-line{
    display:flex;
    align-items:center;
    gap:4px;
    min-width:0;
}
.month-event-time{
    font-size:8px;
    font-weight:800;
    flex:0 0 auto;
}
.month-event-line strong{
    min-width:0;
    flex:1;
    font-size:9px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.month-event-tech{
    margin-top:2px;
    font-size:8px;
    color:#74747b;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.month-event-contract{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:14px;
    height:14px;
    flex:0 0 14px;
    border-radius:50%;
    background:#111;
    color:#fff;
    font-size:7px;
    font-weight:800;
}
#agendaCalendario .fc .fc-daygrid-more-link{
    display:block;
    margin:3px 5px;
    padding:3px 6px;
    border-radius:7px;
    background:#f1f1f3;
    color:#555;
    font-size:9px;
    font-weight:800;
    text-decoration:none;
}
#agendaCalendario .fc .fc-popover{
    border:1px solid #dedee3;
    border-radius:12px;
    box-shadow:0 16px 45px rgba(0,0,0,.14);
    overflow:hidden;
}
#agendaCalendario .fc .fc-popover-header{
    background:#fafafa;
    padding:9px 11px;
    font-size:11px;
    font-weight:800;
}


/* =========================================================
   PAGINAÇÃO
   ========================================================= */
.app-pagination{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-top:16px;
    padding-top:14px;
    border-top:1px solid #eeeeef;
}
.pagination-info{
    color:#8c8c93;
    font-size:11px;
}
.pagination-buttons{
    display:flex;
    align-items:center;
    gap:5px;
}
.pagination-button{
    min-width:34px;
    height:34px;
    padding:0 8px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:9px;
    background:#f2f2f4;
    color:#444;
    text-decoration:none;
    font-size:11px;
    font-weight:800;
}
.pagination-button:hover{
    background:#e8e8ea;
    color:#111;
}
.pagination-button.active{
    background:#111;
    color:#fff;
}
.pagination-button.disabled{
    opacity:.4;
    pointer-events:none;
}
@media(max-width:620px){
    .app-pagination{
        align-items:stretch;
        flex-direction:column;
    }
    .pagination-buttons{
        justify-content:center;
    }
}


/* =========================================================
   CLIMA NO CALENDÁRIO — referência da agenda antiga
   ========================================================= */
#agendaCalendario .fc-daygrid-day-top{
    position:relative;
    min-height:27px;
}
#agendaCalendario .fc-weather{
    position:absolute;
    top:3px;
    left:4px;
    z-index:5;
    display:inline-flex;
    align-items:center;
    gap:2px;
    height:18px;
    padding:0 5px;
    background:#c8d3df;
    border:1px solid #aebdcd;
    border-radius:9px;
    color:#344454;
    font-size:9px;
    font-weight:600;
    line-height:18px;
    white-space:nowrap;
}
#agendaCalendario .weather-icon{
    width:14px;
    height:14px;
    margin:0;
    object-fit:contain;
}
#agendaCalendario .fc-weather strong{
    font-size:9px;
    font-weight:800;
    line-height:18px;
}
#agendaCalendario .fc-daygrid-day-number{
    margin-left:auto;
}
#agendaCalendario .fc-daygrid-more-link{
    cursor:pointer;
}

/* =========================================================
   LISTA COMPLETA DAS OS DO DIA
   ========================================================= */
body.agenda-modal-open{
    overflow:hidden;
}
.agenda-day-modal{
    position:fixed;
    inset:0;
    z-index:10050;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:22px;
}
.agenda-day-modal[hidden]{
    display:none!important;
}
.agenda-day-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(10,10,12,.55);
    backdrop-filter:blur(2px);
}
.agenda-day-modal-dialog{
    position:relative;
    z-index:1;
    width:min(820px,100%);
    max-height:min(84vh,850px);
    display:flex;
    flex-direction:column;
    overflow:hidden;
    background:#fff;
    border:1px solid #dedee3;
    border-radius:18px;
    box-shadow:0 24px 80px rgba(0,0,0,.25);
}
.agenda-day-modal-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    padding:20px;
    border-bottom:1px solid #ececef;
}
.agenda-day-modal-header h2{
    margin:3px 0 4px;
    font-size:20px;
    text-transform:capitalize;
}
.agenda-day-modal-header p{
    margin:0;
    color:#8b8b92;
    font-size:11px;
}
.agenda-day-modal-close{
    width:36px;
    height:36px;
    flex:0 0 36px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:0;
    border-radius:10px;
    background:#f1f1f3;
    color:#555;
    cursor:pointer;
}
.agenda-day-modal-summary{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
    padding:12px 20px;
    background:#fafafa;
    border-bottom:1px solid #ececef;
}
.agenda-day-modal-summary>div{
    padding:10px 12px;
    background:#fff;
    border:1px solid #ececef;
    border-radius:10px;
}
.agenda-day-modal-summary span,
.agenda-day-modal-summary strong{
    display:block;
}
.agenda-day-modal-summary span{
    color:#95959c;
    font-size:9px;
    text-transform:uppercase;
    letter-spacing:.05em;
}
.agenda-day-modal-summary strong{
    margin-top:3px;
    font-size:18px;
}
.agenda-day-list{
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:16px 20px 20px;
    overflow:auto;
}
.agenda-day-item{
    position:relative;
    display:grid;
    grid-template-columns:70px minmax(0,1fr) auto 18px;
    align-items:center;
    gap:12px;
    padding:12px 13px;
    background:#fff;
    border:1px solid #e8e8eb;
    border-radius:12px;
    color:#333;
    text-decoration:none;
    overflow:hidden;
}
.agenda-day-item:before{
    content:"";
    position:absolute;
    top:0;
    bottom:0;
    left:0;
    width:3px;
    background:#999;
}
.agenda-day-item.scheduled:before{background:#3b82f6}
.agenda-day-item.progress:before{background:#e99b16}
.agenda-day-item.blocked:before{background:#d84c4c}
.agenda-day-item.done:before{background:#3a9a5d}
.agenda-day-item:hover{
    border-color:#cfcfd4;
    box-shadow:0 6px 20px rgba(0,0,0,.045);
}
.agenda-day-time{
    display:flex;
    align-items:center;
    gap:5px;
    font-size:11px;
    font-weight:800;
}
.agenda-day-item-main{
    min-width:0;
}
.agenda-day-item-title{
    display:flex;
    align-items:center;
    gap:7px;
    min-width:0;
}
.agenda-day-item-title strong{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    font-size:12px;
}
.agenda-day-item-title span{
    padding:3px 6px;
    border-radius:999px;
    background:#fff4c8;
    color:#785d00;
    font-size:8px;
    font-weight:800;
}
.agenda-day-item-main small,
.agenda-day-item-main em{
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.agenda-day-item-main small{
    margin-top:3px;
    color:#666;
    font-size:10px;
}
.agenda-day-item-main em{
    margin-top:3px;
    color:#999;
    font-size:9px;
    font-style:normal;
}
.agenda-day-status{
    padding:5px 8px;
    border-radius:999px;
    white-space:nowrap;
    font-size:9px;
    font-weight:800;
}
.agenda-day-status.scheduled{background:#edf5ff;color:#2167a0}
.agenda-day-status.progress{background:#fff6df;color:#8a6300}
.agenda-day-status.blocked{background:#fff0f0;color:#a53030}
.agenda-day-status.done{background:#edf9f1;color:#287a43}
.agenda-day-status.neutral{background:#f1f1f2;color:#666}
.agenda-day-arrow{
    color:#999;
}
.agenda-day-empty{
    min-height:180px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    color:#96969c;
}
.agenda-day-empty i{
    font-size:28px;
    margin-bottom:8px;
}
.agenda-day-empty strong{
    color:#555;
    font-size:13px;
}
.agenda-day-empty span{
    margin-top:3px;
    font-size:10px;
}
@media(max-width:650px){
    .agenda-day-modal{
        padding:10px;
    }
    .agenda-day-modal-dialog{
        max-height:92vh;
    }
    .agenda-day-modal-summary{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .agenda-day-item{
        grid-template-columns:55px minmax(0,1fr) 18px;
    }
    .agenda-day-status{
        grid-column:2/3;
        width:max-content;
    }
}


/* Correção visual da paginação de Ordens */
.app-pagination{
    visibility:visible!important;
    opacity:1!important;
}
.pagination-ellipsis{
    min-width:22px;
    height:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#999;
    font-size:12px;
}


/* =========================================================
   REVISÃO DO "VER MAIS" DO CALENDÁRIO
   ========================================================= */
#agendaCalendario .fc .fc-daygrid-more-link{
    width:max-content;
    margin:4px 5px 5px;
    padding:5px 9px;
    border-radius:8px;
    background:#111;
    color:#fff;
    font-size:9px;
    font-weight:800;
    line-height:1;
    text-decoration:none;
}
#agendaCalendario .fc .fc-daygrid-more-link:hover{
    background:#2a2a2a;
    color:#fff;
}


/* =========================================================
   IMPLANTAÇÕES
   ========================================================= */
.implant-summary-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin-bottom:18px;
}
.implant-form-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
}
.implant-filter-grid{
    display:grid;
    grid-template-columns:minmax(260px,1fr) minmax(180px,.45fr) auto;
    gap:10px;
    align-items:end;
    padding:14px;
    margin-bottom:16px;
    background:#fafafa;
    border:1px solid #eeeeef;
    border-radius:12px;
}
.implant-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(275px,1fr));
    gap:12px;
}
.implant-card{
    display:block;
    padding:16px;
    border:1px solid #e8e8eb;
    border-radius:14px;
    background:#fff;
    color:#333;
    text-decoration:none;
    transition:.15s ease;
}
.implant-card:hover{
    transform:translateY(-1px);
    border-color:#cfcfd4;
    box-shadow:0 10px 30px rgba(0,0,0,.05);
}
.implant-card-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.implant-code{
    color:#97979d;
    font-size:9px;
    font-weight:800;
    letter-spacing:.06em;
}
.implant-status{
    display:inline-flex;
    padding:5px 8px;
    border-radius:999px;
    font-size:9px;
    font-weight:800;
}
.implant-status.planning{background:#edf5ff;color:#2167a0}
.implant-status.progress{background:#fff6df;color:#8a6300}
.implant-status.paused{background:#f1f1f3;color:#68686f}
.implant-status.done{background:#edf9f1;color:#287a43}
.implant-status.cancelled{background:#fff0f0;color:#a53030}
.implant-card h3{
    margin:12px 0 7px;
    font-size:15px;
    line-height:1.35;
}
.implant-client{
    display:flex;
    align-items:center;
    gap:6px;
    margin:0;
    color:#777;
    font-size:10px;
}
.implant-card-progress{
    margin-top:16px;
}
.implant-card-progress>div:first-child{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:7px;
}
.implant-card-progress span{font-size:9px;color:#999}
.implant-card-progress strong{font-size:12px}
.implant-progress-track{
    height:8px;
    overflow:hidden;
    border-radius:999px;
    background:#eeeeef;
}
.implant-progress-track.compact{height:6px}
.implant-progress-bar{
    height:100%;
    border-radius:inherit;
    background:#111;
    transition:width .25s ease;
}
.implant-card-footer{
    display:flex;
    justify-content:space-between;
    gap:10px;
    margin-top:14px;
    padding-top:11px;
    border-top:1px solid #f0f0f2;
    color:#888;
    font-size:9px;
}
.implant-card-footer span{
    display:inline-flex;
    align-items:center;
    gap:5px;
}
.implant-card-footer .late{
    color:#a53030;
    font-weight:800;
}
.implant-detail-card{
    padding:0;
    overflow:hidden;
}
.implant-detail-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:18px;
    padding:20px;
    border-bottom:1px solid #ececef;
}
.implant-detail-kicker{
    display:flex;
    align-items:center;
    gap:8px;
    margin-bottom:5px;
}
.implant-detail-kicker>span:first-child{
    font-size:9px;
    color:#999;
    font-weight:800;
}
.implant-detail-header h2{
    margin:0 0 5px;
    font-size:22px;
}
.implant-detail-header p{
    margin:0;
    color:#8c8c93;
    font-size:10px;
}
.implant-detail-actions{
    display:flex;
    gap:8px;
}
.implant-progress-section{
    padding:16px 20px;
    background:#fafafa;
    border-bottom:1px solid #ececef;
}
.implant-progress-top{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:15px;
    margin-bottom:9px;
}
.implant-progress-top>div:first-child span,
.implant-progress-top>div:first-child strong{
    display:block;
}
.implant-progress-top>div:first-child span{
    color:#999;
    font-size:9px;
}
.implant-progress-top>div:first-child strong{
    margin-top:2px;
    font-size:20px;
}
.implant-progress-stats{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:8px;
    color:#777;
    font-size:9px;
}
.implant-progress-stats span{
    padding:4px 7px;
    background:#fff;
    border:1px solid #e9e9ec;
    border-radius:999px;
}
.implant-detail-grid{
    display:grid;
    grid-template-columns:minmax(0,1.5fr) minmax(280px,.5fr);
    gap:0;
}
.implant-detail-grid>div{
    padding:18px;
    border-right:1px solid #ececef;
}
.implant-detail-grid>aside{
    padding:18px;
    background:#fafafa;
}
.implant-observation{
    margin-top:11px;
    padding:11px;
    border-radius:9px;
    background:#fff9e8;
    color:#6d5b21;
}
.implant-observation strong{
    display:block;
    font-size:10px;
    margin-bottom:4px;
}
.implant-observation p{
    margin:0;
    font-size:10px;
    line-height:1.5;
}
.implant-os-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    margin-bottom:10px;
}
.implant-os-heading p{
    margin:-5px 0 0;
    color:#999;
    font-size:9px;
}
.implant-os-list{
    display:flex;
    flex-direction:column;
    gap:7px;
}
.implant-os-row{
    display:grid;
    grid-template-columns:62px minmax(0,1fr) auto 16px;
    align-items:center;
    gap:10px;
    padding:10px 11px;
    border:1px solid #e9e9ec;
    border-radius:11px;
    color:#333;
    text-decoration:none;
}
.implant-os-row:hover{
    border-color:#cacacf;
    background:#fafafa;
}
.implant-os-id{
    font-size:12px;
    font-weight:900;
    letter-spacing:.02em;
}
.implant-os-main{
    min-width:0;
}
.implant-os-main strong,
.implant-os-main span,
.implant-os-main small{
    display:block;
}
.implant-os-main strong{
    font-size:11px;
}
.implant-os-main span{
    margin-top:2px;
    color:#777;
    font-size:9px;
}
.implant-os-main small{
    margin-top:3px;
    color:#a0a0a6;
    font-size:9px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.implant-client-info{
    display:flex;
    flex-direction:column;
    gap:5px;
}
.implant-client-info strong{font-size:13px}
.implant-client-info span{
    color:#777;
    font-size:10px;
    line-height:1.4;
}
.implant-delete-note{
    margin:0 0 10px;
    color:#888;
    font-size:10px;
    line-height:1.5;
}
.implant-new-os{
    padding:20px;
    border-top:1px solid #ececef;
    background:#fbfbfc;
}
.implant-inherited-client{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:16px;
    padding:12px;
    border:1px solid #e6e6e9;
    border-radius:11px;
    background:#fff;
}
.implant-inherited-client>i{
    width:38px;
    height:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    background:#111;
    color:#fff;
}
.implant-inherited-client span,
.implant-inherited-client strong{
    display:block;
}
.implant-inherited-client span{
    color:#999;
    font-size:9px;
}
.implant-inherited-client strong{
    margin-top:2px;
    font-size:12px;
}
.implant-no-bonus{
    display:flex;
    align-items:flex-start;
    gap:7px;
    margin-top:14px;
    padding:10px 11px;
    border-radius:9px;
    background:#fff7df;
    color:#745900;
    font-size:10px;
    line-height:1.45;
}
@media(max-width:950px){
    .implant-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .implant-form-grid{grid-template-columns:1fr 1fr}
    .implant-detail-grid{grid-template-columns:1fr}
    .implant-detail-grid>div{
        border-right:0;
        border-bottom:1px solid #ececef;
    }
}
@media(max-width:700px){
    .implant-detail-header,
    .implant-progress-top,
    .implant-os-heading{
        align-items:stretch;
        flex-direction:column;
    }
    .implant-form-grid,
    .implant-filter-grid{
        grid-template-columns:1fr;
    }
    .implant-progress-stats{
        justify-content:flex-start;
    }
    .implant-os-row{
        grid-template-columns:55px minmax(0,1fr) 16px;
    }
    .implant-os-row .order-status{
        grid-column:2/3;
        width:max-content;
    }
}
