/* Quick receipt capture: only in the phone's burger menu; a bottom sheet with photo → check → private/business. */
#tarvi-tabs .tab-quick { display: none; }
@media (max-width: 640px) {
  #workspace #tarvi-tabs.open > .tab.tab-quick:not([hidden]) {
    display: flex; align-items: center; gap: 10px; order: -1; margin: 0 0 6px; padding: 13px 14px;
    font-size: 15px; font-weight: 650; color: #fff; border: 1px solid rgba(140, 200, 255, .22); border-radius: 12px;
    background: linear-gradient(135deg, rgba(56, 140, 255, .32), rgba(98, 210, 240, .14));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  }
  #workspace #tarvi-tabs.open > .tab.tab-quick::after { content: none; }
  #tarvi-tabs .tab-quick::before {
    content: ""; width: 18px; height: 18px; flex: none;
    background: currentColor;
    -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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h12v20l-3-2-3 2-3-2-3 2z'/%3E%3Cpath d='M9 7h6M9 11h6M9 15h4'/%3E%3C/svg%3E") center / contain no-repeat;
            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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h12v20l-3-2-3 2-3-2-3 2z'/%3E%3Cpath d='M9 7h6M9 11h6M9 15h4'/%3E%3C/svg%3E") center / contain no-repeat;
  }
}

body.rc-lock { overflow: hidden; }
.rc-sheet { position: fixed; inset: 0; z-index: 400; display: flex; align-items: flex-end; justify-content: center; }
.rc-sheet[hidden] { display: none; }
.rc-backdrop { position: absolute; inset: 0; background: rgba(2, 8, 14, .62); backdrop-filter: blur(3px); animation: rc-fade .2s ease-out; }
.rc-panel {
  position: relative; width: min(560px, 100%); max-height: calc(100dvh - 24px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0;
  color: var(--k-text, #e8f4fa); background: #0d1b26; border: 1px solid var(--k-line, rgba(127, 230, 255, .18)); border-bottom: 0;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .45); animation: rc-rise .26s cubic-bezier(.2, .8, .2, 1);
}
@keyframes rc-rise { from { transform: translateY(40px); opacity: .4; } }
@keyframes rc-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rc-panel, .rc-backdrop { animation: none; } }
.rc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.rc-head h2 { margin: 0; font-size: 1.35rem; }
.rc-head .eyebrow { margin: 0 0 2px; }
.rc-close { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: inherit; background: rgba(255, 255, 255, .08); }
.rc-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rc-camera {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 150px; margin: 14px 0 10px;
  font-weight: 700; font-size: 1.05rem; color: #04121c; border-radius: 18px; cursor: pointer;
  background: linear-gradient(140deg, var(--k-accent, #5fd4f4), color-mix(in srgb, var(--k-accent, #5fd4f4) 60%, #fff));
  box-shadow: 0 10px 30px color-mix(in srgb, var(--k-accent, #5fd4f4) 30%, transparent);
}
.rc-camera:active { transform: scale(.98); }
.rc-camera-icon { width: 44px; height: 44px; background: currentColor;
  -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='1.8' stroke-linejoin='round'%3E%3Cpath d='M3 8h4l2-3h6l2 3h4v12H3z'/%3E%3Ccircle cx='12' cy='13.5' r='3.8'/%3E%3C/svg%3E") center / contain no-repeat;
          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='1.8' stroke-linejoin='round'%3E%3Cpath d='M3 8h4l2-3h6l2 3h4v12H3z'/%3E%3Ccircle cx='12' cy='13.5' r='3.8'/%3E%3C/svg%3E") center / contain no-repeat; }
.rc-library { display: flex; justify-content: center; width: 100%; }
.rc-open { margin-top: 18px; }
.rc-open h3 { margin: 0 0 8px; font-size: .95rem; opacity: .8; }
.rc-open-list { display: grid; gap: 6px; }
.rc-open-item { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 14px; text-align: left; color: inherit; border: 1px solid var(--k-line, rgba(127, 230, 255, .18)); border-radius: 12px; background: rgba(255, 255, 255, .04); }
.rc-open-item span { opacity: .75; white-space: nowrap; }
.rc-step[data-step="reading"] { display: grid; justify-items: center; gap: 12px; padding: 40px 0; }
.rc-step[hidden] { display: none !important; }
.rc-spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--k-accent, #5fd4f4); animation: rc-spin .9s linear infinite; }
@keyframes rc-spin { to { transform: rotate(360deg); } }
.rc-summary { display: flex; gap: 12px; align-items: center; padding: 12px; margin-bottom: 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.rc-summary > div { display: grid; gap: 2px; min-width: 0; }
.rc-summary strong { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-thumb { width: 56px; height: 72px; flex: none; object-fit: cover; border-radius: 8px; }
.rc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rc-field { display: grid; gap: 4px; margin: 0; font-size: .85rem; min-width: 0; }
.rc-field input, .rc-field select { margin: 0; }
.rc-field span { opacity: .78; }
.rc-supplier, .rc-supplier_tax_number, .rc-supplier_vat_id, .rc-description, .rc-household_category { grid-column: 1 / -1; }
.rc-field input, .rc-field select, .rc-category select { width: 100%; min-height: 44px; font-size: 16px; }
.rc-category { display: grid; gap: 4px; margin-top: 12px; font-size: .85rem; }
.rc-discard { margin: 12px 0 4px; }
.rc-choice {
  position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 8px -16px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: #0d1b26; box-shadow: 0 -14px 18px -6px #0d1b26; }
.rc-scope { display: grid; gap: 2px; min-height: 64px; padding: 12px; text-align: left; color: #04121c; border: 0; border-radius: 14px;
  background: linear-gradient(140deg, var(--k-accent, #5fd4f4), color-mix(in srgb, var(--k-accent, #5fd4f4) 65%, #fff)); }
.rc-scope[data-scope="private"] { background: linear-gradient(140deg, #b9a7ff, #e1d8ff); }
.rc-scope strong { font-size: 1.05rem; }
.rc-scope span { font-size: .8rem; opacity: .75; }
.rc-scope:active { transform: scale(.98); }
.rc-actions { display: grid; gap: 8px; margin-top: 16px; }
.rc-actions .button { width: 100%; min-height: 48px; justify-content: center; }
.rc-done { display: grid; justify-items: center; text-align: center; padding: 14px 0 0; }
.rc-done h3 { margin: 10px 0 4px; }
.rc-done .rc-actions { width: 100%; }
.rc-check { width: 58px; height: 58px; border-radius: 50%; background: color-mix(in srgb, var(--k-accent, #5fd4f4) 22%, transparent); position: relative; }
.rc-check::after { content: ""; position: absolute; left: 20px; top: 14px; width: 14px; height: 24px; border: solid var(--k-accent, #5fd4f4); border-width: 0 4px 4px 0; transform: rotate(45deg); }
.rc-status { min-height: 1.2em; margin: 10px 0 0; font-size: .9rem; }
.rc-status.error { color: #ff9b8f; }
html[data-theme="light"] .rc-panel { color: #10202b; background: #fff; }
html[data-theme="light"] .rc-open-item, html[data-theme="light"] .rc-summary { background: #f3f7fa; }
html[data-theme="light"] .rc-close { background: #edf2f5; }
html[data-theme="light"] .rc-choice { background: #fff; box-shadow: 0 -14px 18px -6px #fff; }
