/* Clientes */

#screen-clientes{ width:100%; max-width:none; margin:18px auto 0; padding:0; background:transparent; border:0; box-shadow:none; }

.clients-shell{ display:grid; gap:14px; }

.clients-top,
.clients-filter-card,
.clients-table-card,
.clients-detail-card{ background:#fff; border:1px solid var(--line); border-radius:var(--radius-md); box-shadow:var(--shadow-sm); }

.clients-top{ padding:20px 22px; display:flex; align-items:center; justify-content:space-between; gap:16px; }

.clients-top h2{ margin:0; color:var(--primary); font-size:22px; }

.clients-top p{ margin:5px 0 0; color:var(--muted); font-size:12px; }

.clients-top-actions{ display:flex; gap:9px; }

.clients-top-actions .btn{ width:auto; }

.clients-filter-card{ padding:16px 18px; }

.clients-filter-grid{ display:grid; grid-template-columns:minmax(280px,1fr) 210px auto; gap:12px; align-items:end; }

.clients-table-card{ overflow:hidden; }

.clients-table-scroll{ overflow:auto; }

.clients-table{ width:100%; border-collapse:collapse; table-layout:fixed; }

.clients-table th{ padding:11px 9px; background:#eef5fb; color:#5c6f86; font-size:10px; text-transform:uppercase; text-align:left; }

.clients-table td{ padding:11px 9px; border-bottom:1px solid #e9eff5; color:#26364a; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.clients-table tbody tr{ cursor:pointer; }

.clients-table tbody tr:hover td{ background:#f7fbfe; }

.clients-table th:nth-child(1),
.clients-table td:nth-child(1){ width:7%; text-align:center; }

.clients-table th:nth-child(2),
.clients-table td:nth-child(2){ width:34%; }

.clients-table th:nth-child(3),
.clients-table td:nth-child(3){ width:16%; }

.clients-table th:nth-child(4),
.clients-table td:nth-child(4){ width:13%; text-align:center; }

.clients-table th:nth-child(5),
.clients-table td:nth-child(5){ width:16%; }

.clients-table th:nth-child(6),
.clients-table td:nth-child(6){ width:14%; }

.client-status{ display:inline-flex; align-items:center; justify-content:center; white-space:nowrap; padding:5px 8px; border-radius:999px; font-size:9px; font-weight:900; }

.client-status.ativo{ color:#167454; background:#eaf8f1; }

.client-status.bloqueado{ color:#b83d3d; background:#fff0f0; }

.client-status.negativado{ color:#fff; background:#252b34; }

.client-status.cancelado{ color:#637184; background:#edf1f5; }

.client-status.negociacao{ color:#98640c; background:#fff5e4; }

.client-status .status-mobile{ display:none; }

.clients-pagination{ padding:13px 16px; display:flex; align-items:center; justify-content:space-between; gap:12px; background:#fafcfe; }

.clients-pagination-actions{ display:flex; gap:7px; }

.clients-pagination button{ border:1px solid var(--line); border-radius:9px; padding:7px 11px; background:#fff; color:var(--primary); font-size:10px; font-weight:800; cursor:pointer; }

.clients-pagination button:disabled{ opacity:.4; cursor:default; }

.client-modal-backdrop{ position:fixed; inset:0; z-index:180; display:none; place-items:center; padding:4px; background:rgba(9,28,48,.60); backdrop-filter:blur(7px); }

.client-modal-backdrop.open{ display:grid; }

.client-modal{ width:calc(100vw - 8px); max-width:none; max-height:calc(100vh - 8px); overflow-y:auto; overflow-x:hidden; background:#fff; border-radius:14px; box-shadow:0 28px 80px rgba(0,0,0,.28); }

.client-modal-head{ position:sticky; top:0; z-index:3; padding:18px 22px; display:flex; align-items:center; justify-content:space-between; gap:15px; background:#fff; border-bottom:1px solid var(--line); }

.client-modal-head h3{ margin:0; color:var(--primary); font-size:20px; }

.client-modal-close{ width:38px; height:38px; border:1px solid var(--line); border-radius:11px; background:#fff; cursor:pointer; }

.client-form{ padding:18px 14px 22px; width:100%; max-width:100%; overflow-x:hidden; box-sizing:border-box; }

.client-type-tabs{ display:inline-grid; grid-template-columns:1fr 1fr; gap:4px; margin-bottom:15px; padding:4px; background:#eaf1f8; border-radius:12px; }

.client-type-tab{ border:0; border-radius:9px; padding:8px 14px; background:transparent; color:#61748a; font-size:11px; font-weight:850; cursor:pointer; }

.client-type-tab.active{ color:#fff; background:var(--primary); }

.client-form-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; width:100%; min-width:0; }

.client-form-grid .wide{ grid-column:span 2; }

.client-form-grid .full{ grid-column:1/-1; }

.client-inline-field{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; min-width:0; }

.client-form textarea{ width:100%; min-height:90px; padding:11px 13px; border:1px solid #cfdae7; border-radius:12px; resize:vertical; font:inherit; }

.client-form-actions{ margin-top:18px; display:flex; justify-content:flex-end; gap:9px; }

.client-form-actions .btn{ width:auto; }

.client-error{ margin-bottom:12px; }

.client-detail-body{ padding:14px 10px 18px; }

.client-detail-summary{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:14px; }

.client-kpi{ padding:14px; background:#f7fafd; border:1px solid var(--line); border-radius:14px; }

.client-kpi span{ display:block; color:var(--muted); font-size:9px; }

.client-kpi strong{ display:block; margin-top:5px; color:var(--primary); font-size:17px; }

.client-detail-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }

.client-detail-section{ padding:12px; min-width:0; border:1px solid var(--line); border-radius:15px; background:#fff; overflow:hidden; }

.client-detail-section h4{ margin:0 0 11px; color:var(--primary); font-size:13px; }

.client-info-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; }

.client-info-item span{ display:block; color:var(--muted); font-size:9px; }

.client-info-item strong{ display:block; margin-top:2px; color:#26364a; font-size:11px; word-break:break-word; }

.client-history-scroll{ height:360px; max-height:360px; overflow-y:auto; overflow-x:auto; scrollbar-gutter:stable; }

.client-detail-notes{ grid-column:1/-1; }

.client-notes-scroll{ min-height:6.8em; max-height:6.8em; overflow-y:auto; overflow-x:hidden; white-space:pre-wrap; color:#425970; font-size:11px; line-height:1.35; padding-right:5px; }

.client-history-scroll .client-mini-table thead th{ position:sticky; top:0; z-index:1; background:#fff; box-shadow:0 1px 0 #e8eef4; }

.client-mini-table{ width:100%; border-collapse:collapse; font-size:9px; }

.client-mini-table th,
.client-mini-table td{ padding:7px 5px; border-bottom:1px solid #e8eef4; text-align:left; }

.client-mini-table td:last-child,
.client-mini-table th:last-child{ text-align:right; }

.client-detail-actions{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }

.client-detail-actions .btn{ width:auto; }

@media (max-width:780px){
#screen-clientes{margin:8px 4px;width:auto;max-width:calc(100vw - 8px);overflow-x:hidden}
.clients-top{align-items:flex-start;flex-direction:column;padding:15px}
.clients-top-actions{width:100%}
.clients-top-actions .btn{flex:1}
.clients-filter-grid{grid-template-columns:1fr}
.clients-table th,
.clients-table td{padding:7px 3px;font-size:7px;white-space:normal;overflow-wrap:anywhere}
.clients-table th:nth-child(1),
.clients-table td:nth-child(1){width:9%}
.clients-table th:nth-child(2),
.clients-table td:nth-child(2){width:31%}
.clients-table th:nth-child(3),
.clients-table td:nth-child(3){width:18%}
.clients-table th:nth-child(4),
.clients-table td:nth-child(4){width:15%}
.clients-table th:nth-child(5),
.clients-table td:nth-child(5){width:16%}
.clients-table th:nth-child(6),
.clients-table td:nth-child(6){width:11%}
.client-status{font-size:8px;padding:4px 3px;white-space:nowrap;justify-content:center;line-height:1}
.client-status .status-desktop{display:none}
.client-status .status-mobile{display:inline}
.client-modal-backdrop{padding:0;align-items:stretch;overflow-x:hidden}
.client-modal{width:100%;max-width:100vw;max-height:none;min-height:100%;border-radius:0;overflow-x:hidden}
.client-modal-head,
.client-form,
.client-detail-body{max-width:100%;box-sizing:border-box}
.client-form{padding-left:10px;padding-right:10px}
.client-form-grid{grid-template-columns:minmax(0,1fr);width:100%;overflow-x:hidden}
.client-form-grid>*{min-width:0;max-width:100%}
.client-form-grid input,
.client-form-grid select,
.client-form-grid textarea{min-width:0;max-width:100%;box-sizing:border-box}
.client-form-grid .wide,
.client-form-grid .full{grid-column:auto}
.client-detail-summary{grid-template-columns:1fr 1fr}
.client-detail-grid{grid-template-columns:minmax(0,1fr)}
.client-detail-notes{grid-column:auto;order:99}
.client-history-scroll{height:330px;max-height:330px}
.client-info-grid{grid-template-columns:1fr}
.clients-pagination{align-items:stretch;flex-direction:column}
.clients-pagination-actions{display:grid;grid-template-columns:1fr 1fr}
}

#screen-clientes{ margin-top:0; }

.clients-shell{ gap:16px; }

.clients-top{ padding:22px 2px 10px; border:0; box-shadow:none; background:transparent; }

.clients-top h2{ font-size:28px; letter-spacing:-.04em; }

.clients-top p{ font-size:13px; }

.clients-top-actions .btn{ min-width:112px; }

.clients-filter-card{ padding:18px 20px; border-radius:16px; }

.clients-filter-grid{ grid-template-columns:minmax(320px,1.35fr) minmax(220px,.55fr) 155px; }

.clients-filter-grid .field{ margin-bottom:0; }

.clients-filter-grid input{ padding-left:42px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235b7690' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:14px center; }

.clients-table-card{ border-radius:16px; }

.clients-table-scroll{ overflow-x:hidden; }

.clients-table th{ padding:14px 12px; font-size:9px; letter-spacing:.02em; }

.clients-table td{ padding:14px 12px; font-size:11px; }

.clients-table td:nth-child(2) strong{ color:var(--primary); font-size:11px; }

.clients-table th:nth-child(1),
.clients-table td:nth-child(1){ width:6%; }

.clients-table th:nth-child(2),
.clients-table td:nth-child(2){ width:31%; }

.clients-table th:nth-child(3),
.clients-table td:nth-child(3){ width:17%; }

.clients-table th:nth-child(4),
.clients-table td:nth-child(4){ width:13%; }

.clients-table th:nth-child(5),
.clients-table td:nth-child(5){ width:16%; }

.clients-table th:nth-child(6),
.clients-table td:nth-child(6){ width:14%; }

.clients-table th:nth-child(7),
.clients-table td:nth-child(7){ width:3%; text-align:center; }

.client-row-arrow{ color:#2e5a80; font-size:18px; line-height:1; }

.client-status{ min-width:76px; }

.clients-pagination{ padding:15px 18px; }

@media (max-width:780px){
.clients-top{ padding:15px; background:#fff; border:1px solid var(--line); box-shadow:var(--shadow-sm); }
.clients-top h2{ font-size:22px; }
.clients-filter-grid input{ padding-left:13px; background-image:none; }
.clients-table th:nth-child(7),
.clients-table td:nth-child(7){display:none}
.clients-table th:nth-child(1),
.clients-table td:nth-child(1){width:9%}
.clients-table th:nth-child(2),
.clients-table td:nth-child(2){width:31%}
.clients-table th:nth-child(3),
.clients-table td:nth-child(3){width:18%}
.clients-table th:nth-child(4),
.clients-table td:nth-child(4){width:15%}
.clients-table th:nth-child(5),
.clients-table td:nth-child(5){width:16%}
.clients-table th:nth-child(6),
.clients-table td:nth-child(6){width:11%}
.client-status{min-width:0}
}

@media (min-width: 981px){
body.logged-app #screen-clientes{ margin-top:0; }
body.logged-app #screen-clientes{ padding-top:26px; }
body.logged-app .clients-shell{ gap:18px; }
body.logged-app .clients-top{ padding:0 2px 6px; display:flex; align-items:flex-start; justify-content:space-between; gap:20px; background:transparent; border:0; box-shadow:none; }
body.logged-app .clients-top h2{ margin:0; font-size:30px; line-height:1.05; letter-spacing:-.04em; color:#0f2d5c; }
body.logged-app .clients-top p{ margin-top:8px; font-size:14px; color:#516985; }
body.logged-app .clients-top-actions{ display:flex; gap:14px; }
body.logged-app .clients-top-actions .btn{ min-height:52px; padding:0 22px; border-radius:14px; font-size:15px; font-weight:800; display:inline-flex; width:auto; box-shadow:none; }
body.logged-app .clients-top-actions .btn svg{ width:18px; height:18px; }
body.logged-app .clients-top-actions #cli-voltar{ color:#0f2d5c; border:1px solid #cfdceb; background:#fff; }
body.logged-app .clients-top-actions #cli-novo{ background:linear-gradient(135deg,#0c4b96,#0a3f86); }
body.logged-app .clients-filter-card{ padding:20px 22px; border-radius:18px; box-shadow:0 10px 30px rgba(20,42,74,.06); }
body.logged-app .clients-filter-grid{ grid-template-columns:minmax(360px,1.65fr) minmax(240px,.95fr) 160px; gap:16px; align-items:end; }
body.logged-app .clients-filter-grid label{ margin-bottom:8px; font-size:12px; color:#213d66; }
body.logged-app .clients-filter-grid input,
body.logged-app .clients-filter-grid select{ min-height:48px; border-radius:13px; font-size:13px; background-color:#fff; }
body.logged-app .clients-filter-grid input{ padding-left:46px; }
body.logged-app .clients-filter-grid #cli-filtrar{ min-height:48px; border-radius:13px; font-size:14px; box-shadow:0 10px 24px rgba(14,69,137,.18); }
body.logged-app .clients-filter-grid #cli-filtrar svg{ width:17px; height:17px; }
body.logged-app .clients-table-card{ border-radius:18px; box-shadow:0 10px 30px rgba(20,42,74,.06); }
body.logged-app .clients-table th{ padding:16px 16px; background:#f4f8fc; color:#516a88; font-size:11px; font-weight:800; text-transform:uppercase; }
body.logged-app .clients-table td{ padding:18px 16px; font-size:14px; color:#17345d; }
body.logged-app .clients-table tbody tr:hover td{ background:#f9fbfd; }
body.logged-app .clients-table td:nth-child(2) strong{ font-size:14px; font-weight:700; }
body.logged-app .clients-table th:nth-child(1),
body.logged-app .clients-table td:nth-child(1){ width:6%; }
body.logged-app .clients-table th:nth-child(2),
body.logged-app .clients-table td:nth-child(2){ width:32%; }
body.logged-app .clients-table th:nth-child(3),
body.logged-app .clients-table td:nth-child(3){ width:15%; }
body.logged-app .clients-table th:nth-child(4),
body.logged-app .clients-table td:nth-child(4){ width:13%; }
body.logged-app .clients-table th:nth-child(5),
body.logged-app .clients-table td:nth-child(5){ width:15%; }
body.logged-app .clients-table th:nth-child(6),
body.logged-app .clients-table td:nth-child(6){ width:16%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.logged-app .clients-table th:nth-child(7),
body.logged-app .clients-table td:nth-child(7){ width:3%; text-align:center; }
body.logged-app .client-status{ min-width:102px; padding:6px 14px; border-radius:999px; font-size:12px; font-weight:800; }
body.logged-app .client-row-arrow{ font-size:22px; color:#214a74; }
body.logged-app .clients-pagination{ display:grid; grid-template-columns:minmax(250px,1fr) auto auto; align-items:center; gap:18px; padding:18px 22px; }
body.logged-app #cli-page-info{ color:#4c6683; font-size:13px; }
body.logged-app .clients-pagination-center{ display:flex; align-items:center; gap:10px; justify-content:center; }
body.logged-app .clients-page-nav,
body.logged-app .clients-page-buttons button{ min-width:36px; height:36px; padding:0 12px; border:1px solid #d8e3ef; border-radius:10px; background:#fff; color:#26476f; font-size:14px; font-weight:800; cursor:pointer; }
body.logged-app .clients-page-nav[disabled],
body.logged-app .clients-page-buttons button[disabled]{ opacity:.45; cursor:default; }
body.logged-app .clients-page-buttons{ display:flex; align-items:center; gap:10px; }
body.logged-app .clients-page-buttons .active{ background:#0c4c97; border-color:#0c4c97; color:#fff; box-shadow:0 10px 24px rgba(12,76,151,.18); }
body.logged-app .clients-page-buttons .ellipsis{ min-width:22px; text-align:center; color:#617995; font-weight:800; }
body.logged-app .clients-page-size select{ min-height:36px; width:136px; padding:0 14px; border-radius:10px; font-size:13px; }
}

@media (min-width: 981px){
body.logged-app #screen-clientes{
    padding:26px 34px 30px !important;
    overflow:visible !important;
  }
body.logged-app .clients-shell{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
  }
body.logged-app .clients-table-scroll{ width:100%; min-width:0; overflow-x:auto; }
body.logged-app .clients-table{ min-width:900px; }
}

@media (min-width: 981px){
body.logged-app #screen-clientes{
    padding-top:2px !important;
    margin-top:0 !important;
  }
body.logged-app .clients-shell{ gap:12px !important; }
body.logged-app .clients-top{ padding:0 2px 2px !important; }
body.logged-app .clients-filter-card{ margin-top:0 !important; }
}

@media (min-width: 981px){
body.logged-app #screen-clientes{ padding-top:0 !important; }
body.logged-app .clients-filter-card,
body.logged-app .clients-table-card{
    border:1px solid #e3ebf4 !important;
    border-radius:18px !important;
    box-shadow:0 10px 30px rgba(20,42,74,.06) !important;
    background:#fff !important;
  }
}

@media (min-width: 981px){
body.logged-app .clients-top h2{
    font-size:26px !important;
  }
body.logged-app .clients-top p{
    margin-top:6px !important;
    font-size:12px !important;
  }
body.logged-app .clients-top-actions .btn{
    min-height:44px !important;
    padding:0 17px !important;
    border-radius:12px !important;
    font-size:13px !important;
  }
body.logged-app .clients-filter-card{
    padding:15px 17px !important;
  }
body.logged-app .clients-filter-grid{
    gap:12px !important;
    grid-template-columns:minmax(300px,1.55fr) minmax(210px,.85fr) 145px !important;
  }
body.logged-app .clients-filter-grid label{ margin-bottom:6px !important; font-size:10.5px !important; }
body.logged-app .clients-filter-grid input,
body.logged-app .clients-filter-grid select,
body.logged-app .clients-filter-grid #cli-filtrar{
    min-height:42px !important;
    font-size:12px !important;
    border-radius:11px !important;
  }
body.logged-app .clients-table th{
    padding:12px 13px !important;
    font-size:9px !important;
  }
body.logged-app .clients-table td{
    padding:13px 13px !important;
    font-size:11.5px !important;
  }
body.logged-app .clients-table td:nth-child(2) strong{ font-size:11.5px !important; }
body.logged-app .client-status{
    min-width:84px !important;
    padding:5px 10px !important;
    font-size:10px !important;
  }
body.logged-app .clients-pagination{ padding:12px 16px !important; }
body.logged-app #screen-clientes{
    width:auto !important;
    max-width:none !important;
    margin-top:0 !important;
    background:transparent !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
  }
body.logged-app .clients-filter-card,
body.logged-app .clients-table-card{
    border:1px solid #dde7f1 !important;
    border-radius:14px !important;
    box-shadow:none !important;
    background:#fff !important;
  }
body.logged-app .clients-top{
    min-height:54px !important;
    padding:0 2px 4px !important;
  }
}

@media (max-width: 980px){
body.logged-app #screen-clientes{
    margin:0 !important;
    max-width:none !important;
    width:auto !important;
  }
body.logged-app .clients-shell{
    gap:10px !important;
  }
body.logged-app .clients-top{
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    border-radius:0 !important;
    padding:0 2px 2px !important;
    align-items:flex-start !important;
    flex-direction:column !important;
  }
body.logged-app .clients-top h2{
    font-size:22px !important;
    line-height:1.1 !important;
  }
body.logged-app .clients-top p{
    font-size:13px !important;
    margin-top:6px !important;
  }
body.logged-app .clients-top-actions{
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:10px !important;
  }
body.logged-app .clients-top-actions .btn{
    width:100% !important;
  }
body.logged-app .clients-filter-card,
body.logged-app .clients-table-card{
    width:100% !important;
    max-width:none !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
  }
body.logged-app .clients-filter-grid{
    grid-template-columns:minmax(0,1fr) !important;
  }
body.logged-app .clients-filter-grid > *{
    min-width:0 !important;
  }
body.logged-app .clients-table-card{ overflow-x:auto !important; }
body.logged-app .clients-table{
    width:100% !important;
    min-width:620px !important;
  }
body.logged-app .clients-table th,
body.logged-app .clients-table td{
    font-size:11px !important;
    padding:10px 8px !important;
    white-space:nowrap !important;
  }
body.logged-app .client-status{ font-size:11px !important; padding:5px 8px !important; }
body.logged-app .clients-pagination{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
  }
body.logged-app .clients-pagination-center,
body.logged-app .clients-page-buttons{
    flex-wrap:wrap !important;
    justify-content:center !important;
  }
body.logged-app .clients-page-size select{ width:100% !important; }
body.logged-app .client-modal{
    width:100% !important;
    max-width:100vw !important;
    min-height:auto !important;
    border-radius:16px 16px 0 0 !important;
  }
}

body.logged-app.theme-dark .clients-top h2,
body.logged-app.theme-dark .clients-table td{
  color: #edf4ff !important;
}

body.logged-app.theme-dark .clients-top p{
  color: #90a3bf !important;
}

body.logged-app.theme-dark .clients-filter-card,
body.logged-app.theme-dark .clients-table-card,
body.logged-app.theme-dark .client-modal{
  background: #0b1728 !important;
  border-color: #1f3048 !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24) !important;
}

body.logged-app.theme-dark .client-kpi{
  background: #0e1b2d !important;
  border-color: #1f3048 !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .20) !important;
}

body.logged-app.theme-dark .client-kpi strong,
body.logged-app.theme-dark .client-kpi span{
  color: #edf4ff !important;
}

body.logged-app.theme-dark .client-notes-scroll,
body.logged-app.theme-dark .client-history-scroll{
  background: #091220 !important;
  color: #edf4ff !important;
  border-color: #223550 !important;
}

body.logged-app.theme-dark .clients-page-nav,
body.logged-app.theme-dark .clients-page-buttons button{
  background: #0f1e33 !important;
  color: #d8e7fa !important;
  border-color: #29415f !important;
}

body.logged-app.theme-dark .clients-page-nav:hover,
body.logged-app.theme-dark .clients-page-buttons button:hover{
  background: #142840 !important;
}

body.logged-app.theme-dark .clients-page-buttons .active{
  background: linear-gradient(135deg, #0d4a92, #1f84ff) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

body.logged-app.theme-dark .client-status{
  border-color: #27405f !important;
}

body.logged-app.theme-dark .clients-table thead th,
body.logged-app.theme-dark .client-mini-table thead th{
  background: #101f33 !important;
  color: #8ea5c3 !important;
  border-bottom-color: #223550 !important;
}

body.logged-app.theme-dark .clients-table tbody td,
body.logged-app.theme-dark .client-mini-table tbody td{
  background: #0b1728 !important;
  color: #edf4ff !important;
  border-bottom-color: #1c2d44 !important;
}

body.logged-app.theme-dark .clients-table tbody tr:hover td,
body.logged-app.theme-dark .client-mini-table tbody tr:hover td{
  background: #0f1e33 !important;
}

@media (max-width: 980px){
body.logged-app.theme-dark .clients-top{
    background: transparent !important;
  }
}

.client-prontuario-list{max-height:300px;overflow:auto;display:grid;gap:8px}

.client-prontuario-item{width:100%;padding:11px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);border-radius:12px;background:#fff;text-align:left;cursor:pointer}

.client-prontuario-item span{min-width:0}

.client-prontuario-item strong{display:block;color:var(--primary);font-size:10px}

.client-prontuario-item small{display:block;margin-top:5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:9px}

.client-prontuario-item b{color:var(--primary-2);font-size:10px}

.client-prontuario-empty{padding:18px;color:var(--muted);text-align:center;font-size:10px}

.client-modal-backdrop{
    padding: 4px !important;
}

.client-modal{
    width: calc(100vw - 8px) !important;
    max-width: none !important;
    max-height: calc(100vh - 8px) !important;
    overflow-x: hidden !important;
}

.client-detail-body{
    padding: 12px 10px 16px !important;
}

.client-detail-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.client-detail-grid > .client-detail-section:nth-child(1),
.client-detail-grid > .client-detail-section:nth-child(2),
.client-detail-grid > .client-detail-section:nth-child(3){
    grid-column: auto !important;
}

.client-detail-grid > .client-detail-section:nth-child(4){
    grid-column: 1 / -1 !important;
}

.client-detail-notes{
    grid-column: 1 / -1 !important;
}

.client-history-scroll{
    height: 360px !important;
    max-height: 360px !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
}

.client-notes-scroll{
    min-height: 6.8em !important;
    max-height: 6.8em !important;
    overflow-y: auto !important;
}

@media (max-width: 780px){
#screen-clientes{ overflow-x: hidden !important; }
.client-modal-backdrop{ padding: 0 !important; overflow-x: hidden !important; }
.client-modal{ width: 100% !important; max-width: 100vw !important; min-height: 100% !important; max-height: none !important; border-radius: 0 !important; overflow-x: hidden !important; }
.client-form,
.client-form-grid,
.client-form-grid > *,
.client-inline-field{ min-width: 0 !important; max-width: 100% !important; overflow-x: hidden !important; }
.client-form-grid input,
.client-form-grid select,
.client-form-grid textarea{ min-width: 0 !important; max-width: 100% !important; width: 100% !important; }
.client-detail-grid{ grid-template-columns: minmax(0, 1fr) !important; }
.client-detail-grid > .client-detail-section:nth-child(1),
.client-detail-grid > .client-detail-section:nth-child(2),
.client-detail-grid > .client-detail-section:nth-child(3),
.client-detail-grid > .client-detail-section:nth-child(4),
.client-detail-notes{ grid-column: auto !important; }
.client-detail-notes{ order: 99 !important; }
.client-status{ font-size: 8px !important; line-height: 1 !important; padding: 4px 3px !important; white-space: nowrap !important; }
.client-status .status-desktop{ display: none !important; }
.client-status .status-mobile{ display: inline !important; }
}

.client-phone-field{ display:grid; grid-template-columns:112px minmax(0,1fr); gap:8px; align-items:center; }

.client-phone-field select{ padding-left:10px; padding-right:7px; font-weight:800; color:var(--primary); }

.client-phone-field input{ min-width:0; }

.client-phone-help{ display:block; margin-top:5px; color:var(--muted); font-size:9px; line-height:1.35; }

@media (max-width:520px){
.client-phone-field{ grid-template-columns:105px minmax(0,1fr); }
}

/* =========================================================
   MODO NOTURNO — pente fino dos detalhes de Clientes
   Somente dark mode. Mantém o tema claro intacto.
   ========================================================= */
body.logged-app.theme-dark .clients-detail-card,
body.logged-app.theme-dark .client-modal,
body.logged-app.theme-dark .client-modal-head,
body.logged-app.theme-dark .client-detail-section,
body.logged-app.theme-dark .client-prontuario-item{
    background: #0b1728 !important;
    color: #edf4ff !important;
    border-color: #1f3048 !important;
}

body.logged-app.theme-dark .client-modal-head{
    border-bottom-color: #223550 !important;
}

body.logged-app.theme-dark .client-modal-close{
    background: #0f1e33 !important;
    color: #d8e7fa !important;
    border-color: #29415f !important;
}

body.logged-app.theme-dark .client-modal-close:hover,
body.logged-app.theme-dark .client-prontuario-item:hover{
    background: #142840 !important;
}

body.logged-app.theme-dark .client-detail-section h4,
body.logged-app.theme-dark .client-info-item strong,
body.logged-app.theme-dark .client-prontuario-item strong{
    color: #edf4ff !important;
}

body.logged-app.theme-dark .client-info-item span,
body.logged-app.theme-dark .client-prontuario-item small,
body.logged-app.theme-dark .client-notes-scroll{
    color: #90a3bf !important;
}

body.logged-app.theme-dark .client-history-scroll .client-mini-table thead th{
    background: #101f33 !important;
    box-shadow: 0 1px 0 #223550 !important;
}

body.logged-app.theme-dark .client-type-tabs{
    background: #101f33 !important;
}

body.logged-app.theme-dark .client-type-tab{
    color: #9eb4d1 !important;
}

body.logged-app.theme-dark .client-type-tab.active{
    background: linear-gradient(135deg, #0d4a92, #1f84ff) !important;
    color: #fff !important;
}


/* =========================================================
   MODO NOTURNO — ajuste fino complementar (21/09)
   - status dos clientes em tons escuros
   - rodapé/paginação escuro
   ========================================================= */
body.logged-app.theme-dark .clients-pagination{
    background: #0f1e33 !important;
    border-top: 1px solid #1f3048 !important;
}

body.logged-app.theme-dark #cli-page-info,
body.logged-app.theme-dark .clients-page-buttons .ellipsis{
    color: #9eb4d1 !important;
}

body.logged-app.theme-dark .clients-page-size select{
    background: #0f1e33 !important;
    color: #d8e7fa !important;
    border-color: #29415f !important;
}

body.logged-app.theme-dark .client-status{
    border: 1px solid transparent !important;
}

body.logged-app.theme-dark .client-status.ativo{
    background: #143826 !important;
    color: #93e8bf !important;
    border-color: #2e7b58 !important;
}

body.logged-app.theme-dark .client-status.bloqueado{
    background: #431b1f !important;
    color: #ffb3b3 !important;
    border-color: #9e4141 !important;
}

body.logged-app.theme-dark .client-status.cancelado{
    background: #2d3540 !important;
    color: #d7dee8 !important;
    border-color: #59687a !important;
}

body.logged-app.theme-dark .client-status.negativado{
    background: #1a2027 !important;
    color: #edf4ff !important;
    border-color: #4d5b6c !important;
}

body.logged-app.theme-dark .client-status.negociacao{
    background: #47300f !important;
    color: #ffd38b !important;
    border-color: #8d5a17 !important;
}
