
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Syne:wght@600;700;800&display=swap');

  /* ═══════════════════════════════════════════════════════════════
     WEBLY CLIENT — MODERN DESIGN SYSTEM
     ═══════════════════════════════════════════════════════════════ */

  :root {
    /* Brand — Admin (Purple) */
    --primary: #6a0dad;
    --primary-dark: #4b0082;
    --primary-light: #8b3dc7;
    --primary-50: #f5eeff;
    --primary-100: #ece0fd;
    --primary-200: #d8bffa;
    --primary-glow: rgba(106, 13, 173, 0.12);

    /* Brand — Client (Pink) */
    --accent: #c2006b;
    --accent-dark: #9a0054;
    --accent-light: #ff4da6;
    --accent-50: #fff0f7;
    --accent-100: #ffd6ea;
    --accent-glow: rgba(194, 0, 107, 0.12);

    /* Semantic */
    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --info: #3b82f6;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;

    /* Neutrals */
    --bg: #f8f6fc;
    --bg-subtle: #f3f0f8;
    --surface: #ffffff;
    --surface-hover: #faf8fd;
    --surface-raised: #ffffff;
    --border: #e8e2f0;
    --border-light: #f0ecf5;
    --text: #1a0a2e;
    --text-secondary: #6b5b8a;
    --text-muted: #9e8cb8;
    --text-placeholder: #c2b3d9;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(106, 13, 173, 0.04);
    --shadow-sm: 0 1px 3px rgba(106, 13, 173, 0.06), 0 1px 2px rgba(106, 13, 173, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(106, 13, 173, 0.06), 0 2px 4px -2px rgba(106, 13, 173, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(106, 13, 173, 0.07), 0 4px 6px -4px rgba(106, 13, 173, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(106, 13, 173, 0.08), 0 8px 10px -6px rgba(106, 13, 173, 0.04);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 0.2s;
    --duration-slow: 0.35s;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Syne', 'Inter', sans-serif;

    /* Layout */
    --sidebar-width: 260px;
    --content-max: 1400px;
    --content-padding: 40px;
  }

  /* ── Reset & Base ── */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
  }

  /* ── Modern Scrollbar ── */
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
  ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

  /* ── Page Container (admin) ── */
  .page-root {
    min-height: 100vh;
    padding: var(--content-padding);
    margin-left: var(--sidebar-width);
    max-width: calc(var(--content-max) + var(--sidebar-width));
  }

  /* ── Page Container (client) ── */
  .page-root-client {
    min-height: 100vh;
    padding: var(--content-padding);
    margin-left: var(--sidebar-width);
    max-width: calc(var(--content-max) + var(--sidebar-width));
  }

  /* ── Page Header ── */
  .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
  }

  .page-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
  }

  .page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 400;
  }

  /* ── Hero Banner (dark gradient header) ── */
  .wb-hero {
    background: linear-gradient(135deg, #1a0a2e 0%, #2d1050 45%, #3d1568 100%);
    border-radius: var(--radius-lg);
    padding: 28px 36px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  .wb-hero::before {
    content: "";
    position: absolute;
    top: -40px; right: -40px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(180,60,255,0.25) 0%, transparent 70%);
    pointer-events: none;
  }
  .wb-hero::after {
    content: "";
    position: absolute;
    bottom: -50px; left: 60px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100,40,200,0.2) 0%, transparent 70%);
    pointer-events: none;
  }
  .wb-hero-left { position: relative; z-index: 1; }
  .wb-hero-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }
  .wb-hero-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-top: 6px;
  }
  .wb-hero-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
  }

  /* ── Filtro de cliente no hero (compartilhado: ver _hero_filtro.html) ── */
  .hero-filter-form { display: flex; align-items: center; gap: 10px; }
  .hero-filter-select {
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; border-radius: var(--radius-sm); padding: 8px 14px;
    font-family: var(--font); font-size: 13px; cursor: pointer; outline: none;
    backdrop-filter: blur(4px); min-width: 200px;
  }
  .hero-filter-select option { background: #2d1050; color: #fff; }
  .hero-clear-link {
    color: rgba(255,255,255,0.55); font-size: 12px; text-decoration: none;
    padding: 4px 8px; border-radius: 6px; transition: color 0.2s;
  }
  .hero-clear-link:hover { color: #fff; }

  /* ── Hero Banner — variante Portal do Cliente (magenta/vinho) ── */
  .wb-hero-cliente {
    background: linear-gradient(135deg, #2d001e 0%, #5a003e 45%, #7a0055 100%);
  }
  .wb-hero-cliente::before {
    background: radial-gradient(circle, rgba(255,77,166,0.28) 0%, transparent 70%);
  }
  .wb-hero-cliente::after {
    background: radial-gradient(circle, rgba(194,0,107,0.2) 0%, transparent 70%);
  }

  /* ── Hero button — frosted-glass, shared across all client pages ── */
  .pc-btn-nova {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25);
    color: #fff; font-family: var(--font); font-size: 13px; font-weight: 500;
    text-decoration: none; cursor: pointer;
    transition: background 0.2s; backdrop-filter: blur(4px);
    white-space: nowrap;
  }
  .pc-btn-nova:hover { background: rgba(255,255,255,0.25); color: #fff; }

  /* ── Cards ── */
  .card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
  }

  .card:hover {
    box-shadow: var(--shadow-md);
  }

  .card-interactive:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
  }

  /* ── Buttons ── */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
  }

  .btn:active { transform: scale(0.97); }

  .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(106, 13, 173, 0.25);
  }
  .btn-primary:hover {
    box-shadow: 0 4px 16px rgba(106, 13, 173, 0.35);
    transform: translateY(-1px);
  }

  .btn-secondary {
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--border);
  }
  .btn-secondary:hover {
    background: var(--primary-50);
    border-color: var(--primary-200);
  }

  .btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
  }
  .btn-danger:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
  }

  .btn-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
  }
  .btn-success:hover {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
  }

  .btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 14px;
  }
  .btn-ghost:hover {
    background: var(--bg-subtle);
    color: var(--text);
  }

  .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 7px;
  }

  .btn-dark {
    background: var(--text);
    color: #fff;
  }
  .btn-dark:hover {
    background: #2d1a4e;
  }

  .btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(194, 0, 107, 0.25);
  }
  .btn-accent:hover {
    box-shadow: 0 4px 16px rgba(194, 0, 107, 0.35);
    transform: translateY(-1px);
  }

  /* ── Badges ── */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
  }

  .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .badge-purple { background: var(--primary-50); color: var(--primary); }
  .badge-purple .badge-dot { background: var(--primary); }
  .badge-pink { background: var(--accent-50); color: var(--accent); }
  .badge-pink .badge-dot { background: var(--accent-light); }
  .badge-green { background: var(--success-bg); color: #059669; }
  .badge-green .badge-dot { background: var(--success); }
  .badge-yellow { background: var(--warning-bg); color: #d97706; }
  .badge-yellow .badge-dot { background: var(--warning); }
  .badge-red { background: var(--danger-bg); color: var(--danger); }
  .badge-red .badge-dot { background: var(--danger); }
  .badge-blue { background: var(--info-bg); color: var(--info); }
  .badge-blue .badge-dot { background: var(--info); }
  .badge-neutral { background: var(--bg-subtle); color: var(--text-secondary); }
  .badge-neutral .badge-dot { background: var(--text-muted); }

  /* ── Form Elements ── */
  .form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
  }

  .form-input {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  }

  .form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
  }

  .form-input::placeholder { color: var(--text-placeholder); }

  .form-select {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 36px 10px 14px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239e8cb8' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  }

  .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
  }

  /* ── Section Label ── */
  .section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
  }

  .section-divider {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
  }

  /* ── Stats Grid ── */
  .stats-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
  }

  .stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 22px 24px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
  }

  .stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }

  .stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
  }

  .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
    margin-bottom: 10px;
  }

  .stat-num {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.02em;
  }

  .stat-icon {
    position: absolute;
    right: 18px;
    bottom: 16px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ── Chart Cards ── */
  .chart-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    padding: 24px;
  }

  .chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }

  .chart-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
  }

  /* ── Table Header ── */
  .table-head {
    display: grid;
    padding: 10px 22px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    gap: 12px;
    margin-bottom: 10px;
  }

  .table-th {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  /* ── Empty State ── */
  .empty-state {
    padding: 64px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
  }

  .empty-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--primary-50);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
  }

  .empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
  }

  /* ── Alert Banners ── */
  .alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 18px;
  }

  .alert-error {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger);
  }

  .alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success);
  }

  .alert-warning {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: #92400e;
  }

  /* ── Animations ── */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes slideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
  }

  .animate-in {
    animation: fadeIn 0.4s var(--ease) both;
  }

  /* ── Utility Classes ── */
  .text-muted { color: var(--text-muted); }
  .text-sm { font-size: 13px; }
  .text-xs { font-size: 11px; }
  .font-display { font-family: var(--font-display); }
  .font-semibold { font-weight: 600; }
  .gap-sm { gap: 8px; }
  .gap-md { gap: 16px; }
  .flex { display: flex; }
  .flex-col { flex-direction: column; }
  .items-center { align-items: center; }
  .justify-between { justify-content: space-between; }
  .flex-wrap { flex-wrap: wrap; }

  /* ── Pagination ── */
  .pag-btn {
    display: inline-flex; align-items: center;
    padding: 7px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px; font-family: var(--font);
    color: var(--primary); text-decoration: none;
    background: var(--surface); transition: all 0.2s; font-weight: 500;
  }
  .pag-btn:hover { background: var(--primary-50); border-color: var(--primary-200); }
  .pag-current {
    display: inline-flex; align-items: center;
    padding: 7px 13px;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 13px; font-family: var(--font);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; font-weight: 600;
    box-shadow: 0 2px 8px rgba(106,13,173,0.2);
  }

  /* ── WhatsApp Button — padrão global ── */
  .wa-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: var(--radius-full);
    background: #dcfce7; color: #16a34a;
    border: 1px solid #bbf7d0;
    font-size: 12px; font-weight: 600;
    text-decoration: none; white-space: nowrap; flex-shrink: 0;
    transition: background .15s, box-shadow .15s;
  }
  .wa-btn:hover { background: #bbf7d0; box-shadow: 0 2px 6px rgba(22,163,74,.2); }
  .wa-btn-disabled {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: var(--radius-full);
    background: var(--surface-2); color: var(--text-placeholder);
    font-size: 12px; font-weight: 500;
    white-space: nowrap; flex-shrink: 0;
  }

  /* ── Responsive Adjustments ── */
  @media (max-width: 1200px) {
    :root {
      --sidebar-width: 220px;
      --content-padding: 28px;
    }
  }
