/* ============================================================
   CardVault — Stylesheet
   Aesthetic: Refined dark industrial with warm amber accents
   ============================================================ */

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

:root {
    --bg:          #0e0e0f;
    --surface:     #161618;
    --surface2:    #1e1e21;
    --border:      #2a2a2e;
    --border-hi:   #3d3d44;
    --text:        #e8e8ea;
    --text-muted:  #7a7a82;
    --text-dim:    #4a4a52;
    --accent:      #e8a230;
    --accent-dim:  #a06010;
    --accent-glow: rgba(232, 162, 48, 0.15);
    --green:       #3dca7a;
    --red:         #e8504a;
    --radius:      6px;
    --radius-lg:   12px;
    --font-head:   'Syne', sans-serif;
    --font-body:   'DM Sans', sans-serif;
    --font-mono:   'DM Mono', monospace;
    --shadow:      0 2px 12px rgba(0,0,0,0.4);
    --shadow-lg:   0 8px 40px rgba(0,0,0,0.6);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Grain Texture ───────────────────────────────────────────── */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 256px;
}

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 60px;
    background: rgba(14, 14, 15, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.brand-icon {
    color: var(--accent);
    font-size: 1.3rem;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    transition: all 0.15s;
    text-decoration: none;
    letter-spacing: 0.03em;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface2);
    text-decoration: none;
}

.nav-link.active {
    color: var(--accent);
    background: var(--accent-glow);
}

/* ── Main Container ──────────────────────────────────────────── */
.main-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
}

/* ── Hero Section ────────────────────────────────────────────── */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
    background: var(--accent-glow);
    padding: 0.25rem 0.65rem;
    border-radius: 99px;
    border: 1px solid rgba(232,162,48,0.25);
}

.hero-text h1 {
    font-family: var(--font-head);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.hero-text h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 420px;
    line-height: 1.7;
}

.hero-badge {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--accent);
    opacity: 0.3;
    animation: spin 8s linear infinite;
}

.badge-ring::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px dashed var(--accent-dim);
    animation: spin-reverse 12s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-reverse { to { transform: rotate(-360deg); } }

.badge-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.badge-num {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.badge-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Alert ───────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-family: var(--font-mono);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-success { background: rgba(61,202,122,0.1); border: 1px solid rgba(61,202,122,0.3); color: var(--green); }
.alert-error   { background: rgba(232,80,74,0.1);  border: 1px solid rgba(232,80,74,0.3);  color: var(--red); }
.alert-icon    { font-size: 1rem; font-weight: 700; }

/* ── Scanner Layout ──────────────────────────────────────────── */
.scanner-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.scanner-layout.single-panel {
    grid-template-columns: 1fr;
}

/* ── Panel ───────────────────────────────────────────────────── */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: border-color 0.2s;
}

.panel:focus-within {
    border-color: var(--border-hi);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.panel-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    background: var(--surface2);
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    border: 1px solid var(--border);
}

/* ── Drop Zone ───────────────────────────────────────────────── */
.drop-zone {
    position: relative;
    border: 2px dashed var(--border-hi);
    border-radius: var(--radius);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--surface2);
    margin-bottom: 1rem;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.drop-zone.drag-over .drop-icon {
    color: var(--accent);
    transform: scale(1.1);
}

.drop-content { pointer-events: none; }

.drop-icon {
    color: var(--text-dim);
    margin-bottom: 1rem;
    transition: all 0.2s;
    display: inline-block;
}

.drop-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.drop-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.drop-formats {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* ── Preview Area ────────────────────────────────────────────── */
.preview-area {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    background: var(--surface2);
}

.preview-area img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    background: #111;
}

.clear-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.7);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.25rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.15s;
}

.clear-btn:hover {
    background: rgba(232,80,74,0.2);
    color: var(--red);
    border-color: var(--red);
}

/* ── Scan Button ─────────────────────────────────────────────── */
.scan-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem;
    background: var(--accent);
    color: #0e0e0f;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.2s;
}

.scan-btn:hover:not(:disabled) {
    background: #f0b640;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(232,162,48,0.35);
}

.scan-btn:disabled {
    background: var(--surface2);
    color: var(--text-dim);
    border: 1px solid var(--border);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-icon { font-size: 1rem; }

.btn-spinner {
    display: flex;
    gap: 4px;
    align-items: center;
}

.btn-spinner span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    animation: bounce 0.8s ease-in-out infinite;
}
.btn-spinner span:nth-child(2) { animation-delay: 0.15s; }
.btn-spinner span:nth-child(3) { animation-delay: 0.30s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.1); opacity: 1; }
}

/* ── Form Fields ─────────────────────────────────────────────── */
.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field-group { display: flex; flex-direction: column; gap: 0.35rem; }
.field-group.full-width { grid-column: 1 / -1; }

.field-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.field-input {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.88rem;
    padding: 0.6rem 0.8rem;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    resize: none;
}

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

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

.field-textarea { min-height: 72px; resize: vertical; }

.field-filled {
    animation: fieldGlow 1s ease;
}

