:root {
    /* Cores padrão. Estas serão sobrescritas via JavaScript consumindo a API */
    --color-primary: #24547b;
    --color-secondary: #179f94;
    --color-btn-text: #f7f7f7;
    --color-body-text: #3b3939;

    --color-bg-light: #f4f6f9;
    --color-surface: #ffffff;
    --color-border: #e0e0e0;
    --color-danger: #e74c3c;
    --color-success: #2ecc71;
    --color-warning: #f1c40f;

    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--color-body-text);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Layout Principal (Menu superior + Conteúdo) */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Menu horizontal no topo, com mega-menu por módulo (inspirado no padrão BomControle) */
.topnav {
    height: 64px;
    flex-shrink: 0;
    background-color: var(--color-primary);
    color: var(--color-btn-text);
    display: flex;
    align-items: stretch;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1000;
}

.topnav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    white-space: nowrap;
    margin-right: 25px;
}
/* Logo própria da instalação (instancia/logo_topo.png): quando carrega, troca o ícone + "RevendaMed" */
.topnav-logo { display: none; height: 36px; width: auto; }
.topnav-brand.com-logo > i, .topnav-brand.com-logo > span { display: none; }
.topnav-brand.com-logo .topnav-logo { display: block; }

.topnav-items {
    display: flex;
    align-items: stretch;
    gap: 2px;
}

.topnav-item {
    position: relative;
    display: flex;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 18px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.72rem;
    white-space: nowrap;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    cursor: pointer;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(255,255,255,0.12);
    color: #fff;
}

.nav-item.active {
    box-shadow: inset 0 -3px 0 var(--color-secondary);
}

.nav-item i {
    font-size: 1.15rem;
}

.topnav-logout {
    margin-left: auto;
}

/* Usuário logado no menu superior (primeiro nome + inicial) */
.topnav-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 16px;
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
}
.topnav-user + .topnav-logout { margin-left: 0; }
.topnav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-secondary), #12877e);
    border: 2px solid rgba(255,255,255,0.35);
}

/* Faixa branca fina abaixo do menu (sem título) */
.topbar.topbar-slim { height: 10px; padding: 0; }
.topbar.topbar-slim .topbar-title { display: none; }

/* Painel do mega-menu (aparece abaixo do módulo ao passar o mouse) */
.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-surface);
    color: var(--color-body-text);
    box-shadow: 0 14px 28px rgba(0,0,0,0.18);
    border-top: 3px solid var(--color-secondary);
    padding: 22px 26px;
    gap: 22px 34px;
    min-width: min(560px, calc(100vw - 20px));
    /* Nunca mais largo que a tela: se não couber, as colunas quebram para a linha de baixo */
    max-width: calc(100vw - 20px);
    width: max-content;
    flex-wrap: wrap;
    z-index: 999;
}

.topnav-item.open .mega-menu {
    display: flex;
}

.mega-menu-col {
    min-width: 160px;
    display: flex;
    flex-direction: column;
}

.mega-menu-col h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-primary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mega-menu-col a,
.mega-menu-col .mm-disabled {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 6px;
    color: #333;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
}

.mega-menu-col a:hover {
    background-color: var(--color-bg-light);
    color: var(--color-secondary);
}

.mega-menu-col a i {
    width: 16px;
    text-align: center;
    color: var(--color-secondary);
    font-size: 0.8rem;
}

.mega-menu-col .mm-disabled {
    color: #b7bec8;
    cursor: default;
}

.mega-menu-col .mm-disabled i {
    width: 16px;
    text-align: center;
    font-size: 0.8rem;
}

.main-content {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    height: 70px;
    background-color: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 10;
}

.topbar-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Cards Premium */
.card {
    background: var(--color-surface);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 25px;
    animation: fadeIn 0.4s ease-out;
}

.card-title {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-bg-light);
    padding-bottom: 10px;
}

/* Botões Customizáveis */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-speed);
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-btn-text);
}

.btn-primary:hover {
    background-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 159, 148, 0.4);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-btn-text);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    transform: translateY(-2px);
}

/* Tabelas Bonitas */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.table th {
    background-color: var(--color-bg-light);
    color: var(--color-primary);
    font-weight: 600;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
}

