
    /* ── DARK MODE (default) ── */
    :root {
      --bg: #0a0d14;
      --bg-2: #0f1420;
      --bg-3: #141926;
      --bg-4: #1a2135;
      --border: rgba(255,255,255,0.06);
      --border-hover: rgba(255,255,255,0.12);
      --text-primary: #eef2f8;
      --text-secondary: #8896b0;
      --text-muted: #4f5e78;
      --accent: #10d87a;
      --accent-dim: rgba(16, 216, 122, 0.12);
      --accent-glow: rgba(16, 216, 122, 0.25);
      --amber: #f5a623;
      --amber-dim: rgba(245,166,35,0.12);
      --red: #ff5b5b;
      --red-dim: rgba(255,91,91,0.12);
      --blue: #5b9dff;
      --blue-dim: rgba(91,157,255,0.12);
      --sidebar-w: 256px;
      --radius: 14px;
      --radius-sm: 9px;
      --row-hover: rgba(255,255,255,0.025);
      --table-hover-bg: rgba(255,255,255,0.025);
    }

    /* ── LIGHT MODE ── */
    .invoicepulse-app.light {
      --bg: #f0f4f8;
      --bg-2: #ffffff;
      --bg-3: #f5f7fa;
      --bg-4: #eaecf0;
      --border: rgba(0,0,0,0.07);
      --border-hover: rgba(0,0,0,0.14);
      --text-primary: #0f1724;
      --text-secondary: #4b5872;
      --text-muted: #8a96ad;
      --accent: #0aa85e;
      --accent-dim: rgba(10,168,94,0.10);
      --accent-glow: rgba(10,168,94,0.22);
      --amber: #d97706;
      --amber-dim: rgba(217,119,6,0.10);
      --red: #dc2626;
      --red-dim: rgba(220,38,38,0.10);
      --blue: #2563eb;
      --blue-dim: rgba(37,99,235,0.10);
      --row-hover: rgba(0,0,0,0.025);
      --table-hover-bg: rgba(0,0,0,0.025);
    }

    /* Light mode specific overrides */
    .invoicepulse-app.invoicepulse-app.light .stat-card::after {
      background: linear-gradient(90deg, transparent, rgba(0,0,0,0.04), transparent);
    }
    .invoicepulse-app.invoicepulse-app.light tbody tr:hover td { background: var(--table-hover-bg); }
    .invoicepulse-app.invoicepulse-app.light .sidebar-footer { color: #2d7a55; }
    .invoicepulse-app.invoicepulse-app.light .plan-banner { color: #1a6644; }
    .invoicepulse-app.invoicepulse-app.light .brand-icon { box-shadow: 0 0 0 1px rgba(10,168,94,0.4), 0 6px 20px rgba(10,168,94,0.15); }
    .invoicepulse-app.invoicepulse-app.light .btn-primary { color: #fff; }
    .invoicepulse-app.invoicepulse-app.light .activity-text strong { color: var(--text-primary); }

    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

    .invoicepulse-app {
      font-family: 'DM Sans', sans-serif;
      background: var(--bg);
      color: var(--text-primary);
      display: flex;
      min-height: 100vh;
      overflow-x: hidden;
    }

    /* ── SIDEBAR ── */
    .sidebar {
      width: var(--sidebar-w);
      background: var(--bg-2);
      border-right: 1px solid var(--border);
      padding: 20px 14px 24px;
      display: flex;
      flex-direction: column;
      gap: 28px;
      position: fixed;
      top: 0; bottom: 0; left: 0;
      overflow-y: auto;
      scrollbar-width: none; /* Firefox */
      -ms-overflow-style: none; /* IE/Edge */
    }

    .sidebar::-webkit-scrollbar { display: none; /* Chrome/Safari */ }

    .brand {
      display: flex;
      align-items: center;
      gap: 11px;
      padding: 4px 4px 20px;
      border-bottom: 1px solid var(--border);
    }

    .brand-icon {
      width: 40px; height: 40px;
      border-radius: 10px;
      background: linear-gradient(135deg, #0db868, #10d87a);
      display: flex; align-items: center; justify-content: center;
      font-family: 'Instrument Serif', serif;
      font-size: 17px; font-weight: 400; color: #fff;
      letter-spacing: -0.5px;
      flex-shrink: 0;
      box-shadow: 0 0 0 1px rgba(16,216,122,0.4), 0 6px 20px rgba(16,216,122,0.2);
    }

    .brand-text h1 {
      font-size: 15px;
      font-weight: 600;
      letter-spacing: -0.3px;
      color: var(--text-primary);
    }

    .brand-text p {
      font-size: 11.5px;
      color: var(--text-muted);
      margin-top: 1px;
    }

    .nav-section { display: flex; flex-direction: column; gap: 2px; }

    .nav-label {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      color: var(--text-muted);
      padding: 0 10px 8px;
      margin-top: 2px;
    }

    .nav-link {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 10px;
      border-radius: var(--radius-sm);
      color: var(--text-secondary);
      text-decoration: none;
      font-size: 13.5px;
      font-weight: 500;
      transition: all 0.18s ease;
      position: relative;
    }

    .nav-link .nav-icon {
      width: 30px; height: 30px;
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 14px;
      background: transparent;
      transition: all 0.18s ease;
    }

    .nav-link:hover {
      color: var(--text-primary);
      background: var(--bg-3);
    }

    .nav-link:hover .nav-icon { background: var(--bg-4); }

    .nav-link.active {
      color: var(--accent);
      background: var(--accent-dim);
    }

    .nav-link.active .nav-icon { background: rgba(16,216,122,0.15); }

    .nav-settings-group { margin-top: 2px; }
    .nav-settings-group.is-open .nav-submenu { display: block; }
    .nav-link-parent {
      width: 100%;
      border: none;
      background: none;
      font-family: inherit;
      text-align: left;
      cursor: pointer;
    }
    .nav-submenu {
      display: none;
      padding: 4px 0 8px 8px;
      margin-left: 12px;
      border-left: 1px solid var(--border);
    }
    .nav-sublink {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border-radius: var(--radius-sm);
      color: var(--text-muted);
      text-decoration: none;
      font-size: 12.5px;
      font-weight: 500;
      transition: all 0.15s ease;
    }
    .nav-sublink:hover {
      color: var(--text-primary);
      background: var(--bg-3);
    }
    .nav-sublink.active {
      color: var(--accent);
      background: var(--accent-dim);
      font-weight: 600;
    }
    .nav-sublink::before {
      content: '';
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: currentColor;
      opacity: 0.5;
      flex-shrink: 0;
    }
    .nav-sublink.active::before { opacity: 1; }

    .nav-link.active::before {
      content: '';
      position: absolute;
      left: 0; top: 50%;
      transform: translateY(-50%);
      width: 3px; height: 22px;
      background: var(--accent);
      border-radius: 0 3px 3px 0;
    }

    .sidebar-badge {
      margin-left: auto;
      background: var(--red-dim);
      color: var(--red);
      font-size: 10px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 99px;
    }

    .sidebar-footer {
      margin-top: auto;
      padding: 14px;
      border-radius: var(--radius);
      background: linear-gradient(135deg, rgba(16,216,122,0.08), rgba(16,216,122,0.03));
      border: 1px solid rgba(16,216,122,0.15);
      font-size: 12px;
      color: #6acea0;
      line-height: 1.6;
    }

    .sidebar-footer strong { display: block; color: var(--accent); font-size: 11px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.8px; }

    /* ── MAIN ── */
    .main {
      margin-left: var(--sidebar-w);
      width: calc(100% - var(--sidebar-w));
      padding: 28px 32px;
      max-width: 1400px;
    }

    /* ── TOPBAR ── */
    .topbar {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 30px;
      gap: 20px;
    }

    .topbar-left h2 {
      font-family: 'Instrument Serif', serif;
      font-size: 34px;
      font-weight: 400;
      letter-spacing: -0.8px;
      line-height: 1.15;
      color: var(--text-primary);
    }

    .topbar-left h2 em {
      color: var(--accent);
      font-style: italic;
    }

    .topbar-left p {
      color: var(--text-muted);
      font-size: 13.5px;
      margin-top: 5px;
    }

    .top-actions { display: flex; gap: 10px; align-items: center; padding-top: 4px; }
    .ip-user-menu {
        position: relative;
    }
    .ip-user-menu__dropdown {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        min-width: 140px;
        padding: 6px 0;
        border-radius: 10px;
        background: var(--card, #141926);
        border: 1px solid var(--border, rgba(255,255,255,0.1));
        box-shadow: 0 8px 24px rgba(0,0,0,0.25);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-4px);
        transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
        z-index: 50;
    }
    .ip-user-menu:hover .ip-user-menu__dropdown,
    .ip-user-menu:focus-within .ip-user-menu__dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .ip-user-menu__item {
        display: block;
        padding: 8px 14px;
        font-size: 13px;
        color: var(--text, #eef2f8);
        text-decoration: none;
        white-space: nowrap;
    }
    .ip-user-menu__item:hover {
        background: var(--surface-2, rgba(255,255,255,0.06));
        color: var(--text, #eef2f8);
    }
    .invoicepulse-app.light .ip-user-menu__dropdown {
        background: #fff;
        border-color: #eaecf0;
        box-shadow: 0 8px 24px rgba(15,23,36,0.12);
    }
    .invoicepulse-app.light .ip-user-menu__item {
        color: #0f1724;
    }
    .invoicepulse-app.light .ip-user-menu__item:hover {
        background: #f5f7fa;
    }
    .ip-current-user {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        max-width: 220px;
        padding: 6px 12px;
        border-radius: 10px;
        background: var(--surface-2, rgba(255,255,255,0.06));
        border: 1px solid var(--border, rgba(255,255,255,0.08));
        line-height: 1.3;
        cursor: pointer;
        outline: none;
    }
    .ip-user-menu:hover .ip-current-user,
    .ip-user-menu:focus-within .ip-current-user {
        border-color: var(--accent, #0aa85e);
    }
    .ip-current-user__name { font-size: 13px; font-weight: 600; color: var(--text, #eef2f8); }
    .ip-current-user__email { font-size: 11px; color: var(--muted, #8896b0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
    .invoicepulse-app.light .ip-current-user { background: #f5f7fa; border-color: #eaecf0; }
    .invoicepulse-app.light .ip-current-user__name { color: #0f1724; }
    .brand--text-only .brand-text { margin-left: 0; }

    .btn {
      border: none;
      border-radius: var(--radius-sm);
      padding: 10px 18px;
      font-family: 'DM Sans', sans-serif;
      font-weight: 600;
      cursor: pointer;
      font-size: 13px;
      transition: all 0.18s ease;
      display: flex; align-items: center; gap: 7px;
    }

    .btn-ghost {
      background: var(--bg-3);
      border: 1px solid var(--border);
      color: var(--text-secondary);
    }

    .btn-ghost:hover {
      border-color: var(--border-hover);
      color: var(--text-primary);
      background: var(--bg-4);
    }

    .btn-primary {
      background: var(--accent);
      color: #061a0e;
      box-shadow: 0 4px 18px var(--accent-glow);
    }

    .btn-primary:hover {
      background: #12f084;
      transform: translateY(-1px);
      box-shadow: 0 6px 24px rgba(16,216,122,0.35);
    }

    /* ── STATS ── */
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
      margin-bottom: 24px;
    }

    .stat-card {
      background: var(--bg-2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px 22px;
      transition: border-color 0.2s ease;
      position: relative;
      overflow: hidden;
    }

    .stat-card::after {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    }

    .stat-card:hover { border-color: var(--border-hover); }

    .stat-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
    }

    .stat-label {
      font-size: 12.5px;
      color: var(--text-muted);
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.6px;
    }

    .stat-icon {
      width: 34px; height: 34px;
      border-radius: 9px;
      display: flex; align-items: center; justify-content: center;
      font-size: 16px;
    }

    .stat-icon.green { background: var(--accent-dim); }
    .stat-icon.amber { background: var(--amber-dim); }
    .stat-icon.blue  { background: var(--blue-dim); }
    .stat-icon.red   { background: var(--red-dim); }

    .stat-value {
      font-size: 26px;
      font-weight: 700;
      letter-spacing: -1px;
      color: var(--text-primary);
      line-height: 1;
      margin-bottom: 8px;
    }

    .stat-change {
      font-size: 12px;
      font-weight: 500;
      display: flex; align-items: center; gap: 5px;
    }

    .stat-change.up   { color: var(--accent); }
    .stat-change.warn { color: var(--amber); }
    .stat-change.info { color: var(--blue); }

    /* ── CONTENT GRID ── */
    .content-grid {
      display: grid;
      grid-template-columns: 1fr 340px;
      gap: 16px;
      margin-bottom: 20px;
    }

    .panel {
      background: var(--bg-2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 22px 24px;
    }

    .panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
    }

    .panel-title {
      font-size: 15px;
      font-weight: 600;
      letter-spacing: -0.2px;
    }

    .panel-action {
      font-size: 12.5px;
      color: var(--accent);
      text-decoration: none;
      font-weight: 600;
      transition: opacity 0.15s;
    }

    .panel-action:hover { opacity: 0.75; }

    /* ── TABLE ── */
    table { width: 100%; border-collapse: collapse; }

    thead th {
      text-align: left;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: var(--text-muted);
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
      font-weight: 600;
    }

    tbody tr {
      transition: background 0.15s;
    }

    tbody tr:hover td { background: rgba(255,255,255,0.025); }

    td {
      padding: 13px 0;
      border-bottom: 1px solid var(--border);
      font-size: 13.5px;
      color: var(--text-secondary);
    }

    td:first-child { color: var(--text-primary); font-weight: 500; font-size: 13px; }
    td:last-child { border-bottom: none; }
    tbody tr:last-child td { border-bottom: none; }

    .ip-table-wrap { overflow-x: auto; }
    .ip-data-table { width: 100%; }
    .ip-data-table td, .ip-data-table th { padding-right: 12px; }
    .ip-data-table td:last-child, .ip-data-table th:last-child { padding-right: 0; }
    .ip-data-table tbody tr:hover td { background: color-mix(in srgb, var(--bg-2) 88%, var(--accent) 12%); }

    /* Tables: action buttons look lighter */
    .ip-row-actions .btn,
    .ip-row-actions-extra .btn {
      border-radius: 10px;
    }
    .ip-row-actions .btn.btn-ghost,
    .ip-row-actions-extra .btn.btn-ghost {
      background: transparent;
      border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    }
    .ip-row-actions .btn.btn-ghost:hover,
    .ip-row-actions-extra .btn.btn-ghost:hover {
      background: color-mix(in srgb, var(--accent) 10%, transparent);
      border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    }

    /* Filter toolbar: search + status side by side */
    .ip-list-toolbar {
      display: block;
      width: fit-content;
      max-width: 100%;
      padding: 10px 12px;
      margin-bottom: 14px;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: color-mix(in srgb, var(--bg-2) 92%, #000 8%);
    }
    .invoicepulse-app.light .ip-list-toolbar {
      background: color-mix(in srgb, #fff 92%, var(--accent) 8%);
    }
    .ip-list-toolbar-filters {
      display: inline-flex;
      flex-direction: row;
      flex-wrap: nowrap;
      align-items: center;
      gap: 8px;
      max-width: 100%;
    }
    .ip-list-toolbar-filters .ip-table-search,
    .ip-list-toolbar-filters .ip-table-status-filter {
      flex: 0 0 auto;
      width: auto;
      border-radius: 12px;
      border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
      box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    }
    .ip-list-toolbar-filters .ip-table-search {
      width: 200px;
      max-width: min(200px, 45vw);
      min-width: 120px;
    }
    .ip-list-toolbar-filters .ip-table-status-filter {
      min-width: 0;
    }
    .ip-list-toolbar-filters .ip-table-search:focus,
    .ip-list-toolbar-filters .ip-table-status-filter:focus {
      outline: none;
      border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
    }

    .doc-number { font-family: 'DM Sans', monospace; font-size: 12.5px; }

    .amount { font-weight: 600; color: var(--text-primary); }

    .badge {
      display: inline-flex;
      align-items: center;
      padding: 4px 10px;
      border-radius: 99px;
      font-size: 11.5px;
      font-weight: 600;
      letter-spacing: 0.2px;
    }

    .badge-paid      { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(16,216,122,0.2); }
    .badge-pending   { background: var(--amber-dim);  color: var(--amber);  border: 1px solid rgba(245,166,35,0.2); }
    .badge-overdue   { background: var(--red-dim);    color: var(--red);    border: 1px solid rgba(255,91,91,0.2); }
    .badge-quote     { background: var(--blue-dim);   color: var(--blue);   border: 1px solid rgba(91,157,255,0.2); }
    .badge-cancelled { background: rgba(136,150,176,0.12); color: #8896b0; border: 1px solid rgba(136,150,176,0.25); text-decoration: line-through; }

    /* ── ACTIVITY ── */
    .activity-list { display: flex; flex-direction: column; }

    .activity-item {
      display: flex;
      gap: 13px;
      align-items: flex-start;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }

    .activity-item:last-child { border-bottom: none; }

    .activity-pulse {
      width: 8px; height: 8px;
      border-radius: 50%;
      background: var(--accent);
      margin-top: 5px;
      flex-shrink: 0;
      box-shadow: 0 0 0 3px var(--accent-dim);
    }

    .activity-pulse.amber { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-dim); }
    .activity-pulse.blue  { background: var(--blue);  box-shadow: 0 0 0 3px var(--blue-dim); }

    .activity-text {
      font-size: 13px;
      line-height: 1.5;
      color: var(--text-secondary);
    }

    .activity-text strong { color: var(--text-primary); font-weight: 500; }

    .activity-time {
      font-size: 11.5px;
      color: var(--text-muted);
      margin-top: 3px;
    }

    /* ── QUICK ACTIONS ── */
    .quick-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
      margin-bottom: 20px;
    }

    .action-card {
      background: var(--bg-2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .action-card:hover {
      border-color: var(--border-hover);
      background: var(--bg-3);
      transform: translateY(-2px);
    }

    .action-icon {
      width: 42px; height: 42px;
      border-radius: 11px;
      display: flex; align-items: center; justify-content: center;
      font-size: 18px;
      margin-bottom: 14px;
    }

    .action-icon.green { background: var(--accent-dim); }
    .action-icon.amber { background: var(--amber-dim); }
    .action-icon.blue  { background: var(--blue-dim); }
    .action-icon.red   { background: var(--red-dim); }

    .action-card h4 {
      font-size: 14px;
      font-weight: 600;
      margin-bottom: 6px;
      color: var(--text-primary);
    }

    .action-card p {
      font-size: 12.5px;
      color: var(--text-muted);
      line-height: 1.55;
    }

    /* ── BOTTOM GRID ── */
    .bottom-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    /* ── FORM ── */
    .input-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

    .input-group label {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.6px;
    }

    .input-group input,
    .input-group select,
    .input-group textarea {
      padding: 10px 13px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
      background: var(--bg-3);
      color: var(--text-primary);
      font-family: 'DM Sans', sans-serif;
      font-size: 13.5px;
      transition: border-color 0.18s;
      outline: none;
      width: 100%;
    }

    .input-group input::placeholder,
    .input-group textarea::placeholder { color: var(--text-muted); }

    .input-group input:focus,
    .input-group select:focus,
    .input-group textarea:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-dim);
    }

    .input-group select option { background: var(--bg-3); }

    .input-group textarea {
      min-height: 90px;
      resize: vertical;
      line-height: 1.5;
    }

    /* ── PLAN CARD ── */
    .plan-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
      font-size: 13.5px;
    }

    .plan-row:last-of-type { border-bottom: none; }

    .plan-row-label { color: var(--text-muted); }
    .plan-row-value { font-weight: 600; color: var(--text-primary); }

    .plan-banner {
      margin-top: 18px;
      padding: 14px 16px;
      border-radius: var(--radius-sm);
      background: linear-gradient(135deg, rgba(16,216,122,0.1), rgba(16,216,122,0.04));
      border: 1px solid rgba(16,216,122,0.18);
      font-size: 12.5px;
      color: #7de0ae;
      line-height: 1.6;
    }

    .plan-tag {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: linear-gradient(135deg, #0db868, #10d87a);
      color: #051309;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      padding: 4px 10px;
      border-radius: 99px;
      margin-bottom: 8px;
    }

    /* ── DIVIDER ── */
    .divider {
      height: 1px;
      background: var(--border);
      margin: 8px 0;
    }

    /* ── ANIMATIONS ── */
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(14px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .stat-card { animation: fadeUp 0.45s ease both; }
    .stat-card:nth-child(1) { animation-delay: 0.05s; }
    .stat-card:nth-child(2) { animation-delay: 0.10s; }
    .stat-card:nth-child(3) { animation-delay: 0.15s; }
    .stat-card:nth-child(4) { animation-delay: 0.20s; }

    .panel, .action-card { animation: fadeUp 0.5s ease both; }

    /* ── THEME TOGGLE ── */
    .theme-toggle {
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--bg-3);
      border: 1px solid var(--border);
      border-radius: 99px;
      padding: 5px 12px 5px 6px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      font-size: 12.5px;
      font-weight: 600;
      color: var(--text-secondary);
      transition: all 0.2s ease;
    }

    .theme-toggle:hover {
      border-color: var(--border-hover);
      color: var(--text-primary);
    }

    .toggle-track {
      width: 32px; height: 18px;
      background: var(--bg-4);
      border-radius: 99px;
      position: relative;
      transition: background 0.25s ease;
      border: 1px solid var(--border);
    }

    .invoicepulse-app.invoicepulse-app.light .toggle-track {
      background: var(--accent);
      border-color: var(--accent);
    }

    .toggle-thumb {
      width: 12px; height: 12px;
      background: var(--text-muted);
      border-radius: 50%;
      position: absolute;
      top: 2px; left: 2px;
      transition: transform 0.25s ease, background 0.25s ease;
    }

    .invoicepulse-app.invoicepulse-app.light .toggle-thumb {
      background: #fff;
      transform: translateX(14px);
    }

    /* ── RESPONSIVE ── */
    @media (max-width: 1200px) {
      .stats-grid { grid-template-columns: repeat(2, 1fr); }
      .quick-grid  { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 980px) {
      .content-grid, .bottom-grid { grid-template-columns: 1fr; }
    }

    @media (max-width: 820px) {
      .sidebar { display: none; }
      .main {
        margin-left: 0;
        width: 100%;
        max-width: none;
        padding: 16px 16px 88px;
      }
    }

    @media (max-width: 600px) {
      .stats-grid, .quick-grid { grid-template-columns: 1fr; }
    }
  
.ip-wrap { max-width: 480px; margin: 40px auto; padding: 0 20px; font-family: 'DM Sans', sans-serif; }
.ip-auth-card { background: #0f1420; border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 32px; color: #eef2f8; }
.ip-auth-card h2 { font-family: 'Instrument Serif', serif; font-size: 28px; margin-bottom: 8px; }
.ip-notice { padding: 12px 14px; border-radius: 9px; margin-bottom: 16px; font-size: 14px; }
.ip-notice-error { background: rgba(255,91,91,0.12); color: #ff5b5b; border: 1px solid rgba(255,91,91,0.2); }
.ip-notice-success { background: rgba(16,216,122,0.12); color: #10d87a; border: 1px solid rgba(16,216,122,0.2); }
.ip-notice-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.ip-notice-warning strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  color: #b45309;
}
.ip-notice-warning p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: inherit;
}
.invoicepulse-app.light .ip-notice-warning,
.ip-public .ip-notice-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
}
.invoicepulse-app.light .ip-notice-warning strong,
.ip-public .ip-notice-warning strong {
  color: #b45309;
}
.ip-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 9999; align-items: center; justify-content: center; padding: 20px; }
.ip-modal.is-open { display: flex; }
.ip-modal-box { background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 24px; max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto; color: var(--text-primary); }
.ip-modal-box { box-shadow: 0 24px 70px rgba(0,0,0,0.55); }
.invoicepulse-app.light .ip-modal { background: rgba(15,23,36,0.55); }
.invoicepulse-app.light .ip-modal-box { box-shadow: 0 20px 60px rgba(15,23,36,0.2); }

/* Better modal spacing for forms */
.ip-modal-box h3 { margin-top: 0; }
.ip-modal-box .input-group input,
.ip-modal-box .input-group select,
.ip-modal-box .input-group textarea {
  border-radius: 12px;
}
.ip-modal-box .btn { border-radius: 12px; }

/* Document builder wizard */
.ip-doc-wizard { display: flex; flex-direction: column; gap: 14px; }
.ip-wizard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ip-wizard-back { font-weight: 600; color: var(--text-muted); text-decoration: none; }
.ip-wizard-back:hover { color: var(--text-primary); }
.ip-wizard-title { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.ip-wizard-sub { margin: 4px 0 0; color: var(--text-muted); }
.ip-wizard-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}
.ip-wizard-layout.is-single-col {
  grid-template-columns: 1fr;
}
.ip-wizard-layout.is-single-col .ip-wizard-aside-col {
  display: none;
}
.ip-wizard-primary {
  min-width: 0;
}
.ip-wizard-aside-col {
  position: sticky;
  top: 18px;
  height: fit-content;
}
.ip-wizard-steps {
  display: grid;
  grid-template-columns: 1fr 32px 1fr 32px 1fr;
  gap: 8px;
  width: 100%;
  align-items: stretch;
  margin-bottom: 12px;
}
.ip-wizard-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
}
.ip-wizard-step.is-active { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ip-wizard-step.is-done { border-color: color-mix(in srgb, var(--accent) 28%, var(--border)); }
.ip-wizard-step-num { width: 22px; height: 22px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; background: color-mix(in srgb, var(--bg-2) 70%, var(--accent) 30%); }
.ip-wizard-step.is-active .ip-wizard-step-num { background: var(--accent); color: #061a0e; }
.ip-wizard-step-label { font-size: 13px; font-weight: 600; }
.ip-wizard-step-line {
  align-self: center;
  height: 2px;
  width: 100%;
  background: var(--border);
  border-radius: 1px;
}
.ip-wizard-panel { display: none; }
.ip-wizard-panel.is-active { display: block; }
.ip-required { color: var(--red, #ff5b5b); font-weight: 700; }
.ip-client-combobox.is-invalid .ip-client-search {
  border-color: var(--red, #ff5b5b);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red, #ff5b5b) 20%, transparent);
}
.ip-field-error {
  margin: 6px 0 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--red, #ff5b5b);
  line-height: 1.4;
}
.ip-modal-box .input-group input.is-invalid,
.ip-modal-box .input-group textarea.is-invalid {
  border-color: var(--red, #ff5b5b);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--red, #ff5b5b) 35%, transparent);
}
.ip-send-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.ip-aside-title { margin: 0 0 10px; font-size: 14px; }
.ip-aside-list { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 13px; line-height: 1.6; }
.ip-wizard-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.ip-wizard-form-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.ip-wizard-form-footer .btn-primary { margin-left: auto; }

/* Searchable client combobox */
.ip-combobox-wrap { position: relative; }
.ip-client-search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
}
.invoicepulse-app.light .ip-client-search { background: #fff; }
.ip-combobox-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  z-index: 50;
}
.invoicepulse-app.light .ip-combobox-dropdown { background: #fff; }
.ip-combobox-dropdown li {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}
.ip-combobox-dropdown li:hover,
.ip-combobox-dropdown li:focus {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.ip-combobox-dropdown li strong { font-weight: 600; color: var(--text-primary); }
.ip-combobox-dropdown li span { font-size: 12px; color: var(--text-muted); }
.ip-combobox-empty { color: var(--text-muted); cursor: default; }
.ip-combobox-empty:hover { background: transparent; }

/* No underline on button-style links app-wide */
.invoicepulse-app a.btn,
.invoicepulse-app .btn,
.invoicepulse-app .ip-wizard-back,
.invoicepulse-app .ip-row-actions a,
.invoicepulse-app .ip-table-actions a,
.invoicepulse-app .panel-header a.btn,
.invoicepulse-app .ip-wizard-form-footer a {
  text-decoration: none !important;
}
.invoicepulse-app a.btn:hover,
.invoicepulse-app .ip-row-actions a:hover,
.invoicepulse-app .ip-table-actions a:hover {
  text-decoration: none !important;
}
.ip-wizard-preview-panel { padding: 22px 18px; }
.ip-wizard-preview-panel--a4 { padding-bottom: 28px; }
.ip-wizard-a4 { margin-top: 8px; }
.ip-a4-frame--wizard {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  min-height: 420px;
}
.ip-a4-frame--wizard .ip-doc-preview.ip-a4-sheet {
  width: 100%;
  max-width: 210mm;
  min-height: 297mm;
  max-height: min(88vh, 920px);
  aspect-ratio: 210 / 297;
  flex-shrink: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
@media (max-width: 720px) {
  .ip-a4-frame--wizard .ip-doc-preview.ip-a4-sheet {
    max-width: 100%;
    min-height: auto;
  }
}

.ip-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ip-product-picker { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ip-product-picker select { flex: 1; min-width: 220px; }

.ip-line-items-table .col-product { min-width: 140px; }
.ip-line-items-table .col-desc { min-width: 140px; }
.ip-line-items-table .col-qty { width: 72px; }
.ip-line-items-table .col-price,
.ip-line-items-table .col-total { width: 110px; }
.ip-line-items-table .col-action { width: 48px; }
.ip-line-items-table { font-size: 12.5px; }
.ip-line-items-table thead th {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding-bottom: 10px;
}
.ip-date-input {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-2) 96%, #000 4%);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.invoicepulse-app.light .ip-date-input {
  background: #fff;
}
.ip-date-input:hover {
  border-color: var(--border-hover);
}
.ip-date-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.ip-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.75;
  filter: invert(0.85);
}
.invoicepulse-app.light .ip-date-input::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 0.6;
}
.ip-line-items-wrap { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: color-mix(in srgb, var(--bg-2) 96%, #000 4%); }
.invoicepulse-app.light .ip-line-items-wrap { background: #fff; }
.ip-line-items-table input { width: 100%; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: transparent; color: var(--text-primary); }
.invoicepulse-app.light .ip-line-items-table input { background: #fff; }
.ip-line-total-cell { text-align: right; font-weight: 700; color: var(--text-primary); font-size: 12.5px; }
.ip-remove-line { width: 34px; height: 34px; justify-content: center; padding: 0; }

.ip-create-totals { margin-top: 10px; border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: color-mix(in srgb, var(--bg-2) 96%, #000 4%); }
.invoicepulse-app.light .ip-create-totals { background: #fff; }
.ip-create-total-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 13px; color: var(--text-secondary); }
.ip-create-total-row strong { color: var(--text-primary); }
.ip-create-total-due { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 10px; font-size: 14px; }

.ip-doc-summary-card {
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-2) 96%, #000 4%);
}
.invoicepulse-app.light .ip-doc-summary-card { background: #f8fafc; }
.ip-doc-summary-title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ip-summary-meta { margin-bottom: 14px; }
.ip-summary-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}
.ip-summary-meta-row span { color: var(--text-muted); }
.ip-summary-lines-table { font-size: 12px; }
.ip-summary-lines-table th,
.ip-summary-lines-table td { padding: 8px 10px !important; }
.ip-summary-notes {
  margin: 14px 0;
  font-size: 13px;
}
.ip-summary-notes span { color: var(--text-muted); display: block; margin-bottom: 4px; }
.ip-summary-notes p { margin: 0; }
.ip-summary-totals {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.ip-summary-total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}
.ip-summary-total-due {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 15px;
}
.ip-summary-total-due strong { color: var(--accent); }

.ip-send-pill { display: inline-flex; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--border); color: var(--text-muted); font-size: 12px; margin-bottom: 12px; }
.ip-send-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ip-send-row strong { font-size: 16px; }
.ip-send-success { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); text-align: center; }
.ip-pay-link-row { display: flex; gap: 8px; margin-top: 8px; }
.ip-pay-link-input { flex: 1; min-width: 220px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: transparent; color: var(--text-primary); }

@media (max-width: 980px) {
  .ip-wizard-layout { grid-template-columns: 1fr; }
  .ip-wizard-aside-col { position: static; }
  .ip-form-row { grid-template-columns: 1fr; }
  .ip-wizard-steps {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .ip-wizard-step-line { display: none; }
}
.line-items-table input { width: 100%; }
.ip-empty { color: var(--text-muted); padding: 24px 0; text-align: center; }

/* Public home (landing / login / register) */
body.ip-public-page {
  margin: 0;
  background: #080b10;
  color: #eef2f8;
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  --bg-3: #141926;
  --bg-2: #0f1420;
  --border: rgba(255, 255, 255, 0.08);
  --text-primary: #eef2f8;
  --text-muted: #5f6d85;
  --accent: #10d87a;
  --accent-dim: rgba(16, 216, 122, 0.12);
}
body.ip-public-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 216, 122, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(91, 157, 255, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}
.ip-public {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.ip-public-header {
  padding: 22px 28px;
}
.ip-public-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
}
.ip-public-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(145deg, #0ca866, #10d87a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Instrument Serif', serif;
  font-size: 15px;
  color: #fff;
}
.ip-public-logo-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ip-public-panel {
  display: none;
  flex: 1;
  padding: 0 24px 48px;
  animation: ipFadeIn 0.35s ease;
}
.ip-public-panel.is-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
@keyframes ipFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ip-public-hero {
  max-width: 560px;
  text-align: center;
  padding: 24px 0 32px;
}
.ip-public-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7a94;
  margin-bottom: 20px;
}
.ip-public-hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(32px, 5.5vw, 48px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.ip-public-lead {
  font-size: 16px;
  line-height: 1.65;
  color: #8896b0;
  margin-bottom: 36px;
}
.ip-public-cta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 48px;
}
.ip-public-cta .ip-btn {
  text-decoration: none;
  min-width: 160px;
}
.ip-btn {
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
}
.ip-btn:hover { transform: translateY(-1px); }
.ip-btn-primary {
  background: #10d87a;
  color: #061a0e;
  box-shadow: 0 4px 20px rgba(16, 216, 122, 0.25);
}
.ip-btn-primary:hover { background: #12ee88; }
.ip-btn-secondary {
  background: transparent;
  color: #c5d0e0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ip-btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.ip-btn-block { width: 100%; }
.ip-public-points {
  list-style: none;
  display: grid;
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.ip-public-points li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(15, 20, 32, 0.9);
  font-size: 14px;
  color: #b8c4d8;
}
.ip-public-point-label {
  color: #5f6d85;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ip-public-form-wrap {
  width: 100%;
  max-width: 400px;
  padding: 8px 0;
}
.ip-public-form-wrap h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 8px;
}
.ip-public-form-desc {
  color: #8896b0;
  font-size: 14px;
  margin-bottom: 24px;
}
.ip-public-back {
  background: none;
  border: none;
  color: #8896b0;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0 0 20px;
  margin: 0;
}
.ip-public-back:hover { color: #eef2f8; }
.ip-public-form .input-group { margin-bottom: 16px; }
.ip-public-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #8896b0;
  margin-bottom: 20px;
  cursor: pointer;
}
.ip-public-switch {
  margin-top: 22px;
  font-size: 13px;
  color: #8896b0;
  text-align: center;
}
.ip-link-btn {
  background: none;
  border: none;
  color: #10d87a;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.ip-link-btn:hover { text-decoration: underline; }
.ip-public-footer {
  padding: 20px 28px;
  text-align: center;
  font-size: 12px;
  color: #4a566d;
  line-height: 1.5;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
body.ip-app-page { margin: 0; }

/* Topbar buttons — no underline */
.top-actions .btn,
.top-actions a.btn,
.top-actions .ip-btn-link {
  text-decoration: none !important;
}
.top-actions .ip-btn-link:hover,
.top-actions .ip-btn-link:focus {
  text-decoration: none !important;
}

/* Password show/hide */
.ip-password-field {
  position: relative;
  display: flex;
  align-items: center;
}
.ip-password-field input {
  width: 100%;
  padding-right: 44px;
}
.ip-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  padding: 0;
  opacity: 0.65;
  transition: opacity 0.15s;
}
.ip-password-toggle:hover {
  opacity: 1;
}
.ip-password-toggle::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  margin: 0 auto;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ip-password-toggle.is-visible::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94'/%3E%3Cpath d='M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94'/%3E%3Cpath d='M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E") center / contain no-repeat;
}
.invoicepulse-app .ip-password-toggle { color: var(--text-muted); }
body.ip-public-page .ip-password-toggle { color: #8896b0; }
body.ip-change-password-page .ip-password-toggle {
  color: #000;
  opacity: 0.7;
  z-index: 2;
}
body.ip-change-password-page .ip-password-toggle:hover {
  opacity: 1;
}

/* First-login password change — centered, no app chrome */
body.ip-change-password-page {
  margin: 0;
  min-height: 100vh;
  background: #f0f4f8;
  color: #0f1724;
}
body.ip-change-password-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(10, 168, 94, 0.08), transparent 55%);
  pointer-events: none;
}
.ip-change-password-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
  position: relative;
  z-index: 1;
}
.ip-change-password-center {
  width: 100%;
  max-width: 520px;
}
.ip-change-password-hero {
  text-align: center;
  margin-bottom: 28px;
}
.ip-change-password-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #0f1724;
}
.ip-change-password-hero h1 em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent, #0aa85e);
}
.ip-change-password-hero p {
  margin: 0;
  font-size: 15px;
  color: #4b5872;
}
.ip-change-password-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 32px rgba(15, 23, 36, 0.08);
  padding: 28px 28px 24px;
}
.ip-change-password-card-head {
  margin-bottom: 20px;
}
.ip-change-password-card-head h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  color: #0f1724;
}
.ip-change-password-card-head p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #4b5872;
}
.ip-change-password-card .input-group label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8896b0;
}
.ip-change-password-card .ip-password-field input {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #000;
  -webkit-text-fill-color: #000;
  caret-color: #000;
}
.ip-change-password-card .ip-password-field input::placeholder {
  color: #6b7280;
  -webkit-text-fill-color: #6b7280;
  opacity: 1;
}
.ip-change-password-card .ip-password-field input:focus {
  border-color: var(--accent, #0aa85e);
  box-shadow: 0 0 0 3px rgba(10, 168, 94, 0.15);
}
.ip-change-password-card .ip-password-field input.is-weak,
.ip-change-password-card .ip-password-field input.is-mismatch {
  border-color: #dc2626;
  background: #fff;
  color: #000;
  -webkit-text-fill-color: #000;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.ip-change-password-card .ip-password-field input.is-strong,
.ip-change-password-card .ip-password-field input.is-match {
  border-color: #0aa85e;
  background: #fff;
  color: #000;
  -webkit-text-fill-color: #000;
  box-shadow: 0 0 0 3px rgba(10, 168, 94, 0.12);
}
.ip-field-hint.ip-hint-ok {
  color: #0aa85e;
  font-weight: 500;
}
.ip-field-hint.ip-hint-warn {
  color: #dc2626;
  font-weight: 500;
}
.ip-change-password-brand {
  margin: 20px 0 0;
  text-align: center;
  font-size: 12px;
  color: #8896b0;
}
html[data-ip-theme='dark'] body.ip-change-password-page {
  background: #0a0d14;
  color: #eef2f8;
}
html[data-ip-theme='dark'] .ip-change-password-hero h1 { color: #eef2f8; }
html[data-ip-theme='dark'] .ip-change-password-card {
  background: #141926;
  border-color: #2a3347;
}
html[data-ip-theme='dark'] .ip-change-password-card .ip-password-field input {
  background: #fff;
  border-color: #cbd5e1;
  color: #000;
  -webkit-text-fill-color: #000;
}
html[data-ip-theme='dark'] body.ip-change-password-page .ip-password-toggle {
  color: #000;
}

/* Settings — view / edit */
.ip-hidden { display: none !important; }
.ip-business-view { padding-top: 4px; }
.ip-plan-row-block { align-items: flex-start; }
.ip-plan-row-block .plan-row-value { text-align: right; max-width: 60%; }
.ip-multiline { white-space: pre-line; line-height: 1.55; }
.ip-bank-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px 4px;
  margin: 8px 0 18px;
}
.ip-bank-fieldset legend {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding: 0 6px;
}
.ip-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) {
  .ip-form-row-2 { grid-template-columns: 1fr; }
}
.ip-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.ip-form-actions .btn-primary { flex: 1; min-width: 140px; justify-content: center; }
.ip-field-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
}
.ip-modal-sm {
  max-width: 400px;
  text-align: center;
}
.ip-modal-icon-success {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 26px;
  line-height: 52px;
  font-weight: 700;
}
.ip-modal-sm h3 {
  margin-bottom: 8px;
  font-size: 20px;
}
.ip-modal-sm p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}
.ip-modal-done-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  margin: 0 auto;
}
.ip-settings-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}
.ip-panel-intro {
  font-size: 13px;
  color: var(--text-muted);
  margin: -4px 0 16px;
  line-height: 1.5;
}
.ip-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.ip-check-label input { width: auto; margin: 0; }
.ip-branding-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .ip-branding-split { grid-template-columns: 1fr; }
  .ip-branding-preview-col { order: -1; }
}
.ip-branding-form-col .btn-primary { margin-top: 4px; }
.ip-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.ip-logo-upload-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.ip-logo-thumb-wrap {
  min-width: 64px;
  min-height: 48px;
  max-width: 180px;
  max-height: 80px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ip-logo-thumb-img {
  max-width: 160px;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.ip-logo-thumb-empty::before {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  margin: auto;
  background: linear-gradient(var(--text-muted), var(--text-muted)),
    linear-gradient(var(--text-muted), var(--text-muted));
  background-size: 100% 2px, 2px 100%;
  background-position: center;
  background-repeat: no-repeat;
}
.ip-logo-upload-actions {
  flex: 1;
  min-width: 180px;
}
.ip-logo-btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ip-logo-btn-row .btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.2;
}
.ip-logo-upload-status {
  font-size: 12px;
  color: var(--accent);
  margin-top: 6px;
}
.ip-logo-upload-status.ip-logo-status-error { color: var(--red); }
.ip-branding-preview-col {
  position: sticky;
  top: 16px;
}
.ip-a4-frame--branding {
  overflow: visible;
}
.ip-branding-preview-col .ip-doc-preview.ip-a4-sheet {
  max-height: min(88vh, 920px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ip-branding-preview-col .ip-doc-preview.ip-a4-sheet > .ip-doc-section[data-doc-section="footer"] {
  margin-top: 0;
  flex-shrink: 0;
  padding-bottom: 4px;
}
.ip-preview-heading {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.ip-color-themes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
@media (max-width: 640px) {
  .ip-color-themes { grid-template-columns: repeat(3, 1fr); }
}
.ip-color-theme {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.ip-color-theme:hover { border-color: var(--border-hover); }
.ip-color-theme.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.ip-color-theme-swatch {
  width: 100%;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--swatch-primary) 55%, var(--swatch-secondary) 45%);
}
.ip-color-theme-label {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}
.ip-a4-frame {
  background: #c5cdd8;
  padding: 14px;
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}
.ip-doc-preview.ip-a4-sheet {
  --ip-a4-pad-x: 20px;
  --ip-a4-pad-top: 22px;
  background: #fff;
  color: #1a2234;
  aspect-ratio: 210 / 297;
  width: 100%;
  max-height: min(72vh, 620px);
  margin: 0 auto;
  padding: var(--ip-a4-pad-top) var(--ip-a4-pad-x) 18px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
  font-size: 10px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  border-radius: 2px;
}
/* Document section drag-and-drop (Settings → Branding) */
.ip-doc-section-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb, var(--bg-2) 96%, #000 4%);
}
.invoicepulse-app.light .ip-doc-section-order-list {
  background: #fff;
}
.ip-doc-section-order-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: grab;
  font-size: 13px;
  color: var(--text-primary);
  user-select: none;
}
.ip-doc-section-order-item:last-child {
  border-bottom: none;
}
.ip-doc-section-order-item.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}
.ip-doc-section-order-item.is-drop-target {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.ip-doc-section-grip {
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: -2px;
  line-height: 1;
}
.ip-doc-layout-editable > .ip-doc-section {
  position: relative;
  margin-bottom: 18px;
  padding: 10px 8px 12px;
  border: 1px dashed transparent;
  border-radius: 8px;
  cursor: grab;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ip-doc-layout-editable > .ip-doc-section:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}
.ip-doc-layout-editable > .ip-doc-section.is-dragging {
  opacity: 0.6;
  cursor: grabbing;
}
.ip-doc-layout-editable > .ip-doc-section.is-drop-target {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.ip-doc-layout-editable > .ip-doc-section::before {
  content: '⋮⋮';
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: -2px;
  pointer-events: none;
}
.ip-pdf-export-host {
  position: absolute;
  left: -10000px;
  top: 0;
  width: 688px;
  overflow: hidden;
  pointer-events: none;
  z-index: 2147483645;
}
/* PDF export: fixed content width, equal L/R padding, natural height only */
.ip-pdf-export-clone.ip-doc-preview.ip-a4-sheet {
  --ip-a4-pad-x: 16px;
  --ip-a4-pad-top: 16px;
  max-height: none !important;
  overflow: hidden !important;
  aspect-ratio: auto !important;
  width: 656px !important;
  max-width: 656px !important;
  min-height: 0 !important;
  height: auto !important;
  display: block !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  color: #0a0f18 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: var(--ip-a4-pad-top) var(--ip-a4-pad-x) 16px !important;
  font-size: 10.5px !important;
  line-height: 1.5 !important;
  -webkit-font-smoothing: antialiased;
}
.ip-pdf-export-clone.ip-doc-preview.ip-a4-sheet.ip-pdf-page-fill {
  display: flex !important;
  flex-direction: column !important;
}
.ip-pdf-export-clone .ip-doc-pdf-body,
.ip-pdf-export-clone .ip-doc-pdf-bottom {
  width: 100% !important;
  max-width: 100% !important;
}
.ip-pdf-export-clone.ip-pdf-page-fill .ip-doc-pdf-body {
  flex: 0 0 auto !important;
}
.ip-pdf-export-clone.ip-pdf-page-fill .ip-doc-pdf-bottom {
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  margin-top: auto !important;
  min-height: 0 !important;
}
.ip-pdf-export-clone.ip-pdf-page-fill .ip-doc-pdf-bottom > .ip-doc-section[data-doc-section="payment"] {
  margin-top: 0 !important;
  padding-bottom: 8px !important;
}
.ip-pdf-export-clone.ip-pdf-page-fill .ip-doc-pdf-bottom > .ip-doc-section[data-doc-section="footer"] {
  margin-top: 0 !important;
  flex-shrink: 0 !important;
}
/* Spacing between main body sections only */
.ip-pdf-export-clone .ip-doc-pdf-body > .ip-doc-section {
  margin: 0 !important;
  padding-bottom: 32px !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
.ip-pdf-export-clone .ip-doc-pdf-body > .ip-doc-section:not(:last-child) {
  border-bottom: none !important;
}
.ip-pdf-export-clone .ip-doc-pdf-body > .ip-doc-section:last-child {
  padding-bottom: 28px !important;
  border-bottom: none !important;
}
.ip-pdf-export-clone.ip-doc-preview-classic .ip-doc-pdf-body > .ip-doc-section[data-doc-section="accent"],
.ip-pdf-export-clone.ip-doc-preview-minimal .ip-doc-pdf-body > .ip-doc-section[data-doc-section="accent"] {
  padding: 0 !important;
  border-bottom: none !important;
  min-height: 0 !important;
  line-height: 0 !important;
}
.ip-pdf-export-clone.ip-pdf-export-body-sheet.ip-doc-preview-modern {
  padding-top: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.ip-pdf-export-clone.ip-pdf-export-body-sheet.ip-doc-preview-modern > .ip-doc-pdf-body {
  padding-left: var(--ip-a4-pad-x, 16px) !important;
  padding-right: var(--ip-a4-pad-x, 16px) !important;
}
.ip-pdf-export-clone.ip-doc-preview-modern.ip-doc-preview.ip-a4-sheet,
.ip-pdf-export-clone.ip-pdf-export-body-sheet.ip-doc-preview-modern {
  padding: 0 0 16px 0 !important;
}
.ip-pdf-export-clone.ip-doc-preview-modern > .ip-doc-section[data-doc-section="accent"] {
  margin: 0 0 14px 0 !important;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  overflow: visible !important;
}
.ip-pdf-export-clone.ip-doc-preview-modern .ip-doc-pdf-body,
.ip-pdf-export-clone.ip-doc-preview-modern .ip-doc-pdf-bottom,
.ip-pdf-export-clone.ip-pdf-export-body-sheet.ip-doc-preview-modern > .ip-doc-pdf-body {
  padding-left: var(--ip-a4-pad-x, 16px) !important;
  padding-right: var(--ip-a4-pad-x, 16px) !important;
}
/* Payment + footer grouped at page bottom */
.ip-pdf-export-clone .ip-doc-pdf-bottom {
  margin-top: 28px !important;
  display: flex !important;
  flex-direction: column !important;
}
.ip-pdf-export-clone .ip-doc-pdf-bottom > .ip-doc-section[data-doc-section="payment"] {
  margin-top: 0 !important;
  padding-bottom: 8px !important;
  border-bottom: none !important;
}
.ip-pdf-export-clone .ip-doc-pdf-bottom > .ip-doc-section[data-doc-section="footer"] {
  margin-top: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
}
.ip-pdf-export-clone *,
.ip-pdf-export-clone *::before,
.ip-pdf-export-clone *::after {
  box-sizing: border-box !important;
}
.ip-pdf-export-clone .ip-doc-preview-accent {
  display: none !important;
}
.ip-pdf-export-clone.ip-doc-preview-modern .ip-doc-preview-accent {
  display: block !important;
  height: 5px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
}
/* Header: logo small on the left, company details on the right */
.ip-pdf-export-clone .ip-doc-preview-header {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 0 12px !important;
  border-bottom: none !important;
  overflow: hidden !important;
}
.ip-pdf-export-clone .ip-doc-header-logo {
  flex: 0 0 auto !important;
  max-width: 120px !important;
  width: auto !important;
  min-width: 0 !important;
}
.ip-pdf-export-clone .ip-doc-header-business {
  flex: 1 1 auto !important;
  max-width: calc(100% - 130px) !important;
  width: auto !important;
  min-width: 0 !important;
  margin-left: auto !important;
  text-align: right !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}
.ip-pdf-export-clone .ip-doc-header-business strong {
  font-size: 11.5px !important;
  color: #0a0f18 !important;
  line-height: 1.35 !important;
}
.ip-pdf-export-clone img.ip-doc-preview-logo:not(.ip-hidden) {
  display: block !important;
  max-width: 72px !important;
  max-height: 36px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: left center !important;
}
.ip-pdf-export-clone .ip-doc-preview-logo.ip-hidden {
  display: none !important;
  max-width: 0 !important;
  max-height: 0 !important;
}
.ip-pdf-export-clone .ip-doc-preview-mark {
  width: 40px !important;
  height: 40px !important;
  font-size: 14px !important;
  flex-shrink: 0 !important;
}
.ip-pdf-export-clone .ip-doc-preview-seller {
  color: #334155 !important;
  font-size: 10px !important;
}
.ip-pdf-export-clone .ip-doc-preview-split {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 16px 20px !important;
  width: 100% !important;
  margin: 0 !important;
  overflow: visible !important;
  align-items: start !important;
}
.ip-pdf-export-clone .ip-doc-preview-details {
  margin-left: auto !important;
  width: 100% !important;
  max-width: 220px !important;
  min-width: 180px !important;
  text-align: right !important;
}
.ip-pdf-export-clone .ip-doc-preview-details .ip-doc-preview-doc-title {
  text-align: right !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}
.ip-pdf-export-clone .ip-doc-preview-details .ip-doc-preview-dl {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 0 auto !important;
}
.ip-pdf-export-clone .ip-doc-preview-details .ip-doc-preview-dl > div {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 6px 14px !important;
  align-items: baseline !important;
  font-size: 9.5px !important;
}
.ip-pdf-export-clone .ip-doc-preview-block-title {
  color: #475569 !important;
  font-size: 9px !important;
  margin-bottom: 8px !important;
}
.ip-pdf-export-clone .ip-doc-preview-block strong {
  color: #0a0f18 !important;
  font-size: 11.5px !important;
}
.ip-pdf-export-clone .ip-doc-preview-block p {
  color: #1e293b !important;
  font-size: 10px !important;
}
.ip-pdf-export-clone .ip-doc-preview-doc-title {
  color: var(--doc-primary, #0d9668) !important;
  font-size: 15px !important;
  margin-bottom: 10px !important;
}
.ip-pdf-export-clone .ip-doc-preview-details .ip-doc-preview-dl dt {
  color: #64748b !important;
  text-align: left !important;
  white-space: nowrap !important;
}
.ip-pdf-export-clone .ip-doc-preview-details .ip-doc-preview-dl dd {
  color: #0a0f18 !important;
  font-weight: 700 !important;
  text-align: right !important;
  margin: 0 !important;
}
.ip-pdf-export-clone .ip-doc-preview-table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  margin: 0 !important;
}
.ip-pdf-export-clone .ip-doc-preview-table th,
.ip-pdf-export-clone .ip-doc-preview-table td {
  padding: 7px 6px !important;
  font-size: 10px !important;
  color: #1e293b !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  vertical-align: top !important;
}
.ip-pdf-export-clone .ip-doc-preview-table thead th {
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  background: var(--doc-primary, #10d87a) !important;
}
.ip-pdf-export-clone .ip-doc-preview-table tbody td {
  border-bottom: none !important;
}
.ip-pdf-export-clone .ip-doc-preview-table tbody tr:nth-child(even) td {
  background: #f1f5f9 !important;
}
.ip-pdf-export-clone .ip-doc-preview-table th:nth-child(1),
.ip-pdf-export-clone .ip-doc-preview-table td:nth-child(1) { width: 16%; }
.ip-pdf-export-clone .ip-doc-preview-table th:nth-child(2),
.ip-pdf-export-clone .ip-doc-preview-table td:nth-child(2) { width: 28%; }
.ip-pdf-export-clone .ip-doc-preview-table th:nth-child(3),
.ip-pdf-export-clone .ip-doc-preview-table td:nth-child(3) { width: 10%; }
.ip-pdf-export-clone .ip-doc-preview-table th:nth-child(4),
.ip-pdf-export-clone .ip-doc-preview-table td:nth-child(4) { width: 22%; }
.ip-pdf-export-clone .ip-doc-preview-table th:nth-child(5),
.ip-pdf-export-clone .ip-doc-preview-table td:nth-child(5) { width: 24%; }
.ip-pdf-export-clone .ip-doc-preview-totals {
  width: 48% !important;
  max-width: 100% !important;
  margin: 0 0 0 auto !important;
}
.ip-pdf-export-clone .ip-doc-totals-row {
  color: #334155 !important;
  font-size: 10.5px !important;
}
.ip-pdf-export-clone .ip-doc-total-due,
.ip-pdf-export-clone .ip-doc-total-due strong {
  color: #0a0f18 !important;
  font-size: 13px !important;
}
.ip-pdf-export-clone .ip-doc-payments-received {
  margin: 0 !important;
}
.ip-pdf-export-clone .ip-doc-preview-notes {
  margin: 0 !important;
}
.ip-pdf-export-clone .ip-doc-preview-notes p {
  color: #1e293b !important;
}
.ip-pdf-export-clone.ip-pdf-export-body-sheet,
.ip-pdf-export-clone.ip-pdf-export-tail-sheet {
  min-height: auto !important;
  display: block !important;
}
.ip-pdf-export-clone.ip-pdf-export-tail-sheet .ip-doc-pdf-bottom {
  margin-top: 0 !important;
}
.ip-pdf-export-clone .ip-doc-preview-pay-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-top: none !important;
  overflow: visible !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}
.ip-pdf-export-clone .ip-doc-preview-bank-text {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  font-size: 9.5px !important;
  border: 1px solid #e2e8f0 !important;
}
.ip-pdf-export-clone .ip-doc-preview-bank-ref {
  color: #334155 !important;
  font-size: 9.5px !important;
}
.ip-pdf-export-clone .ip-doc-preview-payments-title {
  color: #475569 !important;
  font-size: 9px !important;
}
.ip-pdf-export-clone .ip-pay-logo-badge {
  font-size: 10px !important;
  min-height: 28px !important;
  padding: 5px 11px !important;
}
.ip-pdf-export-clone .ip-pay-logo-empty {
  color: #475569 !important;
  font-size: 9.5px !important;
}
.ip-pdf-export-clone .ip-doc-invoicepulse-credit {
  margin: 6px 0 0 !important;
  padding: 0 !important;
  font-size: 9.5px !important;
  line-height: 1.45 !important;
  color: #94a3b8 !important;
  text-align: center !important;
}
.ip-pdf-export-clone .ip-doc-preview-footer + .ip-doc-invoicepulse-credit {
  margin-top: 6px !important;
}
.ip-pdf-export-clone .ip-doc-invoicepulse-brand {
  font-weight: 700 !important;
  color: #475569 !important;
  letter-spacing: 0.02em !important;
}
.ip-pdf-export-clone .ip-doc-preview-footer {
  margin: 0 !important;
  padding: 0 0 2px !important;
  border-top: none !important;
  color: #64748b !important;
  font-size: 9px !important;
  text-align: center !important;
}
.ip-pdf-export-clone .ip-doc-pdf-bottom > .ip-doc-section[data-doc-section="payment"] {
  padding-bottom: 0 !important;
}
.ip-pdf-export-clone .ip-doc-pdf-bottom > .ip-doc-section[data-doc-section="footer"] {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.ip-pdf-export-clone.ip-doc-preview-modern .ip-doc-total-due,
.ip-pdf-export-clone.ip-doc-preview-modern .ip-doc-total-due strong {
  color: #ffffff !important;
}
.ip-doc-preview-accent { display: none; }
.ip-doc-preview-bottom {
  margin-top: auto;
  width: 100%;
  flex-shrink: 0;
}
.ip-doc-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: none;
}
.ip-doc-header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-width: 42%;
}
.ip-doc-header-business {
  margin-left: auto;
  text-align: right;
  max-width: 58%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ip-doc-preview-logo,
.ip-business-logo,
.ip-pay-logo {
  max-width: 140px;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
  display: block;
  flex-shrink: 0;
}
.ip-business-logo--sidebar {
  max-width: 120px;
  max-height: 40px;
}
.ip-pay-logo {
  max-width: 100px;
  max-height: 48px;
  object-position: left center;
}
.ip-doc-preview-mark {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--doc-primary, #10d87a);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ip-doc-preview-brand strong {
  font-size: 12px;
  color: var(--doc-secondary, #0f1724);
  display: block;
}
.ip-doc-header-business strong {
  font-size: 11.5px;
  color: var(--doc-secondary, #0f1724);
  line-height: 1.35;
}
.ip-doc-preview-seller {
  margin: 4px 0 0;
  font-size: 9.5px;
  color: #6b7a94;
  line-height: 1.4;
}
.ip-doc-preview-split {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  margin-bottom: 16px;
  align-items: start;
}
.ip-doc-preview-details {
  margin-left: auto;
  width: 100%;
  max-width: 220px;
  min-width: 180px;
  text-align: right;
}
.ip-doc-preview-details .ip-doc-preview-doc-title {
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ip-doc-preview-details .ip-doc-preview-dl {
  width: 100%;
  max-width: 100%;
  margin: 0 0 0 auto;
}
.ip-doc-preview-details .ip-doc-preview-dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: baseline;
}
.ip-doc-preview-block-title {
  margin: 0 0 6px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8896b0;
  font-weight: 600;
}
.ip-doc-preview-block strong {
  font-size: 11.5px;
  color: var(--doc-secondary, #0f1724);
  display: block;
  margin-bottom: 2px;
}
.ip-doc-preview-block p {
  margin: 0 0 2px;
  font-size: 9.5px;
  color: #4a566d;
}
.ip-doc-preview-doc-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--doc-primary, #10d87a);
  letter-spacing: 0.04em;
}
.ip-doc-preview-dl {
  margin: 0;
  display: grid;
  gap: 5px;
}
.ip-doc-preview-dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: baseline;
  font-size: 9.5px;
}
.ip-doc-preview-details .ip-doc-preview-dl dt {
  color: #8896b0;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.ip-doc-preview-details .ip-doc-preview-dl dd {
  margin: 0;
  font-weight: 600;
  color: var(--doc-secondary, #0f1724);
  text-align: right;
}
.ip-doc-preview-dl dt {
  color: #8896b0;
  font-weight: 500;
}
.ip-doc-preview-dl dd {
  margin: 0;
  font-weight: 600;
  color: var(--doc-secondary, #0f1724);
}
.ip-doc-status-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
  font-size: 8.5px;
  font-weight: 600;
  text-transform: uppercase;
}
.ip-doc-preview-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.ip-doc-preview-table th,
.ip-doc-preview-table td {
  padding: 6px 5px;
  text-align: left;
  border-bottom: none;
  font-size: 9.5px;
}
.ip-doc-preview-table tbody tr:nth-child(even) td {
  background: #f1f5f9;
}
.ip-doc-preview-table thead th {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  font-weight: 700;
  background: var(--doc-primary, #10d87a);
  border-bottom: none;
}
.ip-doc-preview-table td:last-child,
.ip-doc-preview-table th:last-child {
  text-align: right;
}
.ip-doc-preview-totals {
  margin-left: auto;
  width: 52%;
  min-width: 140px;
  margin-bottom: 12px;
}
.ip-doc-totals-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  font-size: 10px;
  color: #4a566d;
}
.ip-doc-total-due {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 2px solid var(--doc-primary, #10d87a);
  font-size: 13px;
  font-weight: 700;
}
.ip-doc-total-due strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--doc-secondary, #0f1724);
}

/* List tables: filters & row actions */
.ip-list-toolbar {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 14px;
}
.ip-list-toolbar-filters {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.ip-list-toolbar-filters .ip-table-search {
  flex: 0 0 auto;
  width: 200px;
  max-width: min(200px, 45vw);
  min-width: 120px;
  padding: 8px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--text, #0f1724);
  font-size: 13px;
}
.ip-list-toolbar-filters .ip-table-status-filter {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--text, #0f1724);
  font-size: 13px;
}
@media (max-width: 520px) {
  .ip-list-toolbar {
    width: 100%;
  }
  .ip-list-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  .ip-list-toolbar-filters .ip-table-search {
    flex: 1 1 140px;
    width: auto;
    max-width: none;
  }
  .ip-list-toolbar-filters .ip-table-status-filter {
    flex: 0 1 auto;
  }
}
.ip-col-select {
  width: 40px;
  padding-right: 8px !important;
  vertical-align: middle;
}
.ip-col-select input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.ip-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ip-table-bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-2));
}
.ip-table-bulk-bar.ip-hidden {
  display: none;
}
.ip-bulk-count {
  font-size: 13px;
  color: var(--text-secondary);
  margin-right: 4px;
}
.ip-selectable-table tbody tr.is-selected td {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.ip-table-actions {
  min-width: 120px;
  vertical-align: top;
}
.ip-actions-menu {
  position: relative;
  display: inline-block;
}
.ip-actions-menu-toggle {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 6px 10px;
}
.ip-actions-caret {
  font-size: 10px;
  opacity: 0.75;
}
.ip-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.ip-row-actions .btn,
.ip-row-actions a.btn {
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
}
button.badge.ip-invoice-status-btn,
button.badge.ip-quote-status-btn {
  cursor: pointer;
  border: none;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
button.badge.ip-invoice-status-btn:hover,
button.badge.ip-quote-status-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
button.badge.ip-invoice-status-btn:focus-visible,
button.badge.ip-quote-status-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}
.ip-modal-sub {
  margin: -6px 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.ip-modal-confirm-text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary, #0f1724);
}
.ip-modal--warning .ip-modal-box {
  border-color: rgba(220, 38, 38, 0.25);
}
.ip-modal-warning-text {
  color: var(--text-primary, #0f1724);
}
.ip-delete-record-name:empty {
  display: none;
}
.ip-delete-record-name:not(:empty) {
  font-weight: 600;
  color: var(--text-primary, #0f1724);
}
.btn-destructive {
  background: #dc2626;
  color: #fff;
  border: none;
}
.btn-destructive:hover {
  background: #b91c1c;
  color: #fff;
}
.btn-destructive:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.btn-destructive.is-loading {
  pointer-events: none;
}
.ip-team-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.ip-team-actions .btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.3;
  min-height: 0;
  border-radius: 6px;
}
.btn-xs {
  padding: 4px 10px;
  font-size: 11px;
  line-height: 1.35;
  min-height: 0;
  border-radius: 6px;
}
.ip-email-sender-card {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--surface-2, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
}
.invoicepulse-app.light .ip-email-sender-card {
  background: #f5f7fa;
  border-color: #eaecf0;
}
.ip-email-notify-table tbody td {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}
.ip-email-notify-table tbody td:first-child {
  font-weight: 500;
  color: var(--text-primary, #eef2f8);
}
.ip-email-notify-table tbody td:first-child strong {
  font-family: inherit;
  font-weight: 600;
}
.ip-email-notify-table .ip-email-cell-desc {
  color: var(--muted, #8896b0);
  max-width: 220px;
}
.invoicepulse-app.light .ip-email-notify-table tbody td:first-child {
  color: #0f1724;
}
.invoicepulse-app.light .ip-email-notify-table .ip-email-cell-desc {
  color: #4b5872;
}
.ip-email-cell-actions {
  white-space: nowrap;
  width: 1%;
}
@media (min-width: 821px) {
  .ip-email-notify-table .ip-mob-inline-badge,
  .ip-email-notify-table .ip-mob-sub,
  .ip-team-table .ip-mob-sub,
  .ip-mobile-cards--settings .ip-mob-sub,
  .ip-mobile-cards--settings .ip-mob-inline-badge {
    display: none !important;
  }
  .ip-email-notify-table tbody td.ip-mob-primary,
  .ip-team-table tbody td.ip-mob-primary {
    font-weight: 500;
  }
  .ip-email-notify-table tbody td.ip-mob-primary .ip-mob-primary-title,
  .ip-team-table tbody td.ip-mob-primary .ip-mob-primary-title,
  .ip-mobile-cards--settings tbody td.ip-mob-primary .ip-mob-primary-title {
    font-size: inherit;
    font-weight: 600;
    display: inline;
  }
}
.ip-email-preview-frame-wrap {
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 10px;
  overflow: hidden;
  background: #f0f4f8;
}
.ip-email-preview-frame {
  display: block;
  width: 100%;
  height: 480px;
  border: 0;
  background: #fff;
}
.ip-modal-box--wide {
  max-width: 640px;
}
.ip-email-preview-from {
  margin: 0 0 12px;
}
.ip-panel-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ip-quick-invoice-success {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
}
.invoicepulse-app.light .ip-quick-invoice-success {
  background: #f0faf5;
  border-color: #c8ead8;
}
.ip-platform-payments-stack .ip-platform-payments-section {
  margin-bottom: 28px;
}
.ip-platform-payments-stack .ip-platform-payments-section:last-of-type {
  margin-bottom: 32px;
}
.ip-platform-form-actions {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.invoicepulse-app.light .ip-platform-form-actions {
  border-top-color: #eaecf0;
}
.ip-platform-gateways {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 8px;
}
.ip-gateway-logo-upload {
  margin-top: 14px;
  margin-bottom: 4px;
}
.ip-payments-form-actions {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
.invoicepulse-app.light .ip-payments-form-actions {
  border-top-color: #eaecf0;
}
.ip-payments-form-actions .ip-field-hint {
  margin: 0 0 16px;
}
.ip-payments-form-actions .btn-primary {
  margin-top: 0;
}
.ip-gateway-label-input {
  max-width: 180px;
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 6px;
  background: var(--bg, #0f1419);
  color: var(--text, #eef2f8);
}
.ip-platform-gateway-card {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 12px;
  background: var(--surface-2, rgba(255,255,255,0.03));
  position: relative;
}
.invoicepulse-app.light .ip-platform-gateway-card {
  background: #f9fafb;
  border-color: #eaecf0;
}
.ip-platform-gateway-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding-right: 4px;
}
.ip-gateway-actions-menu {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
}
.ip-gateway-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 8px;
  background: var(--surface-3, rgba(255,255,255,0.06));
  color: var(--text-muted, #8896b0);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ip-gateway-menu-toggle:hover,
.ip-gateway-actions-menu.is-open .ip-gateway-menu-toggle {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  color: var(--text-primary, #eef2f8);
}
.invoicepulse-app.light .ip-gateway-menu-toggle {
  background: #fff;
  border-color: #d0d5dd;
}
.invoicepulse-app.light .ip-gateway-menu-toggle:hover,
.invoicepulse-app.light .ip-gateway-actions-menu.is-open .ip-gateway-menu-toggle {
  background: #f0faf5;
  border-color: #86efac;
  color: #0f1724;
}
.ip-gateway-menu-chevron {
  font-size: 12px;
  line-height: 1;
}
.ip-gateway-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 140px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  background: var(--bg-2, #141926);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  z-index: 20;
}
.invoicepulse-app.light .ip-gateway-menu-dropdown {
  background: #fff;
  border-color: #eaecf0;
  box-shadow: 0 8px 24px rgba(15,23,36,0.12);
}
.ip-gateway-actions-menu.is-open .ip-gateway-menu-dropdown {
  display: block;
}
.ip-gateway-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary, #eef2f8);
  cursor: pointer;
}
.invoicepulse-app.light .ip-gateway-menu-item {
  color: #0f1724;
}
.ip-gateway-menu-item:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.ip-gateway-menu-item--danger {
  color: #f87171;
}
.invoicepulse-app.light .ip-gateway-menu-item--danger {
  color: #dc2626;
}
.ip-gateway-menu-item--danger:hover {
  background: rgba(220, 38, 38, 0.12);
}
.ip-gateway-logo-preview {
  height: 32px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  border-radius: 6px;
}
.ip-inline-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 8px;
  background: var(--bg, #0f1419);
  color: var(--text, #eef2f8);
}
.invoicepulse-app.light .ip-inline-input {
  background: #fff;
  color: #0f1724;
  border-color: #d8dee9;
}
.ip-inline-input--narrow {
  max-width: 120px;
}
.ip-analytics-panel--wide {
  grid-column: 1 / -1;
}
@media (min-width: 900px) {
  .ip-analytics-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .ip-analytics-panel--wide {
    grid-column: 1 / -1;
  }
}
.ip-check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  cursor: pointer;
}
.ip-check-row input {
  width: auto;
  margin: 3px 0 0;
  flex-shrink: 0;
}
.ip-check-row--sm span {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted, #8896b0);
}
.invoicepulse-app.light .ip-check-row--sm span {
  color: #4b5872;
}
.ip-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .ip-actions-menu-toggle {
    display: inline-flex;
  }
  .ip-table-actions {
    min-width: 0;
  }
  .ip-row-actions {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    min-width: 168px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  }
  .invoicepulse-app.light .ip-row-actions {
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 36, 0.12);
  }
  .ip-actions-menu.is-open .ip-row-actions {
    display: flex;
  }
  .ip-row-actions .btn,
  .ip-row-actions a.btn {
    width: 100%;
    justify-content: flex-start;
    font-size: 12px;
    padding: 8px 10px;
  }
}
.ip-view-body {
  font-size: 14px;
  line-height: 1.5;
}
.ip-view-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border, #e8edf4);
}
.ip-view-label {
  color: var(--muted, #64748b);
  flex-shrink: 0;
}
.ip-view-value {
  text-align: right;
  font-weight: 500;
}
/* Record view modal (client, product, etc.) */
.ip-modal-view .ip-modal-view-box {
  position: relative;
  max-width: 480px;
  padding: 0;
  overflow: hidden;
}
.ip-modal-view .ip-modal-view-box > .ip-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  margin: 0;
  font-size: 22px;
  line-height: 1;
  padding: 4px 10px;
  min-width: 0;
  background: var(--bg-2, #fff);
  border: 1px solid var(--border, #e8edf4);
  border-radius: 8px;
}
.ip-modal-view .ip-view-body {
  padding: 0;
}
.ip-record-view {
  padding: 0;
}
.ip-record-view-hero {
  padding: 20px 52px 16px 20px;
  border-bottom: 1px solid var(--border, #e8edf4);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent, #10d87a) 8%, transparent), transparent 72%);
}
.ip-record-view-kicker {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, #10d87a);
  margin-bottom: 6px;
}
.ip-record-view-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary, #0f1724);
  letter-spacing: -0.02em;
}
.ip-record-view-sub {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--text-muted, #64748b);
}
.ip-record-view-details {
  margin: 0;
  padding: 4px 0 8px;
  display: flex;
  flex-direction: column;
}
.ip-record-detail {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 16px;
  align-items: start;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border, #e8edf4);
}
.ip-record-detail:last-child {
  border-bottom: none;
  padding-bottom: 16px;
}
.ip-record-detail dt {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  letter-spacing: 0.02em;
}
.ip-record-detail dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #0f1724);
  word-break: break-word;
}
.invoicepulse-app:not(.light) .ip-modal-view .ip-modal-view-box > .ip-modal-close {
  background: color-mix(in srgb, var(--bg-2, #1a2234) 90%, #000);
}
.invoicepulse-app:not(.light) .ip-record-view-hero {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent, #10d87a) 14%, transparent), transparent 70%);
}
/* Save button loading state */
.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.88;
}
.btn.is-loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ip-spin 0.65s linear infinite;
}
@keyframes ip-spin {
  to { transform: rotate(360deg); }
}
.ip-view-lines {
  width: 100%;
  margin-top: 16px;
  font-size: 12px;
}
.ip-view-lines th,
.ip-view-lines td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border, #e8edf4);
}
/* Invoice A4 view modal */
.ip-modal.ip-modal-a4.is-open {
  align-items: flex-start;
  padding-top: 24px;
  padding-bottom: 24px;
  overflow-y: auto;
}
.ip-modal-a4 .ip-modal-a4-box {
  position: relative;
  max-width: min(calc(210mm + 48px), 96vw);
  width: 100%;
  max-height: none;
  padding: 16px 18px 20px;
  overflow: visible;
}
.ip-a4-frame--modal {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 210mm;
  margin: 0 auto;
  padding: 8px 0 0;
}
.ip-modal-fab-close,
.ip-modal-a4-box > .ip-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 22px;
  line-height: 1;
  padding: 4px 10px;
  min-width: 0;
}
.ip-analytics-charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.ip-analytics-panel .panel-header {
  flex-wrap: wrap;
  gap: 6px;
}
.ip-chart-wrap {
  position: relative;
  height: 240px;
  padding: 8px 4px 4px;
}
.ip-chart-wrap--donut {
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 900px) {
  .ip-analytics-charts {
    grid-template-columns: 1fr;
  }
}
.ip-modal-a4-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 44px 12px 0;
}
.ip-a4-frame--modal {
  display: flex;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  max-height: none;
}
.ip-invoice-view-body {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: visible;
}
.ip-invoice-view-body .ip-doc-preview.ip-a4-sheet {
  width: 100%;
  max-width: 210mm;
  min-height: auto;
  max-height: min(85vh, 297mm);
  aspect-ratio: 210 / 297;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  flex-shrink: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.ip-doc-payments-received {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #d0d8e4;
}
.ip-doc-payments-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5px;
  margin-top: 6px;
}
.ip-doc-payments-table th,
.ip-doc-payments-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.ip-doc-payments-table th {
  font-weight: 600;
  color: #64748b;
}
.ip-a4-loading {
  padding: 40px;
  text-align: center;
}
.ip-payment-balance {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.ip-doc-preview-notes {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #d0d8e4;
}
.ip-doc-preview-notes p {
  margin: 6px 0 0;
  font-size: 9.5px;
  color: #4a566d;
  white-space: pre-line;
}

.ip-muted {
  color: var(--muted, #64748b);
  font-size: 13px;
}
.ip-doc-preview-pay-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px dashed #d0d8e4;
}
@media (max-width: 400px) {
  .ip-doc-preview-pay-row { grid-template-columns: 1fr; }
}
.ip-doc-preview-bank {
  padding-right: 8px;
}
.ip-doc-preview-bank-text {
  margin: 0;
  padding: 9px 11px;
  background: #f4f7fb;
  border-radius: 6px;
  font-size: 9px;
  line-height: 1.5;
  white-space: pre-line;
  color: #4a566d;
  font-family: inherit;
}
.ip-doc-preview-bank-ref {
  margin: 6px 0 0;
  font-size: 9px;
  color: #8896b0;
  font-weight: 600;
}
.ip-doc-preview-payments {
  padding: 0;
}
.ip-doc-preview-payments-title {
  margin: 0 0 8px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #8896b0;
}
.ip-pay-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  border-radius: 4px;
  transition: opacity 0.15s ease;
}
.ip-pay-logo-link:hover {
  opacity: 0.85;
}
.ip-doc-pay-link-note {
  margin: 10px 0 0;
  font-size: 9px;
}
.ip-doc-eft-instruction {
  margin: 0;
  font-size: 10px;
  line-height: 1.5;
  color: #c5d0e0;
  max-width: 220px;
}
.invoicepulse-app.light .ip-doc-eft-instruction {
  color: #4b5872;
}
.ip-doc-preview-payments .ip-doc-eft-instruction {
  text-align: left;
}
.ip-pay-method-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ip-pay-logo-img {
  display: block;
  max-height: 32px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}
.ip-pay-logo-item {
  display: inline-flex;
  align-items: center;
}
.ip-gateway-toggle-brand {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}
.ip-gateway-toggle-brand .ip-pay-logo-img {
  max-height: 26px;
}
.plan-row--stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.plan-row--stack .ip-pay-method-logos {
  width: 100%;
}
.ip-gateway-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ip-gateway-picker-option {
  position: relative;
  flex: 0 1 auto;
  margin: 0;
  cursor: pointer;
}
.ip-gateway-picker-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ip-gateway-picker-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border: none;
  background: transparent;
  box-shadow: none;
  min-height: 0;
}
.ip-gateway-picker-option input:checked + .ip-gateway-picker-visual,
.ip-gateway-picker-option.is-selected .ip-gateway-picker-visual {
  border: none;
  background: transparent;
  box-shadow: none;
}
.ip-gateway-picker-option:not(:has(input:checked)) .ip-pay-logo-img {
  opacity: 0.45;
}
.ip-pay-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.ip-pay-logo-badge.ip-pay-logo-payfast {
  background: #f0f0f0;
  color: #c5203c;
  border-color: #e0e0e0;
}
.ip-pay-logo-badge.ip-pay-logo-ozow {
  background: #00e39b;
  color: #003d2e;
}
.ip-pay-logo-badge.ip-pay-logo-peach {
  background: #ff6b35;
  color: #fff;
}
.ip-pay-bank-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}
.ip-pay-bank-block h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #eef2f8;
}
.ip-pay-logo-empty {
  font-size: 9.5px;
  color: #8896b0;
  font-style: italic;
}
/*
 * Bottom layout: gap after totals, then payment + footer grouped near page bottom.
 */
.ip-doc-preview.ip-a4-sheet > .ip-doc-section[data-doc-section="payment"] {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 16px;
  padding-bottom: 6px;
  flex-shrink: 0;
}
.ip-doc-preview.ip-a4-sheet > .ip-doc-section[data-doc-section="footer"] {
  margin-top: 0;
  padding-top: 0;
  flex-shrink: 0;
}
.ip-doc-invoicepulse-credit {
  margin: 6px 0 0;
  padding: 0;
  font-size: 9.5px;
  line-height: 1.45;
  color: #94a3b8;
  text-align: center;
  letter-spacing: 0.01em;
}
.ip-doc-preview-footer + .ip-doc-invoicepulse-credit {
  margin-top: 6px;
}
.ip-doc-invoicepulse-brand {
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.02em;
}
.ip-doc-invoicepulse-credit.ip-hidden {
  display: none !important;
}
.ip-doc-preview-footer {
  margin-top: 0;
  padding: 0 0 2px;
  border-top: none;
  font-size: 9px;
  color: #6b7a94;
  text-align: center;
}
/* Template: modern (accent bar) */
.ip-doc-preview.ip-a4-sheet.ip-doc-preview-modern {
  padding-top: 0;
}
.ip-doc-preview-modern > .ip-doc-section[data-doc-section="accent"],
.ip-doc-layout-editable.ip-doc-preview-modern > .ip-doc-section[data-doc-section="accent"] {
  margin-left: calc(-1 * var(--ip-a4-pad-x, 20px));
  margin-right: calc(-1 * var(--ip-a4-pad-x, 20px));
  width: calc(100% + (2 * var(--ip-a4-pad-x, 20px)));
  max-width: none;
  padding: 0;
  margin-bottom: 14px;
  border: none;
  border-radius: 0;
  overflow: hidden;
}
.ip-doc-preview-modern > .ip-doc-section[data-doc-section="accent"]:first-child,
.ip-doc-layout-editable.ip-doc-preview-modern > .ip-doc-section[data-doc-section="accent"]:first-child {
  margin-top: 0;
}
.ip-doc-preview-modern .ip-doc-preview-accent {
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--doc-primary), var(--doc-secondary));
  margin: 0;
  width: 100%;
  max-width: none;
  border-radius: 0;
}
.ip-doc-preview.ip-a4-sheet.ip-doc-preview-modern > .ip-doc-section[data-doc-section="accent"]:first-child .ip-doc-preview-accent {
  border-radius: 2px 2px 0 0;
}
.ip-doc-preview-modern .ip-doc-preview-header {
  border-bottom: none;
}
.ip-doc-preview-modern .ip-doc-preview-table thead th {
  color: #fff;
}
.ip-doc-preview-modern .ip-doc-total-due {
  background: var(--doc-primary, #10d87a);
  color: #fff;
  padding: 6px 8px;
  border-radius: 4px;
  border-top: none;
  margin-top: 6px;
}
.ip-doc-preview-modern .ip-doc-total-due,
.ip-doc-preview-modern .ip-doc-total-due span,
.ip-doc-preview-modern .ip-doc-total-due strong {
  color: #fff;
  font-weight: 700;
}
/* Template: minimal */
.ip-doc-preview-minimal .ip-doc-preview-header {
  border-bottom: none;
}
.ip-doc-preview-minimal .ip-doc-preview-doc-title {
  color: var(--doc-secondary, #0f1724);
  font-weight: 600;
}
.ip-doc-preview-minimal .ip-doc-total-due strong {
  color: var(--doc-primary, #10d87a);
}
/* Template: professional — left stripe, bordered table, boxed total */
.ip-doc-preview.ip-a4-sheet.ip-doc-preview-professional {
  border-left: 5px solid var(--doc-primary, #10d87a);
  padding-left: calc(var(--ip-a4-pad-x, 20px) + 2px);
}
.ip-doc-preview-professional > .ip-doc-section[data-doc-section="accent"],
.ip-doc-layout-editable.ip-doc-preview-professional > .ip-doc-section[data-doc-section="accent"] {
  display: none;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.ip-doc-preview-professional .ip-doc-preview-accent {
  display: none;
}
.ip-doc-preview-professional .ip-doc-preview-header {
  border-bottom: 2px solid var(--doc-primary, #10d87a);
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.ip-doc-preview-professional .ip-doc-preview-doc-title {
  color: var(--doc-secondary, #0f1724);
  font-size: 14px;
  letter-spacing: 0.06em;
}
.ip-doc-preview-professional .ip-doc-preview-table thead th {
  background: transparent;
  color: var(--doc-secondary, #0f1724);
  border-bottom: 2px solid var(--doc-primary, #10d87a);
  font-weight: 700;
}
.ip-doc-preview-professional .ip-doc-preview-table th,
.ip-doc-preview-professional .ip-doc-preview-table td {
  border-bottom: 1px solid #e2e8f0;
}
.ip-doc-preview-professional .ip-doc-preview-table tbody tr:nth-child(even) td {
  background: transparent;
}
.ip-doc-preview-professional .ip-doc-totals-row {
  color: #4a566d;
}
.ip-doc-preview-professional .ip-doc-total-due {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--doc-primary, #10d87a);
  border-top: none;
  background: #f8fafc;
  border-radius: 0 4px 4px 0;
}
.ip-doc-preview-professional .ip-doc-total-due strong {
  color: var(--doc-secondary, #0f1724);
}
.ip-pdf-export-clone.ip-doc-preview-professional.ip-doc-preview.ip-a4-sheet {
  border-left: 5px solid var(--doc-primary, #10d87a) !important;
  padding-left: 18px !important;
}
.ip-pdf-export-clone.ip-doc-preview-professional .ip-doc-preview-table thead th {
  background: transparent !important;
  color: var(--doc-secondary, #0f1724) !important;
  border-bottom: 2px solid var(--doc-primary, #10d87a) !important;
}
.ip-pdf-export-clone.ip-doc-preview-professional .ip-doc-preview-table tbody tr:nth-child(even) td {
  background: transparent !important;
}
.ip-pdf-export-clone.ip-doc-preview-professional .ip-doc-preview-table th,
.ip-pdf-export-clone.ip-doc-preview-professional .ip-doc-preview-table td {
  border-bottom: 1px solid #e2e8f0 !important;
}
.ip-pdf-export-clone.ip-doc-preview-professional .ip-doc-total-due {
  border: 1px solid #e2e8f0 !important;
  border-left: 4px solid var(--doc-primary, #10d87a) !important;
  border-top: none !important;
  background: #f8fafc !important;
  padding: 8px 10px !important;
}
.ip-pdf-export-clone.ip-doc-preview-professional .ip-doc-total-due,
.ip-pdf-export-clone.ip-doc-preview-professional .ip-doc-total-due strong {
  color: #0a0f18 !important;
}
.ip-pdf-export-clone.ip-doc-preview-professional .ip-doc-preview-doc-title {
  color: var(--doc-secondary, #0f1724) !important;
}
.ip-pdf-export-clone.ip-doc-preview-professional .ip-doc-preview-header {
  border-bottom: 2px solid var(--doc-primary, #10d87a) !important;
}
.ip-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.ip-modal-head h3 {
  margin: 0;
  flex: 1;
  padding-right: 8px;
}
.ip-modal-close {
  flex-shrink: 0;
  font-size: 22px;
  line-height: 1;
  padding: 4px 10px;
  min-width: 0;
  margin: -4px -6px 0 0;
}
.ip-modal-sm .ip-modal-head {
  margin-bottom: 12px;
}
.ip-modal-sm .ip-modal-head + .ip-modal-sub {
  margin-top: -8px;
}
.ip-gateway-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-width: 920px;
}
.ip-gateway-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 0;
  transition: border-color 0.15s ease;
}
.ip-gateway-fieldset.is-expanded {
  grid-column: 1 / -1;
  max-width: 520px;
}
.ip-gateway-fieldset.is-enabled {
  border-color: rgba(16, 216, 122, 0.25);
}
.ip-gateway-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ip-gateway-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.ip-gateway-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
}
.ip-gateway-head { margin-bottom: 0; }
.ip-gateway-head .ip-field-hint { margin-top: 6px; margin-bottom: 0; }
.ip-gateway-fields {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
}
.ip-gateway-fieldset.is-collapsed .ip-gateway-fields,
.ip-gateway-fieldset:not(.is-expanded) .ip-gateway-fields {
  display: none;
}
.ip-gateway-fieldset.is-expanded .ip-gateway-fields {
  display: block;
}
.ip-pay-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: #0a0e17;
}
.ip-pay-card {
  width: 100%;
  max-width: 560px;
  background: #121a28;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 28px;
  color: #eef2f8;
}
.ip-pay-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--pay-accent, #10d87a);
}
.ip-pay-from { font-size: 12px; color: #8896b0; margin: 0 0 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.ip-pay-header h1 { margin: 0; font-size: 22px; }
.ip-pay-total { margin-left: auto; text-align: right; }
.ip-pay-total span { display: block; font-size: 11px; color: #8896b0; text-transform: uppercase; }
.ip-pay-total strong { font-size: 24px; color: var(--pay-accent, #10d87a); }
.ip-pay-lines { width: 100%; margin-bottom: 20px; font-size: 13px; border-collapse: collapse; }
.ip-pay-lines th, .ip-pay-lines td { padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,0.06); text-align: left; }
.ip-pay-lines th { color: #8896b0; font-weight: 500; }
.ip-pay-method-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  align-items: center;
}
.ip-pay-method-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}
.ip-pay-method-card:hover {
  border-color: color-mix(in srgb, var(--pay-accent, #10d87a) 45%, transparent);
}
.ip-pay-method-card .ip-pay-logo-img {
  max-height: 36px;
}
.ip-pay-bank { white-space: pre-line; background: rgba(0,0,0,0.25); padding: 14px; border-radius: 8px; font-size: 13px; margin: 12px 0; }
.ip-pay-notice { font-size: 13px; color: #8896b0; margin: 12px 0; }
.ip-pay-notice-warn { color: #f5a623; }
.ip-pay-footer { margin-top: 20px; font-size: 12px; color: #8896b0; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 14px; }
.ip-pay-success { text-align: center; }
.ip-pay-icon { width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%; background: rgba(16,216,122,0.15); color: var(--pay-accent); font-size: 26px; line-height: 52px; }
.ip-pay-wrap .btn {
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ip-pay-method-disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.ip-copy-link { font-size: 12px; padding: 6px 10px; }
