
    body { margin:0; background:#151515; }
    #notas-contables-app {
      --nc-bg: light-dark(#f5f3ee, #151515);
      --nc-paper: light-dark(#ffffff, #202020);
      --nc-paper-2: light-dark(#faf9f6, #282828);
      --nc-ink: light-dark(#20201d, #f3f1eb);
      --nc-muted: light-dark(#6d6a62, #aaa69c);
      --nc-line: light-dark(#dedbd2, #3b3a37);
      --nc-strong: light-dark(#252522, #f0eee8);
      --nc-strong-ink: light-dark(#ffffff, #171714);
      --nc-soft: light-dark(#ece9e1, #31302c);
      --nc-positive: light-dark(#246b4d, #7fd0aa);
      --nc-danger: light-dark(#a33a35, #f09a93);
      --nc-warning-bg: light-dark(#fff4df, #3b3020);
      --nc-warning-ink: light-dark(#714b0a, #f3cb80);
      --nc-blue: light-dark(#2366cc, #3478df);
      --nc-blue-ink: #ffffff;
      --nc-shadow: 0 12px 32px light-dark(rgba(45,42,34,.08), rgba(0,0,0,.22));
      color-scheme: light dark;
      background: var(--nc-bg);
      color: var(--nc-ink);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      width: 100%;
      min-height: 100vh;
      border-radius: 0;
      overflow: hidden;
    }
    #notas-contables-app * { box-sizing: border-box; }
    #notas-contables-app button,
    #notas-contables-app input,
    #notas-contables-app select,
    #notas-contables-app textarea { font: inherit; }
    #notas-contables-app .nc-app { max-width: 1080px; margin: 0 auto; padding: 22px; }
    #notas-contables-app .nc-topbar { display:flex; align-items:center; gap:14px; margin-bottom:22px; }
    #notas-contables-app .nc-brand { margin:0; font-size:20px; line-height:1.1; font-weight:500; letter-spacing:.02em; flex:1; }
    #notas-contables-app .nc-back { border:0; background:transparent; color:var(--nc-ink); min-width:40px; min-height:40px; border-radius:12px; font-size:22px; }
    #notas-contables-app .nc-back:hover { background:var(--nc-soft); }
    #notas-contables-app .nc-menu { width:44px; height:44px; padding:0; border:1px solid var(--nc-line); border-radius:13px; background:var(--nc-paper); display:grid; place-content:center; gap:3px; }
    #notas-contables-app .nc-menu span { display:block; width:14px; height:1.5px; background:var(--nc-ink); }
    #notas-contables-app .nc-btn { min-height:42px; border:1px solid var(--nc-line); border-radius:12px; padding:9px 14px; background:var(--nc-paper); color:var(--nc-ink); font-weight:500; }
    #notas-contables-app .nc-btn:hover { background:var(--nc-soft); }
    #notas-contables-app .nc-btn-primary { background:var(--nc-strong); color:var(--nc-strong-ink); border-color:var(--nc-strong); }
    #notas-contables-app .nc-btn-primary:hover { opacity:.9; background:var(--nc-strong); }
    #notas-contables-app .nc-btn-new { min-height:44px; background:var(--nc-blue); color:var(--nc-blue-ink); border-color:var(--nc-blue); padding-inline:18px; }
    #notas-contables-app .nc-btn-new:hover { background:var(--nc-blue); filter:brightness(1.06); }
    #notas-contables-app .nc-btn-danger { color:var(--nc-danger); }
    #notas-contables-app .nc-btn-ghost { background:transparent; border-color:transparent; }
    #notas-contables-app .nc-btn-small { min-height:36px; padding:7px 10px; border-radius:10px; font-size:13px; }
    #notas-contables-app .nc-btn:disabled { opacity:.45; cursor:not-allowed; }
    #notas-contables-app .nc-section-title { margin:0 0 12px; font-size:12px; letter-spacing:.11em; color:var(--nc-muted); font-weight:500; }
    #notas-contables-app .nc-card { background:var(--nc-paper); border:1px solid var(--nc-line); border-radius:18px; box-shadow:var(--nc-shadow); }
    #notas-contables-app .nc-dashboard { padding:18px; margin-bottom:18px; box-shadow:none; }
    #notas-contables-app .nc-dashboard-controls { display:grid; grid-template-columns:190px 52px minmax(0,1fr) 52px; align-items:center; gap:10px; }
    #notas-contables-app .nc-dashboard-controls .nc-select,
    #notas-contables-app .nc-period-button,
    #notas-contables-app .nc-date-picker { min-height:52px; }
    #notas-contables-app .nc-dashboard-controls .nc-select { padding-inline:14px; }
    #notas-contables-app .nc-period-button { width:52px; border:1px solid var(--nc-line); background:var(--nc-paper); color:var(--nc-ink); border-radius:12px; display:grid; place-items:center; }
    #notas-contables-app .nc-period-button:hover { background:var(--nc-soft); }
    #notas-contables-app .nc-period-button svg { width:19px; height:19px; }
    #notas-contables-app .nc-date-picker { position:relative; display:flex; align-items:center; border:1px solid var(--nc-line); background:var(--nc-paper); border-radius:12px; overflow:hidden; }
    #notas-contables-app .nc-date-picker:focus-within { outline:3px solid color-mix(in srgb, var(--nc-ink) 13%, transparent); border-color:var(--nc-muted); }
    #notas-contables-app .nc-date-display { padding:0 48px 0 14px; font-size:16px; font-variant-numeric:tabular-nums; }
    #notas-contables-app .nc-date-picker > svg,
    #notas-contables-app .nc-date-picker > i { position:absolute; right:15px; width:20px; height:20px; color:var(--nc-ink); pointer-events:none; }
    #notas-contables-app .nc-date-picker input { position:absolute; inset:0; width:100%; height:100%; opacity:0; border:0; }
    #notas-contables-app .nc-period-label { text-align:center; font-size:14px; color:var(--nc-muted); margin:16px 0 18px; text-transform:none; }
    #notas-contables-app .nc-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    #notas-contables-app .nc-metric { background:var(--nc-paper-2); border-radius:14px; padding:14px; }
    #notas-contables-app .nc-metric span { display:block; color:var(--nc-muted); font-size:11px; letter-spacing:.09em; margin-bottom:8px; }
    #notas-contables-app .nc-metric strong { font-size:22px; font-weight:500; font-variant-numeric:tabular-nums; }
    #notas-contables-app .nc-list-tools { display:grid; grid-template-columns:minmax(0,2fr) minmax(190px,1fr); gap:10px; margin-bottom:14px; }
    #notas-contables-app .nc-input,
    #notas-contables-app .nc-select,
    #notas-contables-app .nc-textarea { width:100%; min-height:44px; border:1px solid var(--nc-line); border-radius:12px; background:var(--nc-paper); color:var(--nc-ink); padding:10px 12px; }
    #notas-contables-app .nc-textarea { min-height:94px; resize:vertical; }
    #notas-contables-app .nc-input:focus,
    #notas-contables-app .nc-select:focus,
    #notas-contables-app .nc-textarea:focus { outline:3px solid color-mix(in srgb, var(--nc-ink) 13%, transparent); border-color:var(--nc-muted); }
    #notas-contables-app .nc-notes { display:flex; flex-direction:column; gap:12px; }
    #notas-contables-app .nc-note-card { min-height:96px; padding:12px; box-shadow:none; display:flex; align-items:stretch; gap:12px; }
    #notas-contables-app .nc-note-main { background:transparent; border:0; color:inherit; padding:2px 8px; text-align:left; flex:1; min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:20px; border-radius:12px; }
    #notas-contables-app .nc-note-main:hover { background:var(--nc-paper-2); }
    #notas-contables-app .nc-note-meta { min-width:0; }
    #notas-contables-app .nc-note-amount { display:flex; flex-direction:column; align-items:flex-end; justify-content:center; min-width:150px; }
    #notas-contables-app .nc-note-title { font-size:18px; font-weight:500; margin:0 0 5px; overflow-wrap:anywhere; }
    #notas-contables-app .nc-date { color:var(--nc-muted); font-size:13px; }
    #notas-contables-app .nc-amount-label { color:var(--nc-muted); font-size:12px; }
    #notas-contables-app .nc-amount { font-size:21px; font-weight:500; margin-top:2px; font-variant-numeric:tabular-nums; }
    #notas-contables-app .nc-badge { display:inline-flex; align-items:center; min-height:26px; padding:4px 9px; border-radius:999px; background:var(--nc-soft); color:var(--nc-positive); font-size:12px; white-space:nowrap; }
    #notas-contables-app .nc-share-icon { flex:0 0 48px; width:48px; min-height:48px; align-self:center; display:grid; place-items:center; border:1px solid var(--nc-line); border-radius:12px; background:var(--nc-paper); color:var(--nc-ink); }
    #notas-contables-app .nc-share-icon:hover { background:var(--nc-soft); }
    #notas-contables-app .nc-share-icon svg { width:20px; height:20px; }
    #notas-contables-app .nc-empty { grid-column:1/-1; padding:42px 20px; text-align:center; color:var(--nc-muted); background:var(--nc-paper); border:1px dashed var(--nc-line); border-radius:18px; }
    #notas-contables-app .nc-editor-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:18px; align-items:start; }
    #notas-contables-app .nc-editor-main { display:flex; flex-direction:column; gap:14px; }
    #notas-contables-app .nc-sheet { padding:18px; box-shadow:none; }
    #notas-contables-app .nc-field-grid { display:grid; grid-template-columns:minmax(0,1fr) 170px; gap:12px; }
    #notas-contables-app .nc-field label { display:block; color:var(--nc-muted); font-size:12px; margin:0 0 6px; }
    #notas-contables-app .nc-add-line { display:grid; grid-template-columns:minmax(0,1fr) 180px auto; gap:10px; align-items:end; }
    #notas-contables-app .nc-message { border-radius:12px; padding:10px 12px; background:var(--nc-warning-bg); color:var(--nc-warning-ink); font-size:13px; margin-top:12px; }
    #notas-contables-app .nc-lines,
    #notas-contables-app .nc-payments { display:flex; flex-direction:column; }
    #notas-contables-app .nc-line-row,
    #notas-contables-app .nc-payment-row { padding:14px 0; border-bottom:1px solid var(--nc-line); }
    #notas-contables-app .nc-line-row:last-child,
    #notas-contables-app .nc-payment-row:last-child { border-bottom:0; }
    #notas-contables-app .nc-line-display { display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:8px; align-items:center; }
    #notas-contables-app .nc-line-display.nc-line-readonly { grid-template-columns:minmax(0,1fr) auto; }
    #notas-contables-app .nc-payment-display { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; }
    #notas-contables-app .nc-line-details { min-width:0; }
    #notas-contables-app .nc-line-end { display:flex; align-items:center; justify-content:flex-end; gap:2px; }
    #notas-contables-app .nc-line-content { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:start; }
    #notas-contables-app .nc-line-text { font-size:15px; overflow-wrap:anywhere; }
    #notas-contables-app .nc-line-value { font-weight:500; white-space:nowrap; font-variant-numeric:tabular-nums; }
    #notas-contables-app .nc-crossed .nc-line-text,
    #notas-contables-app .nc-crossed .nc-line-value { text-decoration:line-through; color:var(--nc-muted); }
    #notas-contables-app .nc-timestamp { color:var(--nc-muted); font-size:12px; margin-top:5px; }
    #notas-contables-app .nc-row-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
    #notas-contables-app .nc-line-icon { width:44px; height:44px; padding:0; display:grid; place-items:center; border:0; border-radius:11px; background:transparent; color:var(--nc-muted); }
    #notas-contables-app .nc-line-icon:hover { background:var(--nc-soft); color:var(--nc-ink); }
    #notas-contables-app .nc-line-icon svg { width:18px; height:18px; }
    #notas-contables-app .nc-line-icon.nc-line-delete { color:var(--nc-danger); }
    #notas-contables-app .nc-inline-box { background:var(--nc-paper-2); border-radius:14px; padding:12px; }
    #notas-contables-app .nc-inline-fields { display:grid; grid-template-columns:minmax(0,1fr) 170px; gap:10px; }
    #notas-contables-app .nc-summary { padding:18px; position:sticky; top:12px; box-shadow:none; }
    #notas-contables-app .nc-summary-row { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:9px 0; color:var(--nc-muted); }
    #notas-contables-app .nc-summary-row strong { color:var(--nc-ink); font-size:18px; font-weight:500; font-variant-numeric:tabular-nums; }
    #notas-contables-app .nc-summary-row.nc-balance { border-top:1px solid var(--nc-line); margin-top:4px; padding-top:14px; color:var(--nc-ink); font-weight:500; }
    #notas-contables-app .nc-summary-row.nc-balance strong { font-size:24px; }
    #notas-contables-app .nc-summary-actions { display:flex; flex-direction:column; gap:8px; margin-top:16px; }
    #notas-contables-app .nc-payment-panel { margin-top:14px; }
    #notas-contables-app .nc-paid-box { text-align:center; padding:18px 10px 8px; }
    #notas-contables-app .nc-paid-mark { color:var(--nc-positive); font-size:18px; font-weight:500; margin-bottom:8px; }
    #notas-contables-app .nc-config { max-width:720px; margin:0 auto; display:flex; flex-direction:column; gap:14px; }
    #notas-contables-app .nc-config-section { padding:18px; box-shadow:none; }
    #notas-contables-app .nc-config-section h2 { font-size:16px; margin:0 0 14px; font-weight:500; }
    #notas-contables-app .nc-config-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    #notas-contables-app .nc-upload { display:grid; grid-template-columns:100px minmax(0,1fr); gap:16px; align-items:center; }
    #notas-contables-app .nc-upload-preview { width:100px; height:100px; border-radius:14px; background:var(--nc-paper-2); border:1px dashed var(--nc-line); display:grid; place-items:center; overflow:hidden; color:var(--nc-muted); font-size:12px; text-align:center; }
    #notas-contables-app .nc-upload-preview img { width:100%; height:100%; object-fit:contain; background:#fff; }
    #notas-contables-app .nc-file { max-width:100%; }
    #notas-contables-app .nc-share { max-width:760px; margin:0 auto; }
    #notas-contables-app .nc-receipt-wrap { background:var(--nc-soft); border-radius:18px; padding:20px; display:grid; place-items:center; overflow:auto; }
    #notas-contables-app #nc-receipt-canvas { width:min(100%,380px); height:auto; background:#fff; box-shadow:0 12px 28px rgba(0,0,0,.16); }
    #notas-contables-app .nc-share-actions { display:flex; justify-content:center; align-items:flex-end; gap:10px; margin-top:14px; flex-wrap:wrap; }
    #notas-contables-app .nc-share-format { min-width:110px; }
    #notas-contables-app .nc-subhead { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
    #notas-contables-app .nc-subhead h2 { margin:0; font-size:16px; font-weight:500; }
    #notas-contables-app .nc-hidden { display:none !important; }
    #notas-contables-app #nc-sync {
      position:sticky;top:0;z-index:20;padding:12px 20px;
      background:var(--nc-warning-bg);color:var(--nc-warning-ink);
      text-align:center;font-size:14px;
    }
    #notas-contables-app #nc-sync[hidden] { display:none; }
    #notas-contables-app .nc-loading { min-height:70vh;display:grid;place-items:center;color:var(--nc-muted); }
    #notas-contables-app .nc-auth-card {
      max-width:440px;margin:8vh auto 0;padding:32px;
      border:1px solid var(--nc-line);border-radius:22px;background:var(--nc-paper);
      box-shadow:var(--nc-shadow);
    }
    #notas-contables-app .nc-auth-symbol {
      width:52px;height:52px;display:grid;place-items:center;
      border-radius:14px;background:var(--nc-blue);color:#fff;font-size:28px;font-weight:700;
    }
    #notas-contables-app .nc-auth-card h1 { font-size:26px;margin:22px 0 6px; }
    #notas-contables-app .nc-auth-card h2 { font-size:17px;font-weight:600;margin:26px 0 18px; }
    #notas-contables-app .nc-auth-card p { color:var(--nc-muted);margin:0; }
    #notas-contables-app .nc-auth-card form { display:grid;gap:15px; }
    #notas-contables-app .nc-auth-submit { margin-top:4px;width:100%; }
    #notas-contables-app .nc-auth-links { display:flex;justify-content:space-between;gap:10px;margin-top:20px; }
    #notas-contables-app .nc-auth-links button {
      border:0;background:transparent;color:var(--nc-blue);
      padding:6px 0;cursor:pointer;font:inherit;
    }
    #notas-contables-app .nc-account-email { color:var(--nc-muted);margin:0 0 14px;overflow-wrap:anywhere; }
    #notas-contables-app .nc-conflict-actions { display:grid;gap:10px;margin-top:24px; }
    #notas-contables-app .nc-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
    @media (max-width: 760px) {
      #notas-contables-app { border-radius:16px; }
      #notas-contables-app .nc-app { padding:15px; }
      #notas-contables-app .nc-dashboard-controls { grid-template-columns:minmax(120px,1fr) 46px minmax(0,2fr) 46px; gap:8px; }
      #notas-contables-app .nc-dashboard-controls .nc-select,
      #notas-contables-app .nc-period-button,
      #notas-contables-app .nc-date-picker { min-height:48px; }
      #notas-contables-app .nc-period-button { width:46px; }
      #notas-contables-app .nc-editor-layout { grid-template-columns:1fr; }
      #notas-contables-app .nc-summary { position:static; order:-1; }
      #notas-contables-app .nc-add-line { grid-template-columns:1fr; }
      #notas-contables-app .nc-field-grid,
      #notas-contables-app .nc-inline-fields,
      #notas-contables-app .nc-config-fields { grid-template-columns:1fr; }
    }
    @media (max-width: 460px) {
      #notas-contables-app .nc-auth-card { margin:3vh auto 0;padding:22px; }
      #notas-contables-app .nc-topbar { align-items:flex-start; flex-wrap:wrap; }
      #notas-contables-app .nc-brand { flex-basis:calc(100% - 110px); }
      #notas-contables-app .nc-topbar > .nc-btn-new { order:3; width:100%; }
      #notas-contables-app .nc-dashboard-controls { grid-template-columns:44px minmax(0,1fr) 44px; }
      #notas-contables-app .nc-dashboard-controls .nc-select { grid-column:1/-1; }
      #notas-contables-app .nc-period-button { width:44px; }
      #notas-contables-app .nc-list-tools { grid-template-columns:1fr; }
      #notas-contables-app .nc-metric strong { font-size:18px; }
      #notas-contables-app .nc-upload { grid-template-columns:1fr; }
      #notas-contables-app .nc-line-content { grid-template-columns:1fr; }
      #notas-contables-app .nc-line-value { justify-self:start; }
      #notas-contables-app .nc-line-display { grid-template-columns:44px minmax(0,1fr); gap:4px 7px; }
      #notas-contables-app .nc-line-toggle { grid-row:1 / span 2; }
      #notas-contables-app .nc-line-end { grid-column:1/-1; justify-self:end; }
      #notas-contables-app .nc-line-readonly { grid-template-columns:minmax(0,1fr) !important; }
      #notas-contables-app .nc-line-readonly .nc-line-end { grid-column:1; }
      #notas-contables-app .nc-payment-display { grid-template-columns:minmax(0,1fr); }
      #notas-contables-app .nc-payment-display .nc-line-end { grid-column:1; }
      #notas-contables-app .nc-note-card { gap:8px; padding:10px; }
      #notas-contables-app .nc-note-main { grid-template-columns:minmax(0,1fr); gap:9px; }
      #notas-contables-app .nc-note-amount { align-items:flex-start; min-width:0; }
      #notas-contables-app .nc-share-icon { flex-basis:46px; width:46px; }
    }
  
