*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --rose: #2f9b94;
    --rose-light: #15303a;
    --rose-dark: #3aab9e;
    --violet: #1c6b66;
    --violet-light: #271f3a;
    --gold: #c9a05a;
    --gold-light: #2a2412;
    --ivory: #06070c;
    --charcoal: #e6e8ef;
    --muted: #9aa0b5;
    --border: rgba(255,255,255,0.09);
    --white: #15151c;
    --success: #4ade80;
    --danger: #f87171;
    --warning: #c9a05a;
    --sidebar: #0d0d12;
    --surface2: #1b1b24;
    --shadow: 0 2px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.55);
    --radius: 12px;
    --radius-lg: 18px;
  }

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--ivory);
    color: var(--charcoal);
    min-height: 100vh;
    display: flex;
  }

  /* SIDEBAR */
  .sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
  }

  .logo {
    padding: 32px 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .logo-title {
    font-family: -apple-system, 'Segoe UI', sans-serif;
    font-size: 21px;
    font-weight: 300;
    color: #eaf2f0;
    letter-spacing: 2.3px;
    text-transform: uppercase;
    line-height: 1;
  }

  .logo-sub {
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--gold);
    text-transform: uppercase;
    margin-top: 4px;
  }

  .nav {
    padding: 16px 0;
    flex: 1;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    cursor: pointer;
    color: rgba(255,255,255,0.55);
    font-size: 13.5px;
    font-weight: 400;
    letter-spacing: 0.3px;
    transition: all 0.2s;
    border-left: 2px solid transparent;
  }

  .nav-item:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.04); }
  .nav-item.active { color: #fff; border-left-color: var(--rose); background: rgba(47,155,148,0.14); }

  .nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }

  .sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 11px;
    color: rgba(255,255,255,0.28);
    letter-spacing: 0.5px;
  }

  /* MAIN */
  .main {
    margin-left: 240px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  .topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .page-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--charcoal);
  }

  .topbar-actions { display: flex; gap: 10px; align-items: center; }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.18s;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 0.2px;
  }

  .btn-primary { background: #25807a; color: #ffffff; }
  .btn-primary:hover { background: #1d6f69; }
  .btn-secondary { background: var(--white); color: var(--charcoal); border: 1px solid var(--border); }
  .btn-secondary:hover { background: var(--ivory); }
  .btn-ghost { background: transparent; color: var(--muted); border: none; }
  .btn-ghost:hover { color: var(--charcoal); background: var(--ivory); }
  .btn-danger { background: rgba(248,113,113,0.12); color: var(--danger); border: 1px solid rgba(248,113,113,0.3); }
  .btn-danger:hover { background: rgba(248,113,113,0.22); }
  .btn-sm { padding: 6px 12px; font-size: 12px; }

  .content { padding: 32px 36px; flex: 1; }

  /* CARDS */
  .stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }

  /* ===== DASHBOARD GERENCIAL (Relatórios) ===== */
  .dg-kpi-row{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:14px; }
  .dg-kpi{ background:var(--white); border:1px solid var(--border); border-radius:10px; padding:14px 16px; }
  .dg-label{ font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; font-weight:600; margin-bottom:7px; display:flex; align-items:center; gap:6px; }
  .dg-dot{ width:7px; height:7px; border-radius:50%; flex-shrink:0; }
  .dg-value{ font-size:21px; font-weight:700; color:var(--charcoal); }
  .dg-panel{ background:var(--white); border:1px solid var(--border); border-radius:10px; padding:16px 18px; }
  .dg-panel-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; flex-wrap:wrap; gap:6px; }
  .dg-panel-head h3{ font-size:13.5px; font-weight:600; color:var(--charcoal); }
  .dg-legend-row{ display:flex; gap:14px; flex-wrap:wrap; }
  .dg-legend-item{ display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--muted); }
  .dg-sw{ width:9px; height:9px; border-radius:3px; flex-shrink:0; }
  .dg-bottom-grid{ display:grid; grid-template-columns:1fr 1.3fr; gap:14px; margin-top:14px; }
  .dg-stock-list{ display:flex; flex-direction:column; gap:10px; margin-top:4px; }
  .dg-stock-row{ display:flex; align-items:center; gap:10px; }
  .dg-stock-row .dg-name{ font-size:12.5px; color:var(--charcoal); min-width:84px; }
  .dg-stock-bar{ flex:1; height:8px; background:var(--ivory); border-radius:4px; overflow:hidden; }
  .dg-stock-bar > div{ height:100%; border-radius:4px; }
  .dg-stock-row .dg-count{ font-size:12.5px; font-weight:600; min-width:24px; text-align:right; color:var(--charcoal); }
  @media(max-width:900px){
    .dg-kpi-row{ grid-template-columns:repeat(2,1fr); }
    .dg-bottom-grid{ grid-template-columns:1fr; }
  }

  .stat-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 20px 22px;
  }

  .stat-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
  .stat-value { font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 500; color: var(--charcoal); line-height: 1; }
  .stat-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }

  .stat-dot {
    width: 8px; height: 8px; border-radius: 50%;
    display: inline-block; margin-right: 5px;
  }

  /* SECTIONS */
  .section { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; margin-bottom: 24px; }
  .section-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
  .section-title { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 500; }

  /* TABLE */
  .table-wrap { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; }
  th { padding: 10px 20px; text-align: left; font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); font-weight: 500; background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border); }
  td { padding: 13px 20px; font-size: 13.5px; border-bottom: 1px solid rgba(255,255,255,0.08); vertical-align: middle; }
  tr:last-child td { border-bottom: none; }
  tr:hover td { background: rgba(255,255,255,0.03); }

  /* BADGE */
  .badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.2px;
  }

  .badge-rose { background: var(--rose-light); color: var(--rose-dark); }
  .badge-gold { background: var(--gold-light); color: #e8c283; }
  .badge-green { background: rgba(74,222,128,0.13); color: #4ade80; }
  .badge-gray { background: rgba(255,255,255,0.06); color: #9aa0b5; }

  /* MODAL */
  .modal-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(42,36,32,0.45);
    z-index: 200;
    align-items: center;
    justify-content: center;
  }

  .modal-backdrop.open { display: flex; }

  .modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-header {
    padding: 24px 28px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .modal-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 500; }
  .modal-body { padding: 24px 28px; }
  .modal-footer { padding: 16px 28px 24px; display: flex; gap: 10px; justify-content: flex-end; }

  /* FORM */
  .form-group { margin-bottom: 18px; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

  label { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; }

  input, select, textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: var(--charcoal);
    background: var(--white);
    outline: none;
    transition: border-color 0.18s;
  }

  input:focus, select:focus, textarea:focus { border-color: var(--rose); }
  textarea { resize: vertical; min-height: 80px; }

  /* SEARCH */
  .search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--ivory);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
  }

  .search-bar input {
    border: none;
    background: transparent;
    padding: 0;
    font-size: 13.5px;
    width: 220px;
  }

  .search-bar input:focus { box-shadow: none; }

  /* PAGE TOGGLE */
  .page { display: none; }
  .page.active { display: block; }

  /* AVATAR */
  .avatar {
    width: 34px; height: 34px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 500;
    background: var(--rose-light); color: var(--rose-dark);
    flex-shrink: 0;
  }

  .client-cell { display: flex; align-items: center; gap: 10px; }
  .client-name { font-weight: 500; }
  .client-email { font-size: 12px; color: var(--muted); }

  /* LED CARD */
  .led-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 20px; }

  .led-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    border-left: 3px solid var(--rose);
  }

  .led-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
  .led-treatment { font-weight: 500; font-size: 14px; color: var(--charcoal); }
  .led-area { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .led-client-name { font-size: 13px; font-weight: 500; color: var(--rose-dark); margin-bottom: 8px; }

  .led-details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
  .led-detail { font-size: 12px; }
  .led-detail-label { color: var(--muted); }
  .led-detail-value { font-weight: 500; margin-top: 2px; }

  /* PROGRESS */
  .progress-bar { height: 5px; background: var(--rose-light); border-radius: 4px; overflow: hidden; margin-top: 10px; }
  .progress-fill { height: 100%; background: var(--rose); border-radius: 4px; transition: width 0.4s; }

  /* EMPTY */
  .empty-state { text-align: center; padding: 60px 20px; }
  .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.3; }
  .empty-text { font-size: 14px; color: var(--muted); }

  /* DETAIL PANEL */
  .detail-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .detail-row:last-child { border-bottom: none; }
  .detail-key { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
  .detail-val { font-size: 13.5px; font-weight: 500; }

  /* FILTER */
  .filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .filter-chip {
    padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 500;
    cursor: pointer; border: 1px solid var(--border); background: var(--white); color: var(--muted);
    transition: all 0.15s;
  }
  .filter-chip.active { background: var(--rose); color: white; border-color: var(--rose); }

  /* TOAST */
  .toast {
    position: fixed; bottom: 24px; right: 24px;
    background: var(--surface2); color: #fff;
    padding: 12px 20px; border-radius: 10px;
    font-size: 13.5px; font-weight: 400;
    z-index: 999; opacity: 0;
    transform: translateY(8px);
    transition: all 0.25s;
    pointer-events: none;
  }
  .toast.show { opacity: 1; transform: translateY(0); }

  /* ===== MENU MOBILE (gaveta) ===== */
  .mobile-menu-btn { display:none; }
  .sidebar-backdrop { display:none; }
  @media (max-width: 900px) {
    .calc-grid { grid-template-columns: 1fr !important; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-fc-grid { grid-template-columns: 1fr !important; }
    .form-row { grid-template-columns: 1fr; }
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .mobile-menu-btn {
      display: flex; align-items: center; justify-content: center;
      width: 38px; height: 38px; border-radius: 10px;
      background: var(--sidebar); color: var(--charcoal);
      font-size: 18px; cursor: pointer; border: 1px solid var(--border);
      flex-shrink: 0;
    }
    .sidebar-backdrop.show {
      display: block; position: fixed; inset: 0;
      background: rgba(0,0,0,0.55); z-index: 99;
    }
  }

  /* AGENDA */
  .cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
  .cal-day-header { text-align:center; font-size:10px; font-weight:600; letter-spacing:0.5px; text-transform:uppercase; color:var(--muted); padding:4px 0; }
  .cal-day { aspect-ratio:1; display:flex; align-items:center; justify-content:center; border-radius:6px; font-size:12px; cursor:pointer; position:relative; transition:all 0.15s; }
  .cal-day:hover { background:var(--rose-light); color:var(--rose-dark); }
  .cal-day.outro-mes { color:#ddd; cursor:default; }
  .cal-day.outro-mes:hover { background:transparent; color:#ddd; }
  .cal-day.hoje { font-weight:700; color:var(--rose-dark); }
  .cal-day.selecionado { background:var(--rose); color:white !important; font-weight:600; }
  .cal-day.tem-ag::after { content:''; position:absolute; bottom:3px; width:4px; height:4px; border-radius:50%; background:var(--gold); }
  .cal-day.selecionado::after { background:rgba(255,255,255,0.7); }
  .hora-slot { display:flex; align-items:stretch; border:1px solid var(--border); border-radius:8px; margin-bottom:6px; overflow:hidden; background:var(--white); }
  .hora-label { width:60px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:600; color:var(--muted); background:var(--ivory); border-right:1px solid var(--border); letter-spacing:0.5px; }
  .hora-conteudo { flex:1; padding:8px 12px; min-height:42px; }
  .hora-livre { color:var(--muted); font-size:12px; font-style:italic; cursor:pointer; padding:4px 0; }
  .hora-livre:hover { color:var(--rose); }
  .hora-ocupada .hora-label { background:rgba(47,155,148,0.15); color:var(--rose-dark); border-right-color:rgba(47,155,148,0.3); }
  .hora-retorno .hora-label { background:rgba(74,222,128,0.13); color:#4ade80; border-right-color:rgba(74,222,128,0.3); }
  .ag-card-nome { font-size:13.5px; font-weight:500; }
  .ag-card-proc { font-size:12px; color:var(--muted); }

  /* ANAMNESE */
  .an-tab { transition:color .15s, border-color .15s; }
  .check-label { display:flex; align-items:center; gap:6px; font-size:12.5px; cursor:pointer; padding:5px 8px; border:1px solid var(--border); border-radius:6px; background:var(--white); transition:all .15s; user-select:none; }
  .check-label.marcado { background:var(--rose-light); border-color:var(--rose); color:var(--rose-dark); }
  .check-label input { width:auto; margin:0; cursor:pointer; }

  /* MENSAGENS */
  .msg-tab { transition: color 0.15s, border-color 0.15s; }
  .msg-tab:hover { color: var(--charcoal) !important; }

  .var-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 20px;
    background: var(--white); border: 1px solid var(--border);
    font-size: 11.5px; cursor: pointer; color: var(--charcoal);
    font-weight: 500; transition: all 0.15s;
  }
  .var-tag:hover { background: var(--rose-light); border-color: var(--rose); color: var(--rose-dark); }

  .alerta-card {
    background: linear-gradient(135deg, var(--surface2) 0%, var(--gold-light) 100%);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .alerta-card.urgente {
    background: linear-gradient(135deg, var(--surface2) 0%, var(--rose-light) 100%);
    border-left-color: var(--rose);
    border-color: rgba(47,155,148,0.35);
  }

  .data-fixa-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .data-fixa-card.ativa { border-left: 3px solid var(--gold); }

  .toggle-switch {
    position: relative; display: inline-block;
    width: 36px; height: 20px;
  }
  .toggle-switch input { opacity: 0; width: 0; height: 0; }
  .toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: rgba(255,255,255,0.15); border-radius: 20px; transition: 0.2s;
  }
  .toggle-slider:before {
    content: ''; position: absolute;
    width: 14px; height: 14px; left: 3px; bottom: 3px;
    background: white; border-radius: 50%; transition: 0.2s;
  }
  .toggle-switch input:checked + .toggle-slider { background: var(--rose); }
  .toggle-switch input:checked + .toggle-slider:before { transform: translateX(16px); }

  .tpl-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
  }

  /* FINANCEIRO */
  .fin-tab { transition:color .15s,border-color .15s; }
  .fin-tab:hover { color:var(--charcoal) !important; }
  .recibo-print { background:white; }
  @media print {
    body * { visibility:hidden; }
    #recibo-preview, #recibo-preview *, #receituario-preview, #receituario-preview * { visibility:visible; }
    #recibo-preview, #receituario-preview { position:fixed;top:0;left:0;width:100%;padding:32px; }
  }

  /* LOGIN — identidade da landing */
  #login-screen { display:none; position:fixed; inset:0; z-index:9999; align-items:center; justify-content:center; flex-direction:column; padding:24px;
    background:
      radial-gradient(900px 520px at 50% -12%, rgba(47,155,148,0.14), transparent 60%),
      radial-gradient(700px 500px at 100% 110%, rgba(28,107,102,0.09), transparent 55%),
      #06070c; }
  #login-screen.visible { display:flex; }
  .login-logo { position:relative; width:300px; margin:0 auto 12px; padding:58px 0 18px; text-align:center; }
  .login-ring { position:absolute; top:60px; left:50%; border-radius:50%; transform:translate(-50%,-50%); pointer-events:none; }
  .ring-1 { width:190px; height:190px; border:0.75px solid rgba(47,155,148,0.09); }
  .ring-2 { width:138px; height:138px; border:0.75px solid rgba(28,107,102,0.11); }
  .ring-3 { width:86px; height:86px; border:0.75px solid rgba(47,155,148,0.13); }
  .login-corner { position:absolute; width:13px; height:13px; opacity:.55; }
  .corner-tl { top:0; left:0; border-top:1.5px solid #c9a05a; border-left:1.5px solid #c9a05a; }
  .corner-tr { top:0; right:0; border-top:1.5px solid #c9a05a; border-right:1.5px solid #c9a05a; }
  .corner-bl { bottom:0; left:0; border-bottom:1.5px solid #c9a05a; border-left:1.5px solid #c9a05a; }
  .corner-br { bottom:0; right:0; border-bottom:1.5px solid #c9a05a; border-right:1.5px solid #c9a05a; }
  .login-logo-title { position:relative; z-index:2; font-family:-apple-system,'Segoe UI',sans-serif; font-size:27px; font-weight:300; letter-spacing:8px; text-indent:8px; text-transform:uppercase; color:#eaf2f0; line-height:1; }
  .login-status-bar { position:relative; z-index:2; display:flex; justify-content:center; gap:5px; margin-top:15px; }
  .login-status-bar span { display:inline-block; width:16px; height:2px; }
  .login-status-bar .seg-c { background:rgba(47,155,148,0.45); }
  .login-status-bar .seg-g { background:rgba(201,160,90,0.75); }
  .login-status-bar .seg-g-wide { width:22px; }
  .login-logo-sub-row { position:relative; z-index:2; display:flex; align-items:center; justify-content:center; gap:10px; margin:2px auto 30px; }
  .login-diamond { width:4px; height:4px; background:#c9a05a; opacity:.7; transform:rotate(45deg); flex-shrink:0; }
  .login-logo-sub { font-size:10px; letter-spacing:3px; color:#c9a05a; text-transform:uppercase; opacity:.85; white-space:nowrap; }
  .login-box { background:#15151c; border:1px solid rgba(255,255,255,0.08); border-radius:16px; padding:38px 34px; width:100%; max-width:420px; box-shadow:0 20px 60px rgba(0,0,0,0.5); }
  .login-heading { font-size:18px; font-weight:600; color:#fff; margin-bottom:22px; text-align:center; }
  .login-input { width:100%; box-sizing:border-box; padding:13px 15px; border:1px solid rgba(255,255,255,0.08); border-radius:10px; font-size:14px; font-family:-apple-system,'Segoe UI',sans-serif; color:#e6e8ef; background:rgba(255,255,255,0.05); outline:none; margin-bottom:13px; transition:border-color .18s, box-shadow .18s; }
  .login-input::placeholder { color:rgba(180,190,220,0.35); }
  .login-input:focus { border-color:rgba(47,155,148,0.55); box-shadow:0 0 0 3px rgba(47,155,148,0.14); }
  .login-btn { width:100%; padding:14px; background:linear-gradient(135deg,#2f9b94,#c9a05a); color:#fff; border:none; border-radius:10px; font-size:15px; font-weight:600; letter-spacing:.3px; cursor:pointer; font-family:-apple-system,'Segoe UI',sans-serif; transition:filter .18s, transform .18s, box-shadow .18s; }
  .login-btn:hover { filter:brightness(1.08); transform:translateY(-1px); box-shadow:0 6px 20px rgba(47,155,148,0.45); }
  .login-btn:disabled { opacity:.55; cursor:not-allowed; transform:none; box-shadow:none; }
  .login-error { color:var(--danger); font-size:12.5px; text-align:center; margin-top:10px; min-height:18px; }
  .login-link { text-align:center; font-size:13px; color:var(--rose-dark); cursor:pointer; font-weight:500; margin-top:12px; }
  .login-link:hover { text-decoration:underline; }
  .login-divider { text-align:center; color:var(--muted); font-size:12px; margin:14px 0; }

  /* USER INFO SIDEBAR */
  .sidebar-user { padding:14px 22px; border-top:1px solid rgba(255,255,255,0.08); }
  .user-row { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
  .user-avatar { width:30px; height:30px; border-radius:50%; background:var(--rose); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:600; color:white; flex-shrink:0; }
  .user-email-txt { font-size:11px; color:rgba(255,255,255,0.4); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:160px; }
  .logout-btn { width:100%; padding:7px; background:rgba(255,255,255,0.06); color:rgba(255,255,255,0.45); border:1px solid rgba(255,255,255,0.1); border-radius:8px; font-size:12px; cursor:pointer; font-family:'DM Sans',sans-serif; transition:all .2s; }
  .logout-btn:hover { background:rgba(255,255,255,0.12); color:rgba(255,255,255,0.8); }

  /* SYNC */
  #sync-dot { position:fixed; bottom:18px; right:18px; background:var(--surface2); color:#fff; padding:8px 14px; border-radius:8px; font-size:12px; opacity:0; transition:opacity .3s; z-index:500; pointer-events:none; }
  #sync-dot.show { opacity:1; }
  #recibo-preview, .recibo-print, #receituario-preview { --charcoal:#2a2420; --white:#ffffff; --ivory:#faf7f4; --border:#e8ddd8; --muted:#7a6e6a; --gold:#c4a16b; --rose:#7c3aed; background:#fff !important; color:#2a2420; }

  /* ===== PAYWALL + TRIAL (monetização) ===== */
  .pw-overlay{ display:none; position:fixed; inset:0; z-index:100000; align-items:center; justify-content:center; padding:24px;
    background: radial-gradient(900px 520px at 50% -12%, rgba(47,155,148,0.22), transparent 60%), rgba(10,10,14,0.93); }
  .pw-overlay.show{ display:flex; }
  .pw-card{ background:#18181f; border:1px solid rgba(255,255,255,0.08); border-radius:18px; padding:38px 32px; max-width:720px; width:100%; text-align:center; box-shadow:0 24px 70px rgba(0,0,0,0.6); }
  .pw-mark{ color:#3aab9e; font-size:22px; margin-bottom:12px; }
  .pw-title{ font-family:-apple-system,'Segoe UI',sans-serif; font-size:23px; font-weight:700; color:#fff; margin-bottom:8px; }
  .pw-sub{ font-size:13.5px; color:#9aa0b5; line-height:1.6; margin-bottom:26px; }
  .pw-plans{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; margin-bottom:22px; }
  .pw-plan{ position:relative; border:1px solid rgba(255,255,255,0.1); border-radius:14px; padding:22px 16px 18px; cursor:pointer; transition:border-color .18s, transform .18s; background:rgba(255,255,255,0.02); }
  .pw-plan:hover{ border-color:rgba(47,155,148,0.65); transform:translateY(-2px); }
  .pw-plan-pop{ border-color:rgba(47,155,148,0.5); }
  .pw-badge{ position:absolute; top:-10px; left:50%; transform:translateX(-50%); background:#c4a16b; color:#0f0f13; font-size:10px; font-weight:700; padding:3px 11px; border-radius:20px; text-transform:uppercase; letter-spacing:.5px; }
  .pw-plan-name{ font-size:14px; font-weight:600; color:#e6e8ef; margin-bottom:6px; }
  .pw-plan-price{ font-size:27px; font-weight:700; color:#3aab9e; line-height:1.1; }
  .pw-plan-price span{ font-size:12px; font-weight:400; color:#9aa0b5; }
  .pw-plan-feat{ font-size:11.5px; color:#9aa0b5; line-height:1.55; margin:10px 0 16px; min-height:50px; }
  .pw-plan-btn{ background:linear-gradient(135deg,#2f9b94,#c9a05a); color:#fff; padding:11px; border-radius:10px; font-size:13px; font-weight:600; }
  .pw-trust{ font-size:11.5px; color:#9aa0b5; margin-bottom:16px; }
  .pw-logout{ font-size:12px; color:#9aa0b5; cursor:pointer; text-decoration:underline; }
  @media(max-width:520px){ .pw-plans{ grid-template-columns:1fr; } .pw-plan-feat{ min-height:0; } }
  .tb-bar{ position:fixed; bottom:18px; left:50%; transform:translateX(-50%); z-index:9000; background:#20202a; border:1px solid rgba(47,155,148,0.45); border-radius:30px; padding:9px 10px 9px 18px; display:none; align-items:center; gap:12px; box-shadow:0 8px 30px rgba(0,0,0,0.5); font-size:13px; color:#e6e8ef; max-width:92vw; }
  .tb-btn{ background:linear-gradient(135deg,#2f9b94,#c9a05a); color:#fff; border:none; border-radius:20px; padding:7px 15px; font-size:12px; font-weight:600; cursor:pointer; white-space:nowrap; }
  /* ===== ADMIN / ATIVAÇÕES ===== */
  .adm-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; border:1px solid var(--border); border-radius:12px; background:var(--white); margin-bottom:10px; flex-wrap:wrap; }
  .adm-email{ font-weight:600; color:var(--charcoal); font-size:14px; word-break:break-all; }
  .adm-meta{ font-size:12px; color:var(--muted); margin-top:3px; text-transform:capitalize; }
  .adm-actions{ display:flex; gap:8px; flex-wrap:wrap; }
  .adm-btn{ border:1px solid var(--border); background:transparent; color:var(--charcoal); border-radius:8px; padding:7px 12px; font-size:12px; cursor:pointer; transition:border-color .15s; }
  .adm-btn:hover{ border-color:var(--rose); }
  .adm-on{ background:rgba(74,222,128,0.14); border-color:rgba(74,222,128,0.4); color:#4ade80; }
  .adm-off{ color:#f87171; }
  /* ===== MINHA ASSINATURA ===== */
  .ma-card{ background:var(--white); border:1px solid var(--border); border-radius:16px; padding:28px; max-width:480px; }
  .ma-badge{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; padding:5px 12px; border-radius:20px; text-transform:uppercase; letter-spacing:.5px; }
  .ma-ativo{ background:rgba(74,222,128,0.14); color:#22c55e; }
  .ma-trial{ background:rgba(196,161,107,0.16); color:#c4a16b; }
  .ma-aguardando{ background:rgba(47,155,148,0.16); color:#3aab9e; }
  .ma-vencido{ background:rgba(248,113,113,0.14); color:#f87171; }
  .ma-dias{ font-size:42px; font-weight:300; color:var(--charcoal); margin:18px 0 2px; }
  .ma-dias-label{ font-size:13px; color:var(--muted); margin-bottom:20px; }
  .ma-plano{ font-size:14px; color:var(--muted); margin-bottom:24px; }
  .ma-plano b{ color:var(--charcoal); }
  .ma-btn{ display:block; width:100%; text-align:center; background:linear-gradient(135deg,#2f9b94,#c9a05a); color:#fff; border:none; padding:13px; border-radius:10px; font-size:14px; font-weight:600; cursor:pointer; }
  .ma-sub{ font-size:12px; color:var(--muted); text-align:center; margin-top:10px; }
  .ma-cancelar{ text-align:center; font-size:12px; color:#f87171; text-decoration:underline; cursor:pointer; margin-top:14px; }
  .ma-cancelar:hover{ opacity:.8; }
  .ma-cancel-info{ text-align:center; font-size:12px; color:var(--muted); background:rgba(248,113,113,0.08); border-radius:8px; padding:10px; margin-top:14px; }

  @keyframes orcFlash { 0%{background:rgba(47,155,148,0.35);} 100%{background:transparent;} }
  .orc-item-flash input { animation: orcFlash 1.2s ease-out; border-color: var(--rose) !important; }

  .badge-danger { background: rgba(248,113,113,0.15); color: #f87171; }

  .nav-icon svg { width:16px; height:16px; display:block; }
  .nav-item .nav-icon { display:flex; align-items:center; justify-content:center; }
  .emoji-tint { display:inline-block; filter: grayscale(1) sepia(.55) saturate(2.6) hue-rotate(-12deg) brightness(1.02); }