@keyframes fieldGlow {
    0%, 100% { border-color: var(--border); box-shadow: none; }
    30%       { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
}

/* ── Form Actions ────────────────────────────────────────────── */
.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1.25rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
}

.secondary-btn {
    padding: 0.65rem 1.25rem;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
}

.secondary-btn:hover {
    color: var(--text);
    border-color: var(--border-hi);
    background: var(--surface2);
    text-decoration: none;
}

.save-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    background: var(--accent);
    color: #0e0e0f;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.save-btn:hover {
    background: #f0b640;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232,162,48,0.3);
}

.btn-arrow { transition: transform 0.2s; }
.save-btn:hover .btn-arrow { transform: translateX(3px); }

/* ── Contacts Page ───────────────────────────────────────────── */
.contacts-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.contacts-title {
    font-family: var(--font-head);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
}

.contacts-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mono { font-family: var(--font-mono); }

.add-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 1.25rem;
    background: var(--accent);
    color: #0e0e0f;
    border-radius: var(--radius);
    font-family: var(--font-head);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.add-btn:hover {
    background: #f0b640;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232,162,48,0.3);
    text-decoration: none;
}

/* ── Controls Bar ────────────────────────────────────────────── */
.controls-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.search-form { flex: 1; min-width: 240px; }

.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    color: var(--text-dim);
    font-size: 1.1rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.88rem;
    padding: 0.6rem 2.2rem 0.6rem 2.2rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

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

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

.search-clear {
    position: absolute;
    right: 0.8rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    transition: color 0.15s;
    text-decoration: none;
}

.search-clear:hover { color: var(--red); text-decoration: none; }

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.sort-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-right: 0.25rem;
}

.sort-btn {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 0.25rem 0.7rem;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.sort-btn:hover {
    color: var(--text);
    border-color: var(--border-hi);
    text-decoration: none;
}

.sort-btn.active {
    color: var(--accent);
    background: var(--accent-glow);
    border-color: rgba(232,162,48,0.3);
}

/* ── Contact Cards Grid ──────────────────────────────────────── */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.2s;
    animation: cardIn 0.35s ease backwards;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.contact-card:hover {
    border-color: var(--border-hi);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.contact-card-top {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.contact-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    background: var(--accent-glow);
    border: 1px solid rgba(232,162,48,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-primary { flex: 1; min-width: 0; }

.contact-name {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-title-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-top: 0.2rem;
}

.contact-actions {
    display: flex;
    gap: 0.3rem;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text-muted);
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
}

.icon-btn:hover { color: var(--text); border-color: var(--border-hi); text-decoration: none; }
.icon-btn.danger:hover { color: var(--red); border-color: var(--red); background: rgba(232,80,74,0.1); }

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.82rem;
}

.detail-icon {
    color: var(--accent);
    font-size: 0.9rem;
    margin-top: 0.05rem;
    flex-shrink: 0;
}

.detail-row a {
    color: var(--text-muted);
    transition: color 0.15s;
}

.detail-row a:hover { color: var(--accent); text-decoration: none; }
.detail-row span { color: var(--text-muted); }

.contact-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.contact-date {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.03em;
}

.view-card-btn {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid rgba(232,162,48,0.25);
    border-radius: 99px;
    padding: 0.2rem 0.65rem;
    cursor: pointer;
    transition: all 0.15s;
}

.view-card-btn:hover {
    background: rgba(232,162,48,0.25);
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    color: var(--text-dim);
    margin-bottom: 1.25rem;
    display: block;
}

.empty-state h3 {
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.empty-state p { margin-bottom: 1.5rem; font-size: 0.9rem; }

/* ── Edit Page ───────────────────────────────────────────────── */
.edit-header {
    margin-bottom: 2rem;
}

.back-link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    transition: color 0.15s;
}

.back-link:hover { color: var(--accent); text-decoration: none; }

.edit-header h1 {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.form-panel.wide { max-width: 860px; }

.original-card-preview {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-thumb {
    margin-top: 0.5rem;
    max-height: 200px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: block;
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 640px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease;
    position: relative;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-right: 2rem;
}

.modal-img {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: block;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--surface2);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.modal-close:hover { color: var(--red); border-color: var(--red); }

/* ── Toast ───────────────────────────────────────────────────── */
.cv-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    color: var(--text);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: all 0.25s ease;
    max-width: 380px;
}

.cv-toast--show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cv-toast--success { border-color: rgba(61,202,122,0.4); color: var(--green); }
.cv-toast--error   { border-color: rgba(232,80,74,0.4);  color: var(--red); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .main-container { padding: 1.5rem 1rem 3rem; }

    .hero-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .scanner-layout { grid-template-columns: 1fr; }
    .field-grid { grid-template-columns: 1fr; }
    .field-group.full-width { grid-column: 1; }

    .contacts-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .controls-bar { flex-direction: column; align-items: stretch; }
    .sort-controls { flex-wrap: wrap; }
    .contacts-grid { grid-template-columns: 1fr; }

    .hero-badge { display: none; }
}