/* Animações e Efeitos */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glassmorphism elements */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Tela de Recebimentos (cx-*): resumo em cards + abas + tabela clara com ações por linha */
.cx { display: flex; flex-direction: column; gap: 16px; font-size: 0.88rem; }
.cx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cx-head p { color: #6b7280; margin: 0; }
.cx-head-actions { display: flex; gap: 8px; align-items: center; }

.cx-btn {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid transparent; border-radius: 999px;
    padding: 7px 16px; font: inherit; font-weight: 600; cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
    white-space: nowrap;
}
.cx-btn-main { background: var(--color-secondary); color: #fff; }
.cx-btn-main:hover { filter: brightness(0.93); }
.cx-btn-ghost { background: var(--color-surface); color: var(--color-body-text); border-color: var(--color-border); }
.cx-btn-ghost:hover { border-color: var(--color-secondary); color: var(--color-secondary); }
.cx-btn-sm { padding: 4px 12px; font-size: 0.8rem; }

.cx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cx-kpi {
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px;
    padding: 14px 18px; display: flex; align-items: center; gap: 14px;
}
.cx-kpi-icon {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.cx-kpi-label { color: #6b7280; font-size: 0.78rem; text-transform: uppercase; letter-spacing: .04em; }
.cx-kpi-value { font-size: 1.35rem; font-weight: 700; line-height: 1.2; color: var(--color-body-text); }
.cx-kpi-hint { color: #6b7280; font-size: 0.78rem; }
.cx-kpi-body { flex: 1; min-width: 0; }

.cx-panel { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; }
.cx-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--color-border); }
.cx-tab {
    background: none; border: none; font: inherit; font-weight: 600; color: #6b7280;
    padding: 13px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
    display: inline-flex; align-items: center; gap: 8px;
}
.cx-tab.active { color: var(--color-secondary); border-bottom-color: var(--color-secondary); }
.cx-count { background: #eef2f5; color: #4b5563; border-radius: 999px; padding: 0 8px; font-size: 0.75rem; }
.cx-tab.active .cx-count { background: rgba(23,159,148,.12); color: var(--color-secondary); }

.cx-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; background: #fafbfc; border-bottom: 1px solid var(--color-border); }
.cx-search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.cx-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.cx-search input, .cx-filters input[type="date"] {
    width: 100%; border: 1px solid var(--color-border); border-radius: 8px; padding: 7px 10px; font: inherit; background: #fff;
}
.cx-search input { padding-left: 32px; }
.cx-filters input[type="date"] { width: auto; }
.cx-pills { display: inline-flex; background: #eef2f5; border-radius: 999px; padding: 3px; }
.cx-pill { border: none; background: none; font: inherit; font-size: 0.8rem; padding: 4px 12px; border-radius: 999px; cursor: pointer; color: #4b5563; }
.cx-pill.active { background: #fff; color: var(--color-body-text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.cx-table-wrap { overflow-x: auto; }
.cx-table { width: 100%; border-collapse: collapse; }
.cx-table th {
    text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .05em;
    color: #6b7280; font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--color-border); white-space: nowrap;
}
.cx-table td { padding: 12px 16px; border-bottom: 1px solid #f0f2f4; vertical-align: middle; }
.cx-table tbody tr:hover { background: #f8fafb; }
.cx-table .num, .cx-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cx-table .act { text-align: right; white-space: nowrap; width: 1%; }
.cx-empty { text-align: center; color: #9ca3af; padding: 40px 16px !important; }
.cx-client { font-weight: 600; color: var(--color-body-text); }
.cx-meta { color: #6b7280; font-size: 0.78rem; }
.cx-tag { display: inline-block; background: #eef2f5; color: #374151; border-radius: 6px; padding: 1px 8px; font-size: 0.75rem; margin: 2px 4px 2px 0; }
.cx-status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; border-radius: 999px; padding: 2px 10px; }
.cx-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cx-status.aberto { background: #fff7e6; color: #b45309; }
.cx-status.pago { background: #e8f7ef; color: #15803d; }
.cx-status.estornado { background: #fdecec; color: #b91c1c; }
.cx-strike { text-decoration: line-through; color: #9ca3af; }

.cx-menu { position: relative; display: inline-block; }
.cx-menu-btn { background: none; border: 1px solid transparent; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; color: #6b7280; }
.cx-menu-btn:hover { background: #eef2f5; }
.cx-menu-list {
    display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 50; min-width: 190px;
    background: #fff; border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,.12); padding: 6px;
}
.cx-menu.open .cx-menu-list { display: block; }
.cx-menu-list button {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none;
    font: inherit; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--color-body-text);
}
.cx-menu-list button:hover:not(:disabled) { background: #f3f5f7; }
.cx-menu-list button:disabled { color: #b0b6bd; cursor: not-allowed; }
.cx-menu-list button.danger { color: #b91c1c; }
.cx-menu-list i { width: 16px; text-align: center; }

/* ================= ORÇAMENTOS — lista + detalhe (orx-*) ================= */
.orx { --orx-ink: #1f2d3d; --orx-mute: #6b7785; --orx-line: #e6eaef; --orx-soft: #f6f8fa; --orx-ab: #d97706; --orx-fe: #15803d; --orx-ca: #b91c1c; display: flex; flex-direction: column; gap: 16px; font-size: .88rem; }
.orx * { box-sizing: border-box; }

/* Cabeçalho */
.orx-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; background: radial-gradient(circle at calc(100% + 70px) -90px, rgba(255,255,255,.07) 0 140px, transparent 141px), linear-gradient(120deg, var(--color-primary) 0%, #1c6f86 60%, var(--color-secondary) 100%); color: #fff; border-radius: 16px; padding: 20px 24px; box-shadow: 0 10px 30px -12px rgba(36,84,123,.55); position: relative; z-index: 5; }
.orx-hero-title { display: flex; align-items: center; gap: 14px; flex: 1 1 280px; min-width: 0; }
.orx-hero-ic { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); display: grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; }
.orx-hero h2 { margin: 0; font-size: 1.35rem; font-weight: 700; color: #fff; }
.orx-hero p { margin: 2px 0 0; font-size: .82rem; opacity: .82; }
.orx-hero-kpis { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.orx-hk { background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: 8px 14px; min-width: 110px; }
.orx-hk span { display: block; font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; opacity: .78; font-weight: 600; }
.orx-hk b { font-size: 1.1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.orx-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.orx-hbtn { border-radius: 11px; padding: 10px 16px; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: transform .15s, background .15s, box-shadow .15s; white-space: nowrap; }
.orx-hbtn:hover { transform: translateY(-1px); }
.orx-hbtn.ghost { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); color: #fff; }
.orx-hbtn.ghost:hover { background: rgba(255,255,255,.22); }
.orx-hbtn.solid { background: #fff; border: 1px solid #fff; color: var(--color-primary); box-shadow: 0 8px 18px -10px rgba(0,0,0,.45); }

/* Filtros */
.orx-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--color-surface); border: 1px solid var(--orx-line); border-radius: 14px; padding: 12px 14px; }
.orx-seg { display: inline-flex; background: #eef2f5; border-radius: 11px; padding: 3px; }
.orx-seg label { margin: 0; cursor: pointer; }
.orx-seg input { position: absolute; opacity: 0; pointer-events: none; }
.orx-seg span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 9px; font-weight: 600; font-size: .8rem; color: var(--orx-mute); transition: background .15s, color .15s; white-space: nowrap; }
.orx-seg input:checked + span { background: #fff; color: var(--orx-ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.orx-seg input[value="ABERTOS"]:checked + span i { color: var(--orx-ab); }
.orx-seg input[value="FECHADOS"]:checked + span i { color: var(--orx-fe); }
.orx-seg input[value="CANCELADOS"]:checked + span i { color: var(--orx-ca); }
.orx-seg input:focus-visible + span { outline: 2px solid var(--color-secondary); }
.orx-inp { position: relative; }
.orx-inp i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #9aa4ae; font-size: .78rem; pointer-events: none; }
.orx-inp input, .orx-inp select, .orx-dates input { border: 1px solid #d6dde4; border-radius: 10px; padding: 7px 10px 7px 30px; font: inherit; font-size: .84rem; background: #fff; color: var(--orx-ink); width: 100%; transition: border-color .15s, box-shadow .15s; }
.orx-inp input:focus, .orx-inp select:focus, .orx-dates input:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(23,159,148,.14); }
.orx-inp.w-num { width: 140px; } .orx-inp.w-parc { width: 170px; } .orx-inp.w-uni { width: 210px; }
.orx-dates { display: inline-flex; align-items: center; gap: 6px; }
.orx-dates input { padding-left: 10px; width: 138px; }
.orx-dates span { color: var(--orx-mute); font-size: .78rem; }
.orx-tb-actions { display: flex; gap: 6px; margin-left: auto; }
.orx-tbtn { height: 34px; min-width: 34px; border-radius: 10px; border: 1px solid #d6dde4; background: #fff; color: var(--orx-mute); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; font: inherit; font-size: .82rem; font-weight: 600; transition: background .15s, color .15s; }
.orx-tbtn:hover { background: var(--orx-soft); color: var(--orx-ink); }
.orx-tbtn.main { background: var(--color-primary); border-color: var(--color-primary); color: #fff; padding: 0 14px; }
.orx-tbtn.main:hover { filter: brightness(1.1); background: var(--color-primary); color: #fff; }

/* Split lista/detalhe */
.orx-split { display: grid; grid-template-columns: minmax(340px, 5fr) 7fr; gap: 16px; align-items: start; }
.orx-panel { background: var(--color-surface); border: 1px solid var(--orx-line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.orx-panel-head { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--orx-line); }
.orx-panel-head span { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--orx-mute); display: inline-flex; align-items: center; gap: 8px; }
.orx-panel-head em { font-style: normal; background: var(--orx-soft); border-radius: 20px; padding: 1px 9px; color: var(--orx-ink); letter-spacing: 0; }
.orx-panel-head small { color: #9aa4ae; font-size: .72rem; }
.orx-list { padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 360px); min-height: 320px; overflow-y: auto; scrollbar-width: thin; }

.orx-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--orx-line); border-left: 4px solid; border-radius: 12px; background: #fff; cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s, background .15s; }
.orx-card.aberto { border-left-color: #f0b35a; } .orx-card.fechado { border-left-color: #4cbb7f; } .orx-card.cancelado { border-left-color: #e58a84; }
.orx-card:hover { box-shadow: 0 10px 22px -14px rgba(0,0,0,.35); transform: translateY(-1px); }
.orx-card.sel { background: #f1f7fb; border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(36,84,123,.16); }
.orx-ini { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: .82rem; font-weight: 800; color: #fff; flex-shrink: 0; background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); }
.orx-ini.lg { width: 54px; height: 54px; border-radius: 15px; font-size: 1.05rem; }
.orx-card-main { flex: 1; min-width: 0; }
.orx-card-l1 { display: flex; align-items: center; gap: 8px; }
.orx-name { font-weight: 700; color: var(--orx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orx-card-l2 { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 4px; font-size: .74rem; color: var(--orx-mute); font-variant-numeric: tabular-nums; }
.orx-card-l2 span { display: inline-flex; align-items: center; gap: 5px; }
.orx-card-l2 i { font-size: .68rem; opacity: .8; }
.orx-old { background: #fff1dc; color: var(--orx-ab); border-radius: 6px; padding: 0 5px; font-size: .66rem; }
.orx-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.orx-tags span { background: #eef4f8; color: #2d5a7b; border-radius: 6px; padding: 1px 7px; font-size: .68rem; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orx-card-val { text-align: right; flex-shrink: 0; }
.orx-card-val b { display: block; color: var(--orx-ink); font-size: .95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.orx-card-val small { color: var(--orx-mute); font-size: .7rem; }

.orx-st { display: inline-flex; align-items: center; gap: 5px; font-size: .62rem; font-weight: 800; letter-spacing: .06em; border-radius: 999px; padding: 2px 8px; flex-shrink: 0; }
.orx-st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.orx-st.aberto { background: #fff4e3; color: var(--orx-ab); }
.orx-st.fechado { background: #e7f6ee; color: var(--orx-fe); }
.orx-st.cancelado { background: #fdecec; color: var(--orx-ca); }
.orx-st.big { font-size: .72rem; padding: 5px 12px; margin-left: auto; }

.orx-empty { text-align: center; padding: 40px 16px; color: var(--orx-mute); }
.orx-empty .ic { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 12px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); }
.orx-empty p { margin: 0 0 16px; line-height: 1.5; }
.orx-empty b { color: var(--orx-ink); }

/* Detalhe */
.orx-detail { position: sticky; top: 10px; }
.orx-det-head { display: flex; align-items: center; gap: 14px; padding: 18px 18px 14px; min-height: 86px; }
.orx-det-ph { color: #9aa4ae; font-weight: 600; display: flex; align-items: center; gap: 10px; margin: 0 auto; }
.orx-det-info { min-width: 0; flex: 1; }
.orx-det-name { font-size: 1.15rem; font-weight: 800; color: var(--orx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orx-ini.aberto { background: linear-gradient(135deg, #f0a43a, #d97706); }
.orx-ini.fechado { background: linear-gradient(135deg, #34b27a, #15803d); }
.orx-ini.cancelado { background: linear-gradient(135deg, #e5736b, #b91c1c); }
.orx-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 14px; border-bottom: 1px solid var(--orx-line); }
.orx-sp { flex: 1; }
.orx-abtn { height: 34px; border-radius: 10px; border: 1px solid #d6dde4; background: #fff; color: var(--orx-ink); padding: 0 12px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: background .15s, border-color .15s, color .15s, filter .15s; }
.orx-abtn:hover:not(:disabled) { background: var(--orx-soft); }
.orx-abtn.go { background: linear-gradient(135deg, var(--color-secondary), #12877e); border-color: transparent; color: #fff; box-shadow: 0 8px 16px -10px rgba(23,159,148,.8); }
.orx-abtn.go:hover:not(:disabled) { filter: brightness(1.08); background: linear-gradient(135deg, var(--color-secondary), #12877e); }
.orx-abtn.warn:hover:not(:disabled) { color: var(--orx-ab); border-color: #f5d3a3; background: #fffaf2; }
.orx-abtn.danger { width: 34px; padding: 0; justify-content: center; }
.orx-abtn.danger:hover:not(:disabled) { color: var(--orx-ca); border-color: #f3c3bd; background: #fff5f4; }
.orx-abtn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }

.orx-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--orx-line); background: #fbfcfd; }
.orx-tabs button { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 11px 10px; font: inherit; font-size: .8rem; font-weight: 700; color: #9aa4ae; display: inline-flex; align-items: center; gap: 7px; cursor: default; }
.orx-tabs button span { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: .66rem; background: #e3e8ed; color: #fff; }
.orx-tabs button.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.orx-tabs button.active span { background: var(--color-primary); }
.orx-tabs em { font-style: normal; background: #e8f0f6; color: var(--color-primary); border-radius: 20px; padding: 0 7px; font-size: .7rem; }
.orx-items { max-height: calc(100vh - 470px); min-height: 180px; overflow-y: auto; }
.orx-table { width: 100%; border-collapse: collapse; }
.orx-table th { position: sticky; top: 0; background: #fff; text-align: left; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--orx-mute); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--orx-line); white-space: nowrap; }
.orx-table td { padding: 11px 14px; border-bottom: 1px solid #f0f2f4; vertical-align: middle; color: var(--orx-ink); }
.orx-table tbody tr:hover td { background: #fafbfc; }
.orx-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.orx-code { font-family: Consolas, monospace; font-size: .76rem; background: var(--orx-soft); border-radius: 6px; padding: 2px 6px; color: var(--orx-mute); }
.orx-proc { font-weight: 600; }
.orx-sub { font-size: .72rem; color: var(--orx-mute); margin-top: 2px; }
.orx-prof { color: var(--orx-mute); font-size: .8rem; }
.orx-tot { font-weight: 700; color: var(--orx-fe) !important; }
.orx-td-empty { text-align: center; color: #9aa4ae; padding: 34px 14px !important; }
.orx-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: linear-gradient(90deg, #f4f8fb, #eef7f6); border-top: 1px solid var(--orx-line); }
.orx-foot span { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--orx-mute); }
.orx-foot b { font-size: 1.35rem; color: var(--color-primary); font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
    .orx-split { grid-template-columns: 1fr; }
    .orx-detail { position: static; }
    .orx-list, .orx-items { max-height: none; }
    .orx-tb-actions { margin-left: 0; }
}
@media (max-width: 600px) {
    .orx-hero { padding: 16px; }
    .orx-inp.w-num, .orx-inp.w-parc, .orx-inp.w-uni { width: 100%; }
    .orx-card-val b { font-size: .85rem; }
}

/* Status extra (vendas) e cartões com borda por status */
.orx-st.finalizado { background: #e8effa; color: #1d4ed8; }
.orx-card.finalizado { border-left-color: #6d95e0; }
.orx-ini.finalizado { background: linear-gradient(135deg, #5b8def, #1d4ed8); }
.orx-card.sel .orx-ini:not(.lg) { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(36,84,123,.35); }
.orx-tags span.t { background: var(--orx-soft); color: var(--orx-mute); }

/* ================= VENDAS — complementos do Layout Padrão (vdx-*) ================= */
.vdx-more { position: relative; }
.vdx-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 220px; background: #fff; border: 1px solid var(--orx-line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.28); padding: 6px; }
.vdx-more.open .vdx-menu { display: block; }
.vdx-menu button { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; text-align: left; font: inherit; font-size: .85rem; color: var(--orx-ink); padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.vdx-menu button:hover { background: var(--orx-soft); }
.vdx-menu i { width: 16px; text-align: center; color: var(--color-secondary); }
.vdx-toolbar .orx-seg { flex-wrap: wrap; }
@media (max-width: 600px) { .vdx-menu { left: 0; right: auto; } }
.vdx-adv { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--orx-line); }
.orx-tbtn.on { background: #e8f0f6; border-color: #b9cfe0; color: var(--color-primary); }
.vdx-det-chips { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-left: auto; }
.vdx-det-chips .orx-st.big { margin-left: 0; }
.vdx-rec { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; display: inline-flex; align-items: center; gap: 5px; }
.vdx-rec.pago { background: #e7f6ee; color: var(--orx-fe); }
.vdx-rec.pend { background: #fff4e3; color: var(--orx-ab); }
.vdx-rec-sm { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.vdx-rec-sm.pago { color: var(--orx-fe) !important; }
.vdx-rec-sm.pend { color: var(--orx-ab) !important; }

/* ================= CADASTRO DE USUÁRIOS: faixa de modo (novo x editando) ================= */
.usu-modo { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 10px 14px; border-radius: 10px; border: 1px solid; }
.usu-modo-txt { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.usu-modo-txt i { font-size: 1.05rem; }
.usu-modo.novo { background: #eef8f6; border-color: #bfe5dc; color: #11645d; }
.usu-modo.editando { background: #fff8e6; border-color: #f2d999; color: #7a5a14; }
.usu-modo-login { font-weight: 400; opacity: .8; }
.usu-modo-btn { border: none; border-radius: 9px; padding: 7px 14px; font: inherit; font-size: .84rem; font-weight: 700; color: #fff; background: var(--color-secondary); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.usu-modo-btn:hover { filter: brightness(1.08); }

/* ================= PERFIL DE ACESSO (pfx-*) ================= */
.pfx .orx-detail .orx-foot { gap: 10px; }
.pfx-editor { padding: 18px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 330px); overflow-y: auto; }
.pfx-top { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.pfx-campo { flex: 1; min-width: 220px; }
.pfx-campo label { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--orx-mute); margin-bottom: 5px; }
.pfx-campo input { width: 100%; padding: 9px 11px; border: 1px solid #d6dde4; border-radius: 10px; font: inherit; font-size: .95rem; font-weight: 600; color: var(--orx-ink); }
.pfx-campo input:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(23,159,148,.14); }
.pfx-chk-inativo { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--orx-mute); padding-bottom: 9px; cursor: pointer; }
.pfx-aviso { background: #fff8e6; color: #7a5a14; border-radius: 10px; padding: 10px 12px; font-size: .84rem; }
.pfx-aviso i { color: #d39b1c; margin-right: 6px; }
.pfx-grupo { border: 1px solid var(--orx-line); border-radius: 12px; overflow: hidden; }
.pfx-grupo-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #fbfcfd; border-bottom: 1px solid var(--orx-line); }
.pfx-grupo-head span { flex: 1; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--orx-mute); }
.pfx-grupo-head button { border: 1px solid #d6dde4; background: #fff; border-radius: 8px; padding: 3px 9px; font: inherit; font-size: .72rem; font-weight: 600; color: var(--orx-mute); cursor: pointer; }
.pfx-grupo-head button:hover { color: var(--color-secondary); border-color: var(--color-secondary); }
.pfx-itens { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; padding: 10px; }
.pfx-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; font-size: .84rem; color: var(--orx-ink); transition: background .12s, border-color .12s; }
.pfx-item:hover { background: var(--orx-soft); }
.pfx-item.on { background: #eef8f6; border-color: #bfe5dc; }
.pfx-item input { width: 16px; height: 16px; accent-color: var(--color-secondary); flex-shrink: 0; }
.pfx-item input:disabled + span { color: var(--orx-mute); }
.orx-card .orx-ini i { font-size: 1rem; }

/* ================= AGENDA — Quadro do dia (agx-*) ================= */
.agx { --agx-ag: #e05a4f; --agx-cf: #e9a23b; --agx-at: #22a06b; --agx-ink: #1f2d3d; --agx-mute: #6b7785; --agx-line: #e6eaef; --agx-soft: #f6f8fa; position: relative; padding-bottom: 80px; }
.agx * { box-sizing: border-box; }

/* Cartão de contexto */
.agx-context { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; background: linear-gradient(120deg, var(--color-primary) 0%, #1c6f86 60%, var(--color-secondary) 100%); color: #fff; border-radius: 16px; padding: 18px 22px; margin-bottom: 16px; box-shadow: 0 10px 30px -12px rgba(36,84,123,.55); position: relative; overflow: hidden; }
.agx-context::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.07); pointer-events: none; }
.agx-avatar { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; letter-spacing: .5px; flex-shrink: 0; }
.agx-ctx-fields { display: flex; flex-wrap: wrap; gap: 12px; flex: 1; min-width: 260px; }
.agx-field { display: flex; flex-direction: column; gap: 3px; min-width: 200px; }
.agx-field label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; font-weight: 600; }
.agx-field select { appearance: none; -webkit-appearance: none; background: rgba(255,255,255,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fff'/%3E%3C/svg%3E") no-repeat right 12px center; border: 1px solid rgba(255,255,255,.3); color: #fff; font: inherit; font-weight: 600; font-size: .92rem; padding: 9px 34px 9px 12px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.agx-field select:hover { background-color: rgba(255,255,255,.22); }
.agx-field select option { color: #222; }
.agx-field select:disabled { cursor: default; opacity: 1; background-image: none; padding-right: 12px; }
.agx-ctx-actions { display: flex; gap: 8px; position: relative; z-index: 1; }
.agx-iconbtn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: grid; place-items: center; font-size: .95rem; transition: background .15s, transform .15s; }
.agx-iconbtn:hover { background: rgba(255,255,255,.25); transform: translateY(-1px); }
.agx-iconbtn.back { width: auto; padding: 0 14px; gap: 8px; display: inline-flex; align-items: center; font: inherit; font-size: .85rem; font-weight: 600; }

/* Faixa de datas */
.agx-strip-wrap { background: var(--color-surface); border: 1px solid var(--agx-line); border-radius: 16px; padding: 14px 16px 12px; margin-bottom: 16px; }
.agx-strip-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.agx-month { position: relative; }
.agx-month-btn { background: none; border: none; font: inherit; font-size: 1.15rem; font-weight: 700; color: var(--agx-ink); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 8px; text-transform: capitalize; white-space: nowrap; }
.agx-month-btn:hover { background: var(--agx-soft); }
.agx-month-btn i { font-size: .75rem; color: var(--agx-mute); }
.agx-nav { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--agx-line); background: #fff; color: var(--agx-ink); cursor: pointer; display: grid; place-items: center; }
.agx-nav:hover { background: var(--agx-soft); }
.agx-today { margin-left: auto; border: 1px solid var(--agx-line); background: #fff; border-radius: 9px; padding: 6px 14px; font: inherit; font-size: .82rem; font-weight: 600; color: var(--color-primary); cursor: pointer; }
.agx-today:hover { background: var(--agx-soft); }
.agx-strip { display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth; padding: 2px 2px 8px; scrollbar-width: thin; }
.agx-day { flex: 0 0 68px; border: 1px solid var(--agx-line); border-radius: 14px; background: #fff; padding: 8px 4px 9px; text-align: center; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; user-select: none; }
.agx-day:hover { transform: translateY(-2px); box-shadow: 0 6px 14px -8px rgba(0,0,0,.25); }
.agx-day .wd { font-size: .64rem; font-weight: 700; letter-spacing: .08em; color: var(--agx-mute); }
.agx-day .dn { font-size: 1.3rem; font-weight: 700; color: var(--agx-ink); line-height: 1.3; font-variant-numeric: tabular-nums; }
.agx-day .bar { height: 4px; border-radius: 4px; background: #edf0f3; margin: 4px 10px 4px; overflow: hidden; }
.agx-day .bar span { display: block; height: 100%; border-radius: 4px; }
.agx-day .cap { font-size: .64rem; color: var(--agx-mute); font-weight: 600; min-height: 12px; font-variant-numeric: tabular-nums; }
.agx-day.weekend { background: var(--agx-soft); }
.agx-day.past .dn { color: #9aa4ae; }
.agx-day.today { border-color: var(--color-secondary); box-shadow: inset 0 0 0 1px var(--color-secondary); }
.agx-day.today .wd { color: var(--color-secondary); }
.agx-day.sel { background: var(--color-primary); border-color: var(--color-primary); box-shadow: 0 8px 18px -8px rgba(36,84,123,.7); }
.agx-day.sel .wd, .agx-day.sel .dn, .agx-day.sel .cap { color: #fff; }
.agx-day.sel .bar { background: rgba(255,255,255,.25); }

/* Popover do mês */
.agx-pop { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 320px; background: #fff; border: 1px solid var(--agx-line); border-radius: 14px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.28); padding: 14px; }
.agx-month.open .agx-pop { display: block; }
.agx-pop-wd { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; font-size: .66rem; font-weight: 700; color: var(--agx-mute); margin-bottom: 4px; }
#agenda-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; }
.agx-pc { text-align: center; padding: 6px 0 4px; border-radius: 8px; font-size: .85rem; font-weight: 600; color: var(--agx-ink); cursor: pointer; position: relative; font-variant-numeric: tabular-nums; }
.agx-pc:hover { background: var(--agx-soft); }
.agx-pc.fora { color: #cfd5db; cursor: default; background: none; }
.agx-pc.hoje { color: var(--color-secondary); box-shadow: inset 0 0 0 1px var(--color-secondary); }
.agx-pc.sel { background: var(--color-primary); color: #fff; }
.agx-pc .pt { display: block; width: 5px; height: 5px; border-radius: 50%; margin: 2px auto 0; background: transparent; }

/* Painel do dia */
.agx-board-wrap { display: grid; grid-template-columns: 230px 1fr; gap: 16px; align-items: start; }
.agx-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.agx-hero-date { display: flex; align-items: baseline; gap: 12px; }
.agx-hero-date .big { font-size: 2.6rem; font-weight: 800; color: var(--agx-ink); line-height: 1; font-variant-numeric: tabular-nums; }
.agx-hero-date .wk { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--color-secondary); }
.agx-hero-date .mo { font-size: .95rem; color: var(--agx-mute); }
.agx-kpis { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.agx-kpi { background: #fff; border: 1px solid var(--agx-line); border-radius: 12px; padding: 7px 12px; display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--agx-mute); }
.agx-kpi b { font-size: 1.05rem; color: var(--agx-ink); font-variant-numeric: tabular-nums; }
.agx-kpi i.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* Coluna de horários livres */
.agx-slots { background: var(--color-surface); border: 1px solid var(--agx-line); border-radius: 16px; padding: 14px; position: sticky; top: 10px; max-height: calc(100vh - 40px); overflow-y: auto; }
.agx-col-title { display: flex; align-items: center; justify-content: space-between; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--agx-mute); margin-bottom: 10px; }
.agx-col-title .n { background: var(--agx-soft); border-radius: 20px; padding: 1px 9px; font-size: .72rem; color: var(--agx-ink); }
#agenda-horarios-dia { display: flex; flex-direction: column; gap: 6px; }
.agx-slot { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px dashed #c9d3dc; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; user-select: none; }
.agx-slot:hover { border-color: var(--color-secondary); background: #f1fbfa; border-style: solid; }
.agx-slot .h { font-weight: 700; font-size: .92rem; color: var(--agx-ink); font-variant-numeric: tabular-nums; }
.agx-slot .t { font-size: .64rem; font-weight: 700; letter-spacing: .06em; color: var(--color-secondary); background: #e6f6f4; border-radius: 6px; padding: 1px 6px; }
.agx-slot .c { margin-left: auto; font-size: .7rem; color: var(--agx-mute); font-variant-numeric: tabular-nums; }
.agx-slot .add { color: var(--color-secondary); opacity: 0; transition: opacity .15s; font-size: .8rem; }
.agx-slot:hover .add { opacity: 1; }
.agx-slot.off { cursor: not-allowed; background: var(--agx-soft); border-style: solid; border-color: transparent; opacity: .6; }
.agx-slot.off .h { color: #98a2ad; text-decoration: line-through; }
.agx-slot.off .t { background: #eceff2; color: #98a2ad; }
.agx-slot.off:hover { background: var(--agx-soft); border-color: transparent; }
.agx-slots-empty { font-size: .8rem; color: var(--agx-mute); text-align: center; padding: 14px 4px; line-height: 1.5; }
.agx-hint { font-size: .68rem; color: var(--agx-mute); margin-top: 10px; text-align: center; }

/* Kanban */
#agenda-lista-dia { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.agx-col { background: var(--agx-soft); border: 1px solid var(--agx-line); border-radius: 16px; padding: 12px; min-height: 360px; transition: background .15s, border-color .15s; }
.agx-col .agx-col-title { padding: 2px 4px 8px; border-bottom: 3px solid; margin-bottom: 12px; }
.agx-col.drop-ok { background: #eef8f6; border-color: var(--color-secondary); border-style: dashed; }
.agx-col-empty { text-align: center; color: #a4adb7; font-size: .8rem; padding: 26px 8px; border: 1px dashed #d7dde3; border-radius: 12px; }
.agx-card { background: #fff; border: 1px solid var(--agx-line); border-radius: 13px; padding: 12px; margin-bottom: 10px; cursor: grab; position: relative; transition: box-shadow .15s, transform .15s, border-color .15s; }
.agx-card:hover { box-shadow: 0 10px 22px -14px rgba(0,0,0,.35); transform: translateY(-1px); }
.agx-card.sel { border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(36,84,123,.18); }
.agx-card.dragging { opacity: .45; }
.agx-card.done { cursor: default; }
.agx-card-top { display: flex; align-items: center; gap: 10px; }
.agx-time { font-size: .78rem; font-weight: 800; color: var(--agx-ink); background: var(--agx-soft); border-radius: 7px; padding: 3px 7px; font-variant-numeric: tabular-nums; }
.agx-ini { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: #fff; flex-shrink: 0; }
.agx-name { font-weight: 700; font-size: .92rem; color: var(--agx-ink); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.agx-meta { font-size: .74rem; color: var(--agx-mute); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.agx-meta span { display: inline-flex; align-items: center; gap: 5px; }
.agx-obs { font-size: .74rem; color: #7a6a3a; background: #fff8e6; border-radius: 8px; padding: 6px 8px; margin-top: 8px; }
.agx-card-actions { display: flex; gap: 6px; margin-top: 10px; align-items: center; }
.agx-go { flex: 1; border: none; border-radius: 9px; padding: 7px 10px; font: inherit; font-size: .76rem; font-weight: 700; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: filter .15s; }
.agx-go:hover { filter: brightness(1.08); }
.agx-mini { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--agx-line); background: #fff; color: var(--agx-mute); cursor: pointer; display: grid; place-items: center; font-size: .78rem; }
.agx-mini:hover { background: var(--agx-soft); color: var(--agx-ink); }
.agx-mini.danger:hover { color: var(--color-danger); border-color: #f3c3bd; background: #fff5f4; }
.agx-done-tag { font-size: .72rem; font-weight: 700; color: var(--agx-at); display: inline-flex; align-items: center; gap: 6px; }

/* Estado vazio (sem parceiro/profissional) */
.agx-onboard { grid-column: 1 / -1; background: #fff; border: 1px dashed #cdd6de; border-radius: 18px; padding: 44px 20px; text-align: center; }
.agx-onboard .ic { width: 66px; height: 66px; border-radius: 20px; margin: 0 auto 14px; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); }
.agx-onboard h3 { margin: 0 0 6px; color: var(--agx-ink); font-size: 1.15rem; }
.agx-onboard p { margin: 0 0 20px; color: var(--agx-mute); font-size: .9rem; }
.agx-steps { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.agx-step { display: flex; align-items: center; gap: 10px; background: var(--agx-soft); border-radius: 12px; padding: 10px 16px; font-size: .85rem; font-weight: 600; color: var(--agx-ink); }
.agx-step .k { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; background: #dfe6ec; color: var(--agx-mute); }
.agx-step.ok .k { background: var(--agx-at); color: #fff; }

/* Botão flutuante */
.agx-fab { position: fixed; right: 28px; bottom: 28px; z-index: 900; border: none; border-radius: 18px; padding: 15px 22px; background: linear-gradient(135deg, var(--color-secondary), #12877e); color: #fff; font: inherit; font-weight: 700; font-size: .92rem; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; box-shadow: 0 14px 30px -10px rgba(23,159,148,.75); transition: transform .15s, box-shadow .15s; }
.agx-fab:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -10px rgba(23,159,148,.85); }
.agx-fab i { font-size: 1.05rem; }

/* Formulário como painel lateral */
#modal-agendamento.agx-drawer { justify-content: flex-end !important; align-items: stretch !important; background: rgba(15,30,45,.45) !important; backdrop-filter: blur(2px); }
.agx-drawer-panel { background: var(--color-surface); width: 100%; max-width: 460px; height: 100%; display: flex; flex-direction: column; box-shadow: -20px 0 40px -20px rgba(0,0,0,.4); animation: agxSlide .22s ease-out; }
@keyframes agxSlide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.agx-drawer-head { padding: 20px 22px; border-bottom: 1px solid var(--agx-line); display: flex; align-items: center; justify-content: space-between; }
.agx-drawer-head span { font-size: 1.1rem; font-weight: 700; color: var(--agx-ink); display: inline-flex; align-items: center; gap: 10px; }
.agx-drawer-head span i { color: var(--color-secondary); }
.agx-drawer-head button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--agx-line); background: #fff; font-size: 1.1rem; cursor: pointer; color: var(--agx-mute); }
.agx-drawer-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.agx-drawer-body label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--agx-mute); margin-bottom: 5px; }
.agx-drawer-body .form-control { width: 100%; padding: 10px 12px; border: 1px solid #d6dde4; border-radius: 10px; background: #fff; font: inherit; font-size: .92rem; transition: border-color .15s, box-shadow .15s; }
.agx-drawer-body .form-control:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(23,159,148,.15); }
.agx-drawer-body .row { margin-bottom: 16px; }
.agx-drawer-body .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.agx-drawer-foot { padding: 16px 22px; border-top: 1px solid var(--agx-line); display: flex; justify-content: flex-end; gap: 10px; background: var(--agx-soft); }
#ag-busca-cliente { border-radius: 10px; box-shadow: 0 12px 24px -12px rgba(0,0,0,.3); }

@media (max-width: 1100px) {
    .agx-board-wrap { grid-template-columns: 1fr; }
    .agx-slots { position: static; max-height: none; }
    #agenda-horarios-dia { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 760px) {
    #agenda-lista-dia { grid-template-columns: 1fr; }
    .agx-kpis { margin-left: 0; }
    .agx-field { min-width: 100%; }
    .agx-fab span { display: none; }
}
.agx-strip { position: relative; }
.agx.agx-vazio .agx-slots, .agx.agx-vazio .agx-hero { display: none; }
.agx.agx-vazio .agx-board-wrap { grid-template-columns: 1fr; }
.agx.agx-vazio #agenda-lista-dia { grid-template-columns: 1fr; }

/* ================= CLÍNICO — Agenda, Atendimento, Consultório e Prontuário (cl-*) ================= */
.cl-modal { --orx-ink: #1f2d3d; --orx-mute: #6b7785; --orx-line: #e6eaef; --orx-soft: #f6f8fa; --orx-ab: #d97706; --orx-fe: #15803d; --orx-ca: #b91c1c; }
.cl { --cl-ag: #64748b; --cl-aw: #d97706; --cl-em: #0e7490; --cl-fin: #15803d; --cl-can: #b91c1c; --cl-fal: #9f1239; }
.orx-inp.w-med { width: 240px; }
.cl-mute { color: var(--orx-mute, #6b7785); font-size: .78rem; }

/* chips de situação e tipo */
.cl-st { display: inline-flex; align-items: center; gap: 5px; font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; white-space: nowrap; flex-shrink: 0; background: #eef1f4; color: #64748b; }
.cl-st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cl-st.aw { background: #fff4e3; color: #d97706; }
.cl-st.em { background: #e0f4f8; color: #0e7490; }
.cl-st.fin { background: #e7f6ee; color: #15803d; }
.cl-st.can { background: #fdecec; color: #b91c1c; }
.cl-st.fal { background: #fde8ef; color: #9f1239; }
.cl-st.big { font-size: .72rem; padding: 5px 12px; margin-left: auto; }
.cl-tp { display: inline-flex; align-items: center; font-size: .66rem; font-weight: 700; border-radius: 6px; padding: 1px 7px; background: #eef4f8; color: #2d5a7b; white-space: nowrap; }
.cl-tp.ret { background: #f1ecfb; color: #6d28d9; }
.orx-card.ag { border-left-color: #94a3b8; } .orx-card.aw { border-left-color: #f0b35a; } .orx-card.em { border-left-color: #22a3be; }
.orx-card.fin { border-left-color: #4cbb7f; } .orx-card.can { border-left-color: #e58a84; } .orx-card.fal { border-left-color: #e0789b; }
.cl-espera { color: #d97706; font-weight: 700; }
.cl-espera.alta { color: #b91c1c; }

/* Agenda (mesmo modelo da agenda da Venda, agx-*) — ids próprios para não colidir com a agenda da Venda */
#cla-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; }
#cla-horarios { display: flex; flex-direction: column; gap: 6px; }
#cla-lista { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.agx.agx-vazio #cla-lista { grid-template-columns: 1fr; }
.cl-agx .agx-card-actions .agx-done-tag { flex: 1; }
.cl-agx .agx-done-tag { white-space: nowrap; }
.cl-f .orx-seg label { display: inline-block; text-transform: none; letter-spacing: 0; font-size: inherit; color: inherit; margin: 0; }
@media (max-width: 1400px) { #cla-lista { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 1100px) { #cla-horarios { flex-direction: row; flex-wrap: wrap; } }
@media (max-width: 760px) { #cla-lista { grid-template-columns: 1fr; } }

/* Janela como painel lateral (agendamento) */
.cl-modal.lado { justify-content: flex-end; align-items: stretch; padding: 0; backdrop-filter: blur(2px); }
.cl-modal.lado .cl-modal-box { height: 100%; border-radius: 0; display: flex; flex-direction: column; animation: agxSlide .22s ease-out; }
.cl-modal.lado .cl-modal-head { border-radius: 0; }
.cl-modal.lado .cl-modal-body { flex: 1; overflow-y: auto; }
.cl-modal.lado .cl-modal-foot { border-radius: 0; }
.cl-modal.lado .cl-form { grid-template-columns: 1fr 1fr; }

/* Atendimento: detalhe */
.cl-det { padding: 16px 18px 18px; }
.cl-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.cl-info .full { grid-column: 1 / -1; }
.cl-info > div > span { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--orx-mute); margin-bottom: 3px; }
.cl-info > div > b { color: var(--orx-ink); font-weight: 600; }
.cl-pre { white-space: pre-wrap; }
.cl-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.cl-step { border: 1px dashed #d6dde4; border-radius: 12px; padding: 10px 12px; color: #9aa4ae; }
.cl-step i { font-size: .9rem; }
.cl-step span { display: block; font-size: .7rem; font-weight: 700; margin: 4px 0 2px; }
.cl-step b { font-size: 1.05rem; }
.cl-step.ok { border-style: solid; border-color: #bfe5cf; background: #f3fbf6; color: var(--orx-fe); }

/* Consultório: barra de comandos + fila */
.cl-cmd { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; background: var(--color-surface); border: 1px solid var(--orx-line); border-radius: 14px; padding: 10px 12px; }
.cl-cbtn { height: 38px; border-radius: 11px; border: 1px solid #d6dde4; background: #fff; color: var(--orx-ink); padding: 0 14px; font: inherit; font-weight: 700; font-size: .84rem; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background .15s, filter .15s; }
.cl-cbtn:hover:not(:disabled) { background: var(--orx-soft); }
.cl-cbtn.main { background: linear-gradient(135deg, var(--color-secondary), #12877e); border-color: transparent; color: #fff; box-shadow: 0 8px 16px -10px rgba(23,159,148,.8); }
.cl-cbtn.main:hover:not(:disabled) { filter: brightness(1.08); background: linear-gradient(135deg, var(--color-secondary), #12877e); }
.cl-cbtn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.cl-cmd-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.cl-cmd-pac.on { cursor: pointer; user-select: none; }
.cl-cmd-pac.on:hover { border-color: var(--color-secondary); }
.cl-cmd-pac { margin-left: 0; display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 4px 6px; min-height: 38px; border-radius: 11px; background: var(--orx-soft); color: #9aa4ae; font-weight: 600; font-size: .84rem; }
.cl-cmd-pac > i { margin-left: 8px; }
.cl-cmd-pac.on { background: #eef6fb; color: var(--orx-ink); border: 1px solid #cfe2ef; }
.cl-cmd-pac small { display: block; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--orx-mute); }
.cl-cmd-pac b { font-size: .95rem; color: var(--color-primary); }
.cl-cmd-pac .orx-ini { width: 32px; height: 32px; border-radius: 10px; font-size: .74rem; }
.cl-fila { max-height: calc(100vh - 400px); min-height: 280px; overflow-y: auto; }
.cl-tab tbody tr { cursor: pointer; }
.cl-tab tbody tr td:first-child { border-left: 4px solid transparent; }
.cl-tab tbody tr.st-aw td:first-child { border-left-color: #f0b35a; }
.cl-tab tbody tr.st-em td:first-child { border-left-color: #22a3be; }
.cl-tab tbody tr.st-fin td:first-child { border-left-color: #4cbb7f; }
.cl-tab tbody tr.st-ag td:first-child { border-left-color: #cbd5e1; }
.cl-tab tbody tr.sel td { background: #eef6fb !important; }
.cl-hora { font-weight: 800; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.cl-pnome { display: flex; align-items: center; gap: 10px; }
.cl-pnome .orx-ini { width: 34px; height: 34px; border-radius: 10px; font-size: .74rem; }
.cl-pnome b { display: block; color: var(--orx-ink); }
.cl-pnome small { display: block; color: var(--orx-mute); font-size: .72rem; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Prontuário */
.cl-hero-ini { font-size: 1.05rem; font-weight: 800; }
.cl-hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cl-pac-hero .cl-tp { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.cl-pac-hero .cl-st { background: #fff; }
.cl-ant { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 12px 14px 14px; }
.cl-f label { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--orx-mute); margin-bottom: 5px; }
.cl-f textarea, .cl-f input, .cl-f select { width: 100%; border: 1px solid #d6dde4; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: .86rem; color: var(--orx-ink); background: #fff; resize: vertical; transition: border-color .15s, box-shadow .15s; }
.cl-f textarea:focus, .cl-f input:focus, .cl-f select:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(23,159,148,.14); }
.cl-f textarea[readonly] { background: #f6f8fa; color: #4b5563; }
.cl-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr); gap: 16px; align-items: stretch; }
.cl-evo-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.cl-evo-body textarea { flex: 1; min-height: 360px; width: 100%; border: 1px solid #d6dde4; border-radius: 12px; padding: 14px 16px; font: inherit; font-size: .92rem; line-height: 1.6; color: var(--orx-ink); resize: vertical; background: #fff; }
.cl-evo-body textarea:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(23,159,148,.14); }
.cl-evo-body textarea[readonly] { background: #f6f8fa; }
/* Editor de evolução com formatação */
.cl-rte { flex: 1; display: flex; flex-direction: column; border: 1px solid #d6dde4; border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.cl-rte:focus-within { border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(23,159,148,.14); }
.cl-rte-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid #e6eaef; background: #fbfcfd; border-radius: 12px 12px 0 0; flex-wrap: wrap; }
.cl-rte-bar button { height: 32px; min-width: 32px; border: none; background: none; border-radius: 8px; cursor: pointer; color: #2b3a4a; font: inherit; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: 2px; padding: 0 6px; position: relative; }
.cl-rte-bar button:hover { background: #eef2f5; }
.cl-rte-bar button.on { background: #e3eef6; color: var(--color-primary); }
.cl-rte-bar b { font-weight: 800; }
.cl-rte-it { font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; }
.cl-rte-tx { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.cl-rte-tx sub { font-size: .62rem; text-decoration: none; display: inline-block; margin-left: -1px; }
.cl-rte-a { font-weight: 700; line-height: 1; margin-bottom: 4px; }
.cl-rte-sep { width: 1px; height: 20px; background: #e1e6eb; margin: 0 6px; }
.cl-rte-cor { position: relative; display: inline-flex; align-items: center; }
.cl-rte-cor > button[data-cmd] { flex-direction: column; padding-top: 2px; }
.cl-rte-barra { position: absolute; left: 7px; right: 7px; bottom: 5px; height: 3px; border-radius: 2px; }
.cl-rte-seta { min-width: 18px !important; padding: 0 2px !important; color: #9aa4ae !important; font-size: .62rem !important; }
.cl-rte-pal { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; background: #fff; border: 1px solid #e6eaef; border-radius: 10px; box-shadow: 0 14px 30px -12px rgba(0,0,0,.3); padding: 8px; gap: 6px; }
.cl-rte-cor.open .cl-rte-pal { display: flex; }
.cl-rte-pal button { width: 24px !important; min-width: 24px !important; height: 24px !important; border-radius: 6px !important; border: 1px solid rgba(0,0,0,.12) !important; padding: 0 !important; }
.cl-rte-pal button:hover { transform: scale(1.12); }
/* Menus de fonte e tamanho */
.cl-rte-bar .cl-rte-ddbtn { min-width: 132px !important; justify-content: space-between !important; gap: 8px !important; padding: 0 8px !important; border: 1px solid #dfe5eb !important; background: #fff !important; color: #2b3a4a !important; font-size: .82rem !important; height: 30px !important; }
.cl-rte-bar .cl-rte-ddbtn.cl-rte-tam { min-width: 62px !important; }
.cl-rte-bar .cl-rte-ddbtn:hover { border-color: #c9d3dc !important; }
.cl-rte-bar .cl-rte-ddbtn i { font-size: .6rem; color: #9aa4ae; }
.cl-rte-ddval { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; text-align: left; }
.cl-rte-cor.open .cl-rte-lista { display: flex; flex-direction: column; gap: 0; padding: 5px; min-width: 170px; max-height: 300px; overflow-y: auto; }
.cl-rte-dd[data-tipo="tamanho"] .cl-rte-lista { min-width: 90px; }
.cl-rte-bar .cl-rte-lista button { width: 100% !important; height: auto !important; min-height: 32px; justify-content: flex-start !important; padding: 5px 10px !important; font-size: .9rem !important; border-radius: 7px !important; border: none !important; }
.cl-rte-bar .cl-rte-lista button:hover { background: #eef2f5 !important; transform: none; }
.cl-rte-area { flex: 1; min-height: 320px; padding: 14px 16px; font-size: 14px; line-height: 1.6; color: var(--orx-ink); outline: none; overflow-y: auto; max-height: 560px; word-wrap: break-word; }
.cl-rte-area.vazio::before { content: attr(data-placeholder); color: #9aa4ae; pointer-events: none; }
.cl-rte-area p { margin: 0 0 6px; }
.cl-hi-txt b, .cl-hi-txt strong { font-weight: 700; }
.cl-evo-foot { gap: 10px; }
.cl-evo-foot span { text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 600; }
.cl-aviso { display: flex; align-items: center; gap: 8px; background: #fff7e8; border: 1px solid #f5d9a8; color: #92580a; border-radius: 10px; padding: 9px 12px; font-size: .82rem; }
.cl-save { font-size: .74rem; font-weight: 600; color: #9aa4ae; }
.cl-save.ok { color: var(--orx-fe); } .cl-save.pend { color: var(--orx-ab); } .cl-save.err { color: var(--orx-ca); } .cl-save.run { color: var(--color-primary); }
.cl-tabs button { cursor: pointer; }
.cl-tabs button span { background: transparent !important; color: inherit; width: auto; height: auto; font-size: .78rem; }
/* 5 abas (Evoluções, Documentos, Receituários, Sol. Exames, Anexos): compactas; em painel estreito somem os ícones */
.cl-hist { container-type: inline-size; }
.cl-tabs { gap: 0; padding: 0 6px; overflow-x: auto; scrollbar-width: none; }
.cl-tabs button { padding: 11px 8px; gap: 6px; white-space: nowrap; flex-shrink: 0; }
@container (max-width: 620px) {
    .cl-tabs button > span { display: none; }
    .cl-tabs { padding: 0 4px; }
    .cl-tabs button { padding: 11px 6px; gap: 5px; font-size: .77rem; }
    .cl-tabs em { padding: 0 6px; }
}
.cl-hist-list { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 520px; min-height: 300px; }
.cl-hi { border: 1px solid var(--orx-line); border-radius: 12px; padding: 10px 12px; background: #fff; cursor: pointer; transition: box-shadow .15s; }
.cl-hi:hover { box-shadow: 0 8px 18px -14px rgba(0,0,0,.35); }
.cl-hi.atual { border-color: #bfe5cf; background: #f6fcf8; }
.cl-tp.cl-atual { background: #e7f6ee; color: #15803d; }
.cl-hi.novo { animation: clNovo 1.6s ease-out; }
@keyframes clNovo { from { box-shadow: 0 0 0 3px rgba(23,159,148,.45); background: #eefaf8; } to { box-shadow: none; } }
.cl-hi-top .cl-hi-h { flex: 0 0 auto; font-size: .72rem; }
.cl-lock { width: 30px; height: 28px; display: grid; place-items: center; color: #b6bec7; font-size: .78rem; }
.cl-aviso button { margin-left: auto; flex-shrink: 0; }
.orx-abtn.cl-mini-txt { height: 28px; padding: 0 10px; font-size: .74rem; }
.cl-hi-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-hi-top b { color: var(--orx-ink); font-variant-numeric: tabular-nums; }
.cl-hi-top .cl-mute { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-hi-seta { color: #9aa4ae; font-size: .7rem; transition: transform .15s; }
.cl-hi.aberto .cl-hi-seta { transform: rotate(180deg); }
.cl-hi-txt { margin-top: 6px; font-size: .84rem; color: #374151; white-space: pre-wrap; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cl-hi.aberto .cl-hi-txt { display: block; -webkit-line-clamp: unset; }
.cl-hi-txt.curto { -webkit-line-clamp: 2; }
.orx-abtn.cl-mini { height: 28px; width: 30px; padding: 0; justify-content: center; text-decoration: none; }
.orx-abtn.cl-mini.danger:hover { color: var(--orx-ca); border-color: #f3c3bd; background: #fff5f4; }
.cl-anx { display: flex; align-items: center; gap: 10px; cursor: default; }
.cl-anx-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 1.05rem; flex-shrink: 0; }
.cl-anx-ic.pdf { background: #fdecec; color: #b91c1c; } .cl-anx-ic.img { background: #e8effa; color: #1d4ed8; }
.cl-anx-main { flex: 1; min-width: 0; }
.cl-anx-main b { display: block; color: var(--orx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-anx-main small { display: block; color: var(--orx-mute); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Janelas do módulo */
.cl-modal { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 9000; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; font-size: .88rem; }
.cl-modal * { box-sizing: border-box; }
.cl-modal-box { background: #fff; border-radius: 16px; width: 100%; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); overflow: visible; }
.cl-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: 16px 16px 0 0; color: #fff; font-weight: 700; background: linear-gradient(120deg, var(--color-primary) 0%, #1c6f86 60%, var(--color-secondary) 100%); }
.cl-modal-head span { display: inline-flex; align-items: center; gap: 9px; }
.cl-x { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); color: #fff; width: 30px; height: 30px; border-radius: 9px; cursor: pointer; }
.cl-modal-body { padding: 16px 18px; }
.cl-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--orx-line); background: #fbfcfd; border-radius: 0 0 16px 16px; }
.cl-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.cl-form .full, .cl-novo .full { grid-column: 1 / -1; }
.cl-pac-sel { display: none; align-items: center; gap: 10px; border: 1px solid #cfe2ef; background: #eef6fb; border-radius: 12px; padding: 8px 10px; }
.cl-pac-sel b { flex: 1; color: var(--color-primary); }
.cl-pac-sel .orx-ini { width: 32px; height: 32px; border-radius: 10px; font-size: .74rem; }
.cl-bp { position: relative; }
.cl-bp-res { display: none; position: absolute; left: 0; right: 0; top: 40px; z-index: 20; background: #fff; border: 1px solid var(--orx-line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.3); max-height: 280px; overflow-y: auto; padding: 5px; }
.cl-bp-res.fixo { position: static; box-shadow: none; margin-top: 8px; max-height: 360px; }
.cl-bp-res button { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; border-radius: 9px; padding: 7px 8px; text-align: left; font: inherit; cursor: pointer; }
.cl-bp-res button:hover { background: var(--orx-soft); }
.cl-bp-res button .orx-ini { width: 32px; height: 32px; border-radius: 10px; font-size: .72rem; }
.cl-bp-res button b { display: block; color: var(--orx-ink); font-size: .86rem; }
.cl-bp-res button small { display: block; color: var(--orx-mute); font-size: .72rem; }
.cl-bp-vazio { padding: 12px; color: var(--orx-mute); text-align: center; }
.cl-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--color-secondary); font-weight: 700; font-size: .8rem; background: none; border: none; cursor: pointer; text-decoration: none; padding: 0; font-family: inherit; }
.cl-pac-sel .cl-link { margin-top: 0; }
.cl-novo { grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 10px; padding: 12px; border: 1px dashed #cfd8e1; border-radius: 12px; background: #fbfcfd; }
.cl-check { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; background: #f3fbf6; border: 1px solid #bfe5cf; border-radius: 12px; padding: 10px 12px; cursor: pointer; margin: 0; }
.cl-check input { width: 18px; height: 18px; }
.cl-doc-tipos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cl-doc-tipos label { margin: 0; cursor: pointer; }
.cl-doc-tipos input { position: absolute; opacity: 0; pointer-events: none; }
.cl-doc-tipos span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid #d6dde4; border-radius: 10px; font-weight: 600; font-size: .8rem; color: var(--orx-mute); background: #fff; }
.cl-doc-tipos input:checked + span { border-color: var(--color-secondary); background: #eefaf8; color: #0f766e; box-shadow: 0 0 0 2px rgba(23,159,148,.14); }
/* Prescrição de medicamentos (estilo Memed) */
.cl-mm { border: 1px solid #cfe2ef; background: #f7fbfe; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cl-mm-busca { position: relative; }
.cl-mm-busca .orx-inp input { padding-top: 11px; padding-bottom: 11px; font-size: .92rem; }
.cl-mm-busca .orx-inp i { color: var(--color-secondary); font-size: .9rem; }
.cl-mm-res { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: #fff; border: 1px solid var(--orx-line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.3); max-height: 340px; overflow-y: auto; padding: 5px; }
.cl-mm-op { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 9px; padding: 8px 10px; font: inherit; cursor: pointer; }
.cl-mm-op:hover, .cl-mm-op.ativo { background: #eef6fb; }
.cl-mm-op.fora { opacity: .62; }
.cl-mm-op1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .9rem; color: var(--orx-ink); }
.cl-mm-op1 > span:not(.cl-mm-tag) { color: var(--orx-mute); }
.cl-mm-op2 { display: block; font-size: .72rem; color: var(--orx-mute); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-mm-op.livre { color: var(--color-secondary); font-weight: 700; border-top: 1px solid var(--orx-line); border-radius: 0 0 9px 9px; margin-top: 4px; }
.cl-mm-tag { font-size: .62rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; border-radius: 6px; padding: 1px 6px; background: #eef1f4; color: #64748b; }
.cl-mm-tag.t-generico { background: #e7f6ee; color: #15803d; }
.cl-mm-tag.t-similar { background: #eef4f8; color: #2d5a7b; }
.cl-mm-tag.t-novo { background: #f1ecfb; color: #6d28d9; }
.cl-mm-tag.aviso { background: #fff4e3; color: #b45309; }
.cl-mm-tag.alerta { background: #1f2937; color: #fff; }
.cl-mm-itens { display: flex; flex-direction: column; gap: 6px; }
.cl-mm-vazio { color: #9aa4ae; font-size: .82rem; text-align: center; padding: 8px; }
.cl-mm-via { font-size: .7rem; font-weight: 800; letter-spacing: .1em; color: var(--color-primary); margin: 6px 0 0 4px; }
.cl-mm-item { display: flex; gap: 8px; background: #fff; border: 1px solid var(--orx-line); border-radius: 11px; padding: 9px 10px; }
.cl-mm-n { font-weight: 800; color: var(--color-primary); min-width: 22px; padding-top: 6px; }
.cl-mm-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cl-mm-item-top { display: flex; align-items: center; gap: 8px; }
.cl-mm-nome { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .9rem; }
.cl-mm-nome > span:not(.cl-mm-tag) { color: var(--orx-mute); font-size: .82rem; }
.cl-mm-qtd { width: 110px; }
.cl-mm-viasel { width: 120px; }
.cl-mm-qtd, .cl-mm-viasel, .cl-mm-poso { border: 1px solid #d6dde4; border-radius: 8px; padding: 6px 9px; font: inherit; font-size: .84rem; color: var(--orx-ink); background: #fff; }
.cl-mm-qtd:focus, .cl-mm-viasel:focus, .cl-mm-poso:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(23,159,148,.14); }
.cl-mm-item-pe { display: flex; align-items: center; gap: 12px; font-size: .74rem; }
.cl-mm-cont { display: inline-flex; align-items: center; gap: 5px; margin: 0; cursor: pointer; color: var(--orx-ink); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .76rem; }
.cl-mm-alerta { font-size: .76rem; color: #92400e; background: #fff7e8; border: 1px solid #f5d9a8; border-radius: 8px; padding: 5px 9px; }
/* dentro de .cl-f, os campos ganham width:100% / label maiúsculo: aqui não */
.cl-f .cl-mm input.cl-mm-qtd { width: 120px; flex: 0 0 120px; }
.cl-f .cl-mm select.cl-mm-viasel { width: 130px; flex: 0 0 130px; padding: 6px 8px; }
.cl-f .cl-mm input.cl-mm-poso { width: 100%; }
.cl-f .cl-mm .cl-mm-busca input { width: 100%; padding-left: 36px; }
.cl-f .cl-mm label.cl-mm-cont { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--orx-ink); text-transform: none; letter-spacing: 0; font-size: .76rem; font-weight: 600; }
.cl-f .cl-mm label.cl-mm-cont input { width: 15px; height: 15px; padding: 0; margin: 0; flex: 0 0 auto; }
.cl-mm-nome b { white-space: nowrap; }

/* Receituário com editor + receitas padrão */
.cl-rte-doc .cl-rte-area { min-height: 260px; max-height: 46vh; }
.cl-rp-linha { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cl-rp-dd .cl-rp-menu { width: 420px; padding: 8px; flex-direction: column; gap: 6px; }
.cl-rp-dd.open .cl-rp-menu { display: flex; }
.cl-rp-opcoes { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.cl-rp-opcoes button { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 8px; padding: 7px 9px; font: inherit; cursor: pointer; }
.cl-rp-opcoes button:hover { background: #eef2f5; }
/* o menu reaproveita .cl-rte-pal (paleta de cores, botões de 24px): aqui as opções ocupam a largura toda */
.cl-rp-menu .cl-rp-opcoes button { width: 100% !important; min-width: 0 !important; height: auto !important; padding: 7px 9px !important; border: none !important; border-radius: 8px !important; }
.cl-rp-menu .cl-rp-opcoes button:hover { transform: none; }
.cl-rp-opcoes b { display: block; color: var(--orx-ink); font-size: .86rem; }
.cl-rp-opcoes small { display: block; color: var(--orx-mute); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-rp { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; min-height: 480px; }
.cl-rp-tela { padding: 16px; }
.cl-rp-col { border-right: 1px solid var(--orx-line); padding-right: 14px; display: flex; flex-direction: column; gap: 10px; }
.cl-rp-topo { display: flex; gap: 8px; }
.cl-rp-topo .orx-inp { flex: 1; }
.cl-rp-itens { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 58vh; }
.cl-rp-item { text-align: left; background: #fff; border: 1px solid var(--orx-line); border-left: 4px solid #cbd5e1; border-radius: 10px; padding: 9px 11px; font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.cl-rp-item:hover { border-color: var(--color-secondary); }
.cl-rp-item.sel { background: #f1f7fb; border-color: var(--color-primary); border-left-color: var(--color-primary); }
.cl-rp-item b { display: block; color: var(--orx-ink); font-size: .86rem; }
.cl-rp-item small { display: block; color: var(--orx-mute); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-rp-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cl-rp-modo { font-size: .85rem; color: var(--orx-ink); background: #fff7e8; border: 1px solid #f5d9a8; border-radius: 10px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-rp-modo.novo { background: #eefaf3; border-color: #bfe5cf; }
.cl-rte-rp .cl-rte-area { min-height: 280px; max-height: 50vh; }
.cl-rp-acoes { display: flex; align-items: center; gap: 10px; }
.orx-abtn.danger-txt:hover:not(:disabled) { color: var(--orx-ca); border-color: #f3c3bd; background: #fff5f4; }
@media (max-width: 900px) { .cl-rp { grid-template-columns: 1fr; } .cl-rp-col { border-right: none; padding-right: 0; } }
/* Documentos (Modelos de Documentos) */
.cl-mod-lista { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.cl-mod-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--orx-line); border-radius: 12px; padding: 10px 12px; font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.cl-mod-item:hover { border-color: var(--color-secondary); box-shadow: 0 10px 22px -14px rgba(0,0,0,.35); transform: translateY(-1px); }
.cl-mod-item > i { color: #9aa4ae; font-size: .8rem; }
.cl-mod-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #e8f0f6; color: var(--color-primary); flex-shrink: 0; }
.cl-mod-txt { flex: 1; min-width: 0; }
.cl-mod-txt b { display: block; color: var(--orx-ink); }
.cl-mod-txt small { display: block; color: var(--orx-mute); font-size: .74rem; }
.cl-doc-ed-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border: 1px solid #e6eaef; border-radius: 10px; background: #fbfcfd; margin-bottom: 10px; }
.cl-doc-ed-bar button { height: 32px; min-width: 32px; border: none; background: none; border-radius: 8px; cursor: pointer; color: #2b3a4a; font: inherit; font-size: 1rem; }
.cl-doc-ed-bar button:hover { background: #eef2f5; }
.cl-doc-ed-bar .cl-mute { margin-left: auto; }
.cl-doc-folha-wrap { background: #eef1f4; border-radius: 10px; padding: 16px; max-height: 62vh; overflow: auto; }
.cl-doc-folha { background: #fff; max-width: 794px; margin: 0 auto; min-height: 500px; padding: 28px 32px; box-shadow: 0 6px 20px rgba(0,0,0,.12); font-family: Arial, sans-serif; font-size: 11px; line-height: 1.4; color: #000; outline: none; }
.cl-doc-folha:focus { box-shadow: 0 0 0 3px rgba(23,159,148,.25), 0 6px 20px rgba(0,0,0,.12); }

@media (max-width: 1300px) { .cl-ant { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1100px) { .cl-split { grid-template-columns: 1fr; } .cl-cmd-pac { margin-left: 0; width: 100%; } }
@media (max-width: 700px) { .cl-ant, .cl-form, .cl-info, .cl-steps { grid-template-columns: 1fr; } .orx-inp.w-med { width: 100%; } }
/* ================= TELA INICIAL (hm-*) — banner de saúde, dicas, novidades ================= */
.hm { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; font-size: .9rem; }
.hm * { box-sizing: border-box; }
.hm-principal { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hm-banner { position: relative; overflow: hidden; border-radius: 18px; box-shadow: 0 14px 34px -16px rgba(15,23,42,.45); }
.hm-slides { display: flex; transition: transform .6s cubic-bezier(.4,.1,.2,1); }
.hm-slide { flex: 0 0 100%; min-height: 250px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; color: #fff;
    background: radial-gradient(circle at 85% 30%, rgba(255,255,255,.18) 0 120px, transparent 121px), linear-gradient(115deg, var(--c1) 0%, var(--c1) 45%, var(--c2) 100%); }
.hm-slide-txt { padding: 28px 34px; }
.hm-selo { display: inline-block; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 3px 11px; }
.hm-slide h2 { margin: 10px 0 4px; font-size: 2rem; font-weight: 800; line-height: 1.1; color: #fff; letter-spacing: -.01em; }
.hm-slide p { margin: 0 0 18px; font-size: .95rem; opacity: .92; max-width: 520px; }
.hm-slide-dicas { display: flex; flex-wrap: wrap; gap: 10px; }
.hm-slide-dicas div { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 8px 12px; font-size: .8rem; font-weight: 600; }
.hm-slide-dicas i { font-size: .95rem; }
.hm-slide-arte { position: relative; height: 100%; min-height: 250px; display: grid; place-items: center; }
.hm-slide-arte > i { position: relative; z-index: 1; font-size: 6.5rem; color: rgba(255,255,255,.92); filter: drop-shadow(0 12px 22px rgba(0,0,0,.25)); }
.hm-bolha { position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); }
.hm-bolha.b1 { width: 210px; height: 210px; }
.hm-bolha.b2 { width: 90px; height: 90px; top: 18%; right: 14%; background: rgba(255,255,255,.1); }
.hm-bolha.b3 { width: 46px; height: 46px; bottom: 16%; left: 16%; background: rgba(255,255,255,.16); }
.hm-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.18); color: #fff; cursor: pointer; opacity: 0; transition: opacity .2s; }
.hm-banner:hover .hm-nav { opacity: 1; }
.hm-nav.ant { left: 12px; } .hm-nav.prox { right: 12px; }
.hm-pontos { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.hm-pontos button { width: 8px; height: 8px; border-radius: 999px; border: none; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; transition: width .25s, background .25s; }
.hm-pontos button.on { width: 24px; background: #fff; }
.hm-saud { font-size: 1.15rem; font-weight: 800; color: var(--color-primary); margin-bottom: 10px; }
.hm-saud span { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6b7785; margin-left: 8px; }
.hm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.hm-kpi { background: var(--color-surface); border: 1px solid #e6eaef; border-radius: 14px; padding: 14px 16px; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.hm-kpi > i { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #e8f0f6; color: var(--color-primary); }
.hm-kpi span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #6b7785; }
.hm-kpi b { font-size: 1.45rem; color: #1f2d3d; font-variant-numeric: tabular-nums; }
.hm-kpi.verde > i { background: #e7f6ee; color: #15803d; } .hm-kpi.verde b { color: #15803d; }
.hm-kpi.laranja > i { background: #fff4e3; color: #d97706; }
.hm-kpi.azul > i { background: #e0f4f8; color: #0e7490; }
.hm-atalhos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hm-atalho { height: 38px; border-radius: 11px; border: 1px solid #d6dde4; background: #fff; color: #1f2d3d; padding: 0 14px; font: inherit; font-weight: 700; font-size: .84rem; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.hm-atalho:hover { background: #f6f8fa; }
.hm-atalho.principal { background: linear-gradient(135deg, var(--color-secondary), #12877e); border-color: transparent; color: #fff; }
.hm-obs { margin: 8px 0 0; font-size: .74rem; color: #9aa4ae; }
.hm-titulo-sec { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6b7785; display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.hm-titulo-sec i { color: #d97706; }
.hm-dicas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hm-dica { background: linear-gradient(180deg, #f5f9fc, #fff); border: 1px solid #e3ebf2; border-radius: 14px; padding: 16px; }
.hm-dica-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); color: #fff; margin-bottom: 10px; }
.hm-dica b { display: block; color: #1f2d3d; margin-bottom: 4px; }
.hm-dica p { margin: 0; color: #5c6b7a; font-size: .84rem; line-height: 1.5; }
.hm-novidades { background: var(--color-surface); border: 1px solid #e6eaef; border-radius: 16px; padding: 0 18px 18px; position: sticky; top: 10px; overflow: hidden; }
.hm-nov-topo { margin: 0 -18px 14px; height: 54px; background: linear-gradient(120deg, var(--color-primary), var(--color-secondary)); display: flex; align-items: center; padding-left: 18px; color: #fff; font-size: 1.2rem; }
.hm-novidades h3 { margin: 0; color: var(--color-primary); font-size: 1.25rem; }
.hm-novidades > p { margin: 2px 0 12px; color: #6b7785; font-size: .8rem; }
.hm-novidades ul { list-style: none; margin: 0; padding: 0; }
.hm-novidades li { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid #eef1f4; font-size: .84rem; color: #1f2d3d; }
.hm-novidades li i { color: var(--color-secondary); margin-top: 2px; }
.hm-novidades li small { display: block; color: #9aa4ae; font-size: .72rem; margin-top: 2px; }
@media (max-width: 1100px) { .hm { grid-template-columns: 1fr; } .hm-novidades { position: static; } }
@media (max-width: 760px) { .hm-slide { grid-template-columns: 1fr; } .hm-slide-arte { display: none; } .hm-dicas { grid-template-columns: 1fr; } .hm-slide h2 { font-size: 1.5rem; } }
/* Receituário: botão da Receita de Controle Especial */
.orx-abtn.esp { background: #1f2937; border-color: #1f2937; color: #fff; }
.orx-abtn.esp:hover:not(:disabled) { background: #111827; filter: none; }
.cl-tp.cl-tp-esp { background: #1f2937; color: #fff; }

/* Solicitação de exames (TUSS) e combos */
.cl-es-itens { display: flex; flex-direction: column; gap: 6px; }
.cl-es-item { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--orx-line, #e6eaef); border-radius: 11px; padding: 7px 10px; }
.cl-es-item .cl-mm-n { padding-top: 0; }
.cl-es-nome { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .88rem; }
.cl-es-cod { font-size: .66rem; font-weight: 800; letter-spacing: .03em; background: #eef4f8; color: #2d5a7b; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.cl-es-cod.livre { background: #fff4e3; color: #b45309; }
.cl-f .cl-mm input.cl-es-obs, .cl-es-obs { width: 220px; flex: 0 0 220px; border: 1px solid #d6dde4; border-radius: 8px; padding: 6px 9px; font: inherit; font-size: .82rem; }
.cl-es-indbox { display: flex; align-items: center; gap: 10px; }
.cl-es-indbox label, .cl-f .cl-es-indbox label { margin: 0 !important; white-space: nowrap; }
.cl-f .cl-mm .cl-es-indbox input.cl-es-ind, .cl-es-ind { flex: 1; border: 1px solid #d6dde4; border-radius: 8px; padding: 7px 10px; font: inherit; font-size: .85rem; }
.cl-f .cl-mm .cl-es-busca input, .cl-f .cl-es .cl-mm-busca input { width: 100%; padding-left: 36px; }
@media (max-width: 760px) { .cl-es-item { flex-wrap: wrap; } .cl-es-obs { flex: 1 1 100%; width: 100%; } .cl-es-indbox { flex-direction: column; align-items: stretch; } }

/* Cadastro de Convênio (Faturamento) — logo da Guia TISS */
.cl-cv-logo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cl-cv-prev { width: 200px; height: 74px; border: 1px dashed #cbd5e1; border-radius: 10px; display: grid; place-items: center; background: #fff; overflow: hidden; }
.cl-cv-prev img { max-width: 186px; max-height: 64px; object-fit: contain; }
.cl-cv-logo-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-rp-item.inativo { opacity: .62; }
#cl-convenios .cl-rp-form .cl-form { margin-bottom: 4px; }

/* Enfermagem (Clínico → Enfermagem / Medicamentos da Enfermagem) */
.cl-enf .orx-hero { background: linear-gradient(120deg, #6d3f8f 0%, #8d5aa8 45%, #2a9d8f 100%); }
.cl-tp.cl-tp-enf { background: #f3e8fb; color: #6d3f8f; border-color: #e2cdf0; }
.cl-enf-aviso { margin-bottom: 12px; background: #f7f0fc; border-color: #e2cdf0; color: #4f2c69; }
.cl-em { display: flex; flex-direction: column; gap: 14px; }
.cl-em-add { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; align-items: start; }
.cl-em-add .cl-mm-busca { position: relative; }
.cl-em-obs { padding: 10px 12px; border: 1px solid var(--orx-line); border-radius: 10px; font: inherit; }
@media (max-width: 760px) { .cl-em-add { grid-template-columns: 1fr; } }

/* Atendimento (Clínico): situação do pagamento da consulta */
.cl-pg { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; border-radius: 20px; padding: 2px 9px; white-space: nowrap; }
.cl-pg.pago { background: #e6f6ee; color: #1b7f4f; }
.cl-pg.pend { background: #fff4e0; color: #a35c00; }
.cl-pg.nada { background: #eef2f6; color: #5c6b7a; }
.cl-pg.conv { background: #e8f0f6; color: #24547b; }
.orx-card-val .cl-pg { margin-top: 4px; font-size: .68rem; padding: 1px 7px; }

/* Finalizar atendimento: retorno por botões (7/15/30/60/90 dias) ou data */
.cl-ret-op { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-ret-op button { font: inherit; font-size: .84rem; font-weight: 700; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--orx-line); background: #fff; color: var(--orx-ink); cursor: pointer; }
.cl-ret-op button:hover { border-color: var(--color-secondary); }
.cl-ret-op button.on { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.cl-ret-data { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: .84rem; }
.cl-ret-data input { padding: 7px 10px; border: 1px solid var(--orx-line); border-radius: 10px; font: inherit; }
.cl-ret-data small { width: 100%; font-weight: 600; color: #1b7f4f; }

/* ================= Fechamento de PDV (pdvx) — layout padrão orx ================= */
.pdvx-status { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; padding: 5px 12px; border-radius: 20px; font-size: .78rem; font-weight: 700; }
.pdvx-status.on { background: rgba(34, 197, 94, .18); color: #d9ffe6; border: 1px solid rgba(134, 239, 172, .45); }
.pdvx-status.on i { font-size: .55rem; color: #4ade80; }
.pdvx-status.off { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .85); border: 1px solid rgba(255, 255, 255, .22); }
.pdvx .orx-hbtn:disabled { opacity: .45; cursor: not-allowed; }
.pdvx-lbl { font-size: .72rem; font-weight: 700; color: var(--orx-mute, #6b7785); margin-right: 6px; white-space: nowrap; }
.pdvx-usu { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--orx-mute, #6b7785); margin-right: 8px; white-space: nowrap; }
.pdvx-split { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); align-items: start; }
.pdvx-todos { display: flex; align-items: center; gap: 9px; cursor: pointer; margin: 0; }
.pdvx-todos input { width: 17px; height: 17px; accent-color: var(--color-primary); }
.pdvx-lista { max-height: calc(100vh - 330px); overflow-y: auto; }
/* cartão do recebimento: o label inteiro marca o checkbox */
.pdvx-card { cursor: pointer; position: relative; padding-left: 52px !important; user-select: none; }
.pdvx-card > input { position: absolute; opacity: 0; pointer-events: none; }
.pdvx-chk { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 7px; border: 2px solid #c6d0da; background: #fff; display: grid; place-items: center; color: #fff; font-size: .7rem; transition: all .12s; }
.pdvx-card.sel { border-color: var(--color-primary) !important; background: #f1f7fb !important; }
.pdvx-card.sel .pdvx-chk { background: var(--color-primary); border-color: var(--color-primary); }
.pdvx-card.bloq { cursor: default; }
.pdvx-card.bloq .pdvx-chk { background: #eef2f5; border-color: #dbe2e8; }
.pdvx-tag { font-size: .66rem; font-weight: 700; color: var(--color-primary); background: #e8f0f6; padding: 2px 8px; border-radius: 10px; margin-left: 8px; }
.pdvx-formas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pdvx-formas span { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; color: #3d4a57; background: #f2f5f8; border: 1px solid #e3e9ee; padding: 2px 8px; border-radius: 10px; }
.pdvx-card .orx-card-val small { display: block; color: #b45309; font-size: .72rem; }
/* resumo */
.pdvx-resumo { position: sticky; top: 12px; }
.pdvx-total { margin: 14px 16px 6px; padding: 16px 18px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--color-primary), var(--color-secondary, #179f94)); }
.pdvx-total span { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.pdvx-total b { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; margin: 2px 0; }
.pdvx-total b::before { content: 'R$ '; font-size: 1rem; font-weight: 700; opacity: .85; }
.pdvx-total small { font-size: .8rem; opacity: .9; }
.pdvx-linhas { padding: 6px 16px 4px; }
.pdvx-lh, .pdvx-l { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; align-items: center; padding: 8px 2px; font-size: .86rem; }
.pdvx-lh { font-size: .68rem; font-weight: 700; color: var(--orx-mute, #6b7785); text-transform: uppercase; letter-spacing: .05em; padding-bottom: 2px; }
.pdvx-lh span:not(:first-child), .pdvx-l span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.pdvx-l { border-top: 1px solid #edf1f4; }
.pdvx-l span:first-child { display: flex; align-items: center; gap: 8px; color: #3d4a57; font-weight: 600; }
.pdvx-l span:first-child i { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: .72rem; background: #eef2f5; color: #5c6b7a; }
.pdvx-l.din span:first-child i { background: #e6f6ee; color: #1b7f4f; } .pdvx-l.din span:not(:first-child) { color: #1b7f4f; font-weight: 700; }
.pdvx-l.pix span:first-child i { background: #e6f7f6; color: #128277; }
.pdvx-l.cart span:first-child i { background: #eef0fb; color: #4b55b5; }
.pdvx-l.sang span:first-child i { background: #fdecec; color: #b42318; } .pdvx-l.sang span:not(:first-child) { color: #b42318; }
.pdvx-fechar { padding: 10px 16px 16px; }
.pdvx-fechar .orx-abtn { width: 100%; justify-content: center; padding: 11px; font-size: .9rem; }
.pdvx-fechar .orx-abtn:disabled { opacity: .55; cursor: not-allowed; }
.pdvx-sang-head { border-top: 1px solid var(--orx-line, #e6eaef); }
.pdvx-sangrias { padding: 4px 16px 14px; max-height: 220px; overflow-y: auto; }
.pdvx-sg { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #e6eaef; font-size: .84rem; }
.pdvx-sg b { display: block; color: #1d2a36; font-weight: 600; } .pdvx-sg small { color: var(--orx-mute, #6b7785); font-size: .74rem; }
.pdvx-sg > span { color: #b42318; font-weight: 700; white-space: nowrap; }
.pdvx-vazio { color: var(--orx-mute, #6b7785); font-size: .84rem; text-align: center; padding: 14px 0; }
/* janelas */
.pdvx-modal { position: fixed; inset: 0; z-index: 1100; background: rgba(15, 30, 45, .45); align-items: center; justify-content: center; padding: 16px; }
.pdvx-mbox { width: 100%; max-width: 440px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); }
.pdvx-mhead { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--color-primary), var(--color-secondary, #179f94)); }
.pdvx-mhead button { background: rgba(255,255,255,.15); border: 0; color: #fff; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; }
.pdvx-mbody { padding: 18px; display: grid; gap: 14px; }
.pdvx-mvals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pdvx-mvals > div { background: #f4f7f9; border-radius: 12px; padding: 10px 12px; }
.pdvx-mvals span { display: block; font-size: .72rem; font-weight: 700; color: var(--orx-mute, #6b7785); text-transform: uppercase; letter-spacing: .04em; }
.pdvx-mvals b { font-size: 1.15rem; color: #1d2a36; }
.pdvx-mvals .tot { background: #e8f0f6; } .pdvx-mvals .tot b { color: var(--color-primary); }
.pdvx-f { display: grid; gap: 6px; font-size: .8rem; font-weight: 600; color: #3d4a57; }
.pdvx-f input { height: 42px; border: 1.5px solid #dfe5eb; border-radius: 10px; padding: 0 12px; font: inherit; font-weight: 400; font-size: .95rem; }
.pdvx-f input:focus { outline: none; border-color: var(--color-primary); }
.pdvx-chkl { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: #3d4a57; }
.pdvx-mfoot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; background: #f8fafb; border-top: 1px solid #eef1f4; }
@media (max-width: 1100px) { .pdvx-split { grid-template-columns: 1fr; } .pdvx-resumo { position: static; } .pdvx-lista { max-height: none; } }

.pdvx .orx-toolbar .orx-inp.w-parc { flex: 1 1 260px; min-width: 220px; }
