/* EchoStamp v2 - Modern Responsive Stylesheet */
:root {
    --primary: #1a365d;
    --primary-light: #2a4a7f;
    --accent: #c5a55a;
    --accent-light: #d4bb7a;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --bg: #f0f2f5;
    --card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --font: 'Inter', -apple-system, system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Navigation ────────────────────────────── */
.top-nav {
    background: var(--primary);
    color: white;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.nav-brand {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-brand i { color: var(--accent); }
.site-logo { height: 40px; vertical-align: middle; }
.hero-logo { max-width: 300px; height: auto; margin-bottom: 1rem; }
.intro-section { text-align: center; padding: 2rem 1rem; max-width: 800px; margin: 0 auto; }
.intro-content p { font-size: 1.1rem; line-height: 1.7; color: #555; }
.site-logo { height: 40px; vertical-align: middle; }
.hero-logo { max-width: 300px; height: auto; margin-bottom: 1rem; }
.intro-section { text-align: center; padding: 2rem 1rem; max-width: 800px; margin: 0 auto; }
.intro-content p { font-size: 1.1rem; line-height: 1.7; color: #555; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-links a:hover { background: rgba(255,255,255,0.12); color: white; }
.nav-user {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.btn-logout {
    color: rgba(255,255,255,0.7) !important;
    padding: 6px 10px !important;
}
.nav-toggle { display: none; background: none; border: none; color: white; font-size: 1.3rem; cursor: pointer; padding: 4px; }

.nav-notif { position: relative; }
.notif-badge {
    position: absolute; top: -2px; right: -2px;
    background: var(--error); color: white;
    font-size: 0.65rem; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* ─── Page Layout ──────────────────────────── */
.page-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    width: 100%;
    flex: 1;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-actions { display: flex; gap: 8px; align-items: center; }

/* ─── Buttons ──────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); background: rgba(26,54,93,0.05); }
.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Alerts ───────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ─── Forms ────────────────────────────────── */
.form-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    max-width: 600px;
}
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-input, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text);
    background: white;
    transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,54,93,0.1);
}
.form-color { width: 50px; height: 40px; padding: 2px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.inline-form { background: var(--bg); padding: 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.section-title { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin: 1.5rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ─── Auth Page ────────────────────────────── */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}
.auth-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.auth-icon { font-size: 3rem; color: var(--accent); margin-bottom: 1rem; }
.auth-card h2 { font-size: 1.3rem; margin-bottom: 1.5rem; }
.auth-form .form-group { text-align: left; }
.auth-form .form-group input { text-align: left; }

/* ─── Hero Section ─────────────────────────── */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #0f1d33 100%);
    color: white;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.hero h1 i { color: var(--accent); }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,0.8); margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-outline { color: white; border-color: rgba(255,255,255,0.4); }
.hero-actions .btn-outline:hover { border-color: white; background: rgba(255,255,255,0.1); }

.features-section { text-align: center; padding: 3rem 0; }
.features-section h2 { font-size: 1.8rem; margin-bottom: 2rem; color: var(--primary); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature-card {
    background: var(--card);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.feature-card i { font-size: 2.5rem; color: var(--accent); margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

.verify-cta {
    text-align: center;
    padding: 3rem;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 2rem 0;
}
.verify-cta h2 { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--primary); }
.verify-cta p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ─── Stats Row ────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
    background: var(--card);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.stat-notif { border-left: 3px solid var(--error); }

/* ─── Empty State ──────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.empty-state i { font-size: 3rem; color: var(--text-muted); margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ─── Tables ───────────────────────────────── */
.table-wrap {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.data-table tr:hover td { background: #f8fafc; }
.td-title i { color: var(--error); margin-right: 6px; }
.td-actions { white-space: nowrap; display: flex; gap: 4px; }

/* ─── Badges ───────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}
.badge-uploaded { background: #fef3c7; color: #92400e; }
.badge-stamped { background: #d1fae5; color: #065f46; }
.badge-valid { background: #d1fae5; color: #065f46; }
.badge-admin { background: #dbeafe; color: #1e40af; }
.badge-user { background: #f0f0f0; color: #555; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-disabled { background: #fee2e2; color: #991b1b; }

/* ─── Upload Zone ──────────────────────────── */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}
.upload-zone:hover { border-color: var(--primary); background: rgba(26,54,93,0.03); }
.upload-zone i { font-size: 3rem; color: var(--text-muted); margin-bottom: 1rem; }
.upload-zone p { font-weight: 500; margin-bottom: 0.5rem; }
.upload-zone input[type="file"] { display: block; margin: 0 auto; }
.file-hint { font-size: 0.8rem; color: var(--text-muted); display: block; margin-top: 0.5rem; }
.upload-zone.has-file { border-color: var(--success); }
.upload-zone.has-file i { color: var(--success); }
.logo-preview { margin-bottom: 8px; }

/* ─── Settings Layout ───────────────────────── */
.settings-layout { display: grid; grid-template-columns: 1fr 400px; gap: 1.5rem; align-items: start; }
.stamp-preview-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 72px;
}
.stamp-preview-card h3 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--primary); display: flex; align-items: center; gap: 6px; }
.preview-box {
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    display: flex;
    justify-content: center;
}
.preview-box img { max-width: 100%; height: auto; }
.preview-note { font-size: 0.8rem; color: var(--text-muted); text-align: center; margin-top: 0.75rem; font-style: italic; }
@media (max-width: 768px) {
    .settings-layout { grid-template-columns: 1fr; }
    .stamp-preview-card { position: static; }
}

/* ─── Stamped Result ────────────────────────── */
.stamped-result { margin-bottom: 1.5rem; }
.stamped-preview-box {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}
.stamped-preview-box h3 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--primary); display: flex; align-items: center; gap: 6px; }
.stamped-embed { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.stamped-actions { display: flex; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; justify-content: center; }

/* ─── Date Filter ──────────────────────────── */
.date-filter-form { display: inline-flex; }
.date-input { width: 150px !important; padding: 6px 10px !important; font-size: 0.85rem !important; }

/* ─── Centred Form Card ────────────────────── */
.form-card-centred { max-width: 500px; margin: 0 auto; }

/* ─── Toggle Switch ────────────────────────── */
.toggle-label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle-label input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; }
.toggle-text { font-weight: 600; font-size: 0.95rem; }
.field-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ─── Stamp & Sign Layout ──────────────────── */
.stamp-sign-layout { display: grid; grid-template-columns: 1fr 350px; gap: 1.5rem; }
.stamp-preview-section { background: var(--card); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
.bottom-toolbar { margin-top: 10px; margin-bottom: 0; }
.page-counter { font-weight: 600; font-size: 0.9rem; color: var(--primary); }
.stamp-sign-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-card { background: var(--card); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.sidebar-card h3 { font-size: 0.95rem; margin-bottom: 0.5rem; color: var(--primary); display: flex; align-items: center; gap: 6px; }
.sidebar-hint { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }

/* ─── Signature Pad ────────────────────────── */
.sig-tabs { display: flex; gap: 0; margin-bottom: 8px; }
.sig-tab { flex: 1; padding: 6px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-size: 0.8rem; font-weight: 500; }
.sig-tab:first-child { border-radius: 6px 0 0 6px; }
.sig-tab:last-child { border-radius: 0 6px 6px 0; }
.sig-tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.sig-canvas { width: 100%; height: 120px; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: crosshair; touch-action: none; }
.sig-actions { display: flex; gap: 6px; margin-top: 6px; }
.sig-preview-img { max-width: 200px; max-height: 60px; margin-top: 8px; border: 1px solid var(--border); border-radius: 4px; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }

@media (max-width: 768px) {
    .stamp-sign-layout { grid-template-columns: 1fr; }
}

/* ─── Login Enlarged ───────────────────────── */
.auth-form .form-group input { padding: 14px 18px; font-size: 1.05rem; }

/* ─── Stamp Layout ─────────────────────────── */
.stamp-layout { display: grid; grid-template-columns: 1fr 350px; gap: 1.5rem; }
.stamp-preview, .stamp-form {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}
.stamp-preview h3, .stamp-form h3 { font-size: 1rem; margin-bottom: 1rem; color: var(--primary); }
.preview-container { position: relative; }
.preview-image { width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.stamp-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; cursor: crosshair; }
.stamp-marker {
    position: absolute;
    width: 48px; height: 48px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.stamp-marker::before {
    content: '';
    position: absolute;
    width: 48px; height: 48px;
    border: 2px dashed var(--accent);
    border-radius: 50%;
    background: rgba(197,165,90,0.15);
}
.stamp-marker-label {
    font-size: 0.55rem; font-weight: 700; color: var(--accent);
    background: white; padding: 1px 4px; border-radius: 2px;
}
.preview-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; text-align: center; }

/* Position Grid */
.position-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pos-option {
    padding: 8px 4px;
    text-align: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.15s;
}
.pos-option:hover { border-color: var(--primary); }
.pos-option.selected { border-color: var(--primary); background: rgba(26,54,93,0.06); font-weight: 600; }
.pos-option input { display: none; }

/* ─── Verify Page ──────────────────────────── */
.verify-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.verify-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.verify-card-header { text-align: center; margin-bottom: 1.25rem; }
.verify-card-header i { font-size: 2rem; color: var(--accent); margin-bottom: 0.5rem; }
.verify-card-header h3 { font-size: 1rem; color: var(--primary); }
.verify-form .form-group { margin-bottom: 1rem; }
.verify-result { margin-top: 1rem; }
.result-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.result-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}
.result-row:last-child { border-bottom: none; }
.result-label { font-weight: 500; color: var(--text-muted); font-size: 0.85rem; }
.result-value { font-weight: 500; font-size: 0.9rem; text-align: right; }
.code-value { font-family: var(--mono); color: var(--primary); letter-spacing: 1px; }

/* ─── Notifications ────────────────────────── */
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item {
    display: flex;
    gap: 12px;
    padding: 1rem;
    background: var(--card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    transition: all 0.2s;
}
.notif-item.unread {
    border-left: 3px solid var(--accent);
    background: #fcf9f0;
}
.notif-icon { font-size: 1.5rem; color: var(--accent); flex-shrink: 0; width: 36px; text-align: center; }
.notif-body { flex: 1; }
.notif-title { font-weight: 600; font-size: 0.9rem; }
.notif-msg { color: var(--text-muted); font-size: 0.85rem; }
.notif-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.notif-actions { display: flex; gap: 4px; align-items: flex-start; }

/* ─── Accordion ────────────────────────────── */
.accordion { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.accordion-summary { padding: 1rem 1.25rem; font-weight: 600; cursor: pointer; color: var(--primary); list-style: none; display: flex; align-items: center; gap: 8px; }
.accordion-summary::-webkit-details-marker { display: none; }
.accordion-body { padding: 0 1.25rem 1.25rem; }

/* ─── Footer ──────────────────────────────── */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.6);
    padding: 1rem;
    margin-top: auto;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

/* ─── Responsive ───────────────────────────── */
@media (max-width: 768px) {
    .nav-links { display: none; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--primary); padding: 1rem; gap: 4px; box-shadow: var(--shadow-lg); }
    .nav-links.show { display: flex; }
    .nav-toggle { display: block; }
    .nav-user { display: none; }
    
    .hero { padding: 2.5rem 1rem; }
    .hero h1 { font-size: 1.8rem; }
    
    .features-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .stamp-layout { grid-template-columns: 1fr; }
    .verify-layout { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    
    .page-header { flex-direction: column; align-items: stretch; text-align: center; }
    .header-actions { justify-content: center; }
    
    .data-table { font-size: 0.8rem; }
    .data-table th, .data-table td { padding: 8px 10px; }
    .td-actions { flex-wrap: wrap; }
    .td-title i { display: none; }
}

@media (max-width: 480px) {
    .page-wrap { padding: 1rem 0.75rem; }
    .stats-row { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-num { font-size: 1.5rem; }
    .position-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
    .pos-option { font-size: 0.7rem; padding: 6px 2px; }
}

/* ─── Contact Form ──────────────────────────── */
.contact-section {
    padding: 3rem 1rem;
    background: #f8f9fa;
}
.contact-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.contact-container h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.contact-container > p {
    color: #666;
    margin-bottom: 2rem;
}
.contact-form {
    text-align: left;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.contact-form .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}
.contact-form .form-group {
    flex: 1;
    margin-bottom: 1rem;
}
.contact-form .form-row .form-group {
    margin-bottom: 0;
}
.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #333;
    font-size: 0.9rem;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.msg {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}
.msg-error {
    background: #ffeaea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}
.msg-success {
    background: #eaffea;
    color: #27ae60;
    border: 1px solid #c3e6cb;
}
@media (max-width: 600px) {
    .contact-form .form-row { flex-direction: column; gap: 0; }
    .contact-form .form-row .form-group { margin-bottom: 1rem; }
}

.footer-links { display: flex; gap: 1rem; }
.footer-links a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.8rem; transition: color 0.2s; }
.footer-links a:hover { color: rgba(255,255,255,0.9); }
@media (max-width: 600px) {
    .footer-inner { flex-direction: column; align-items: center; gap: 8px; text-align: center; }
    .footer-links { gap: 1.5rem; }
}

/* Share section on stamp result page */
.share-section {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.share-section label {
    display: block;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}
.share-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}
.share-input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    background: #fff;
    color: #334155;
    min-width: 0;
}
.share-input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -1px;
    border-color: #3b82f6;
}
.share-hint {
    margin: 0.75rem 0 0 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}
@media (max-width: 600px) {
    .share-input-group { flex-direction: column; }
}

/* Share section on stamp result page - improved v2 */
.share-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.share-section .share-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}
.share-section .share-header i {
    color: #0284c7;
    font-size: 1.1rem;
}
.share-section .share-title {
    font-weight: 600;
    color: #0c4a6e;
    font-size: 0.95rem;
    margin: 0;
}
.share-section .share-subtitle {
    color: #475569;
    font-size: 0.85rem;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}
.share-input-group {
    display: flex;
    gap: 0;
    align-items: stretch;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.share-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    background: #fff;
    color: #334155;
    min-width: 0;
    outline: none;
}
.share-input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.share-copy-btn {
    padding: 0.75rem 1.25rem;
    border: 1px solid #0284c7;
    border-left: none;
    border-radius: 0 8px 8px 0;
    background: #0284c7;
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    transition: background 0.15s;
    min-width: 110px;
    justify-content: center;
}
.share-copy-btn:hover { background: #0369a1; }
.share-copy-btn:active { background: #075985; }
.share-copy-btn.copied { background: #16a34a; border-color: #16a34a; }
.share-hint {
    margin: 0.75rem 0 0 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}
.share-hint i { color: #0284c7; margin-top: 2px; }
@media (max-width: 600px) {
    .share-input-group { flex-direction: column; border-radius: 8px; }
    .share-input { border-right: 1px solid #cbd5e1; border-radius: 8px 8px 0 0; border-bottom: none; }
    .share-copy-btn { border-left: 1px solid #0284c7; border-top: none; border-radius: 0 0 8px 8px; }
}

/* Dashboard share button state (after click) */
.share-copied {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
}

/* Toast notification for share button clicks */
.share-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    max-width: 380px;
}
.share-toast i { color: #22c55e; }
.share-toast-warn i { color: #fbbf24; }
.share-toast-warn { background: #7c2d12; }
.share-toast-show {
    opacity: 1;
    transform: translateY(0);
}
@media (max-width: 600px) {
    .share-toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
