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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #ffffff;
}

.card-container {
    max-width: 500px;
    width: 100%;
}

.business-card {
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(192, 192, 192, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.business-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(192, 192, 192, 0.2);
}

.header {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    padding: 30px;
    text-align: center;
    border-bottom: 2px solid rgba(192, 192, 192, 0.2);
}

.logo svg {
    filter: drop-shadow(0 4px 8px rgba(192, 192, 192, 0.3));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.content {
    padding: 40px 30px;
}

.name {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.title {
    font-size: 1.1rem;
    color: #C0C0C0;
    margin-bottom: 5px;
    font-weight: 500;
}

.company {
    font-size: 1rem;
    color: #999;
    margin-bottom: 30px;
    font-weight: 400;
}

.contact-info {
    margin: 30px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(192, 192, 192, 0.05);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.contact-item:hover {
    background: rgba(192, 192, 192, 0.1);
}

.icon {
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-item a {
    color: #C0C0C0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    word-break: break-all;
}

.contact-item a:hover {
    color: #ffffff;
}

.qr-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(192, 192, 192, 0.1);
}

.qr-label {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qr-code {
    display: inline-block;
    padding: 15px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.install-btn {
    margin-top: 30px;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%);
    color: #1a1a1a;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.3);
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 192, 192, 0.4);
}

.install-btn:active {
    transform: translateY(0);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .name {
        font-size: 1.8rem;
    }
    
    .title {
        font-size: 1rem;
    }
    
    .content {
        padding: 30px 20px;
    }
    
    .contact-item a {
        font-size: 0.85rem;
    }
}

/* PWA Standalone Mode */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ─── Light Theme ─────────────────────────────────────────────────────────── */

[data-theme="light"] {
    --bg-gradient-start: #f0f0f0;
    --bg-gradient-end: #e0e0e0;
    --card-bg-start: #ffffff;
    --card-bg-end: #f8f8f8;
    --header-bg-start: #f5f5f5;
    --header-bg-end: #ebebeb;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --accent: #888888;
    --contact-item-bg: rgba(0, 0, 0, 0.04);
    --contact-item-hover: rgba(0, 0, 0, 0.08);
    --border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #1a1a1a;
}

[data-theme="light"] .business-card {
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .header {
    background: linear-gradient(135deg, #f5f5f5 0%, #ebebeb 100%);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .name { color: #1a1a1a; }
[data-theme="light"] .title { color: #444444; }
[data-theme="light"] .company { color: #666666; }

[data-theme="light"] .contact-item {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .contact-item:hover {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .contact-item a { color: #444444; }
[data-theme="light"] .contact-item a:hover { color: #1a1a1a; }

[data-theme="light"] .qr-section {
    border-top-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .icon-btn {
    color: #555555;
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .icon-btn:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
}

[data-theme="light"] .action-btn {
    background: rgba(0, 0, 0, 0.06);
    color: #333333;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .action-btn:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
}

[data-theme="light"] .copy-btn {
    color: #888888;
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .copy-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #333333;
}

[data-theme="light"] .brand-tagline { color: #666666; }

/* ─── Top controls bar ─────────────────────────────────────────────────────── */

.top-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

/* ─── Dashboard link button ────────────────────────────────────────────────── */

.dash-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* ─── Icon button (theme toggle, chat close) ───────────────────────────────── */

.icon-btn {
    background: rgba(192, 192, 192, 0.12);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C0C0C0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: rgba(192, 192, 192, 0.22);
    color: #ffffff;
}

.icon-btn:focus-visible {
    outline: 2px solid #C0C0C0;
    outline-offset: 2px;
}

/* ─── Brand tagline ────────────────────────────────────────────────────────── */

.brand-tagline {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ─── Action bar ───────────────────────────────────────────────────────────── */

.action-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: rgba(192, 192, 192, 0.12);
    color: #C0C0C0;
    border: 1px solid rgba(192, 192, 192, 0.2);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

.action-btn:hover {
    background: rgba(192, 192, 192, 0.22);
    color: #ffffff;
}

.action-btn:active {
    transform: scale(0.97);
}

.action-btn:focus-visible {
    outline: 2px solid #C0C0C0;
    outline-offset: 2px;
}

/* ─── Contact item – copy button ───────────────────────────────────────────── */

.contact-details {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.copy-btn {
    background: transparent;
    border: 1px solid rgba(192, 192, 192, 0.2);
    border-radius: 6px;
    padding: 4px 6px;
    color: #999;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.copy-btn:hover {
    background: rgba(192, 192, 192, 0.12);
    color: #C0C0C0;
}

.copy-btn:focus-visible {
    outline: 2px solid #C0C0C0;
    outline-offset: 2px;
}

/* ─── Toast notification ───────────────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 30, 30, 0.95);
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 9000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

[data-theme="light"] .toast {
    background: rgba(40, 40, 40, 0.95);
}

/* ─── AI FAB (floating action button) ─────────────────────────────────────── */

.ai-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%);
    color: #1a1a1a;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(192, 192, 192, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1000;
}

.ai-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(192, 192, 192, 0.55);
}

.ai-fab:active {
    transform: scale(0.96);
}

.ai-fab:focus-visible {
    outline: 3px solid #C0C0C0;
    outline-offset: 3px;
}

/* ─── Chat Panel ───────────────────────────────────────────────────────────── */

.chat-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: min(380px, calc(100vw - 40px));
    max-height: 70vh;
    background: #1f1f1f;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(192, 192, 192, 0.15);
    z-index: 999;
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.chat-panel--open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

[data-theme="light"] .chat-panel {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(192, 192, 192, 0.12);
    flex-shrink: 0;
}

[data-theme="light"] .chat-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #C0C0C0;
}

[data-theme="light"] .chat-title { color: #444; }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(192, 192, 192, 0.2) transparent;
}

.chat-message {
    display: flex;
    flex-direction: column;
}

.chat-message.user {
    align-items: flex-end;
}

.chat-message.assistant {
    align-items: flex-start;
}

.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.chat-message.user .chat-bubble {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #1a1a1a;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant .chat-bubble {
    background: rgba(192, 192, 192, 0.1);
    color: #e0e0e0;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(192, 192, 192, 0.1);
}

[data-theme="light"] .chat-message.assistant .chat-bubble {
    background: #f0f0f0;
    color: #333;
    border-color: rgba(0, 0, 0, 0.08);
}

/* Typing indicator */
.chat-bubble.typing {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 14px 18px;
}

.chat-bubble.typing span {
    display: block;
    width: 7px;
    height: 7px;
    background: #C0C0C0;
    border-radius: 50%;
    animation: typing-bounce 1.2s ease-in-out infinite;
}

.chat-bubble.typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-bubble.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40% { transform: translateY(-6px); opacity: 1; }
}

.chat-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid rgba(192, 192, 192, 0.12);
    flex-shrink: 0;
}

[data-theme="light"] .chat-form {
    border-top-color: rgba(0, 0, 0, 0.08);
}

.chat-input {
    flex: 1;
    background: rgba(192, 192, 192, 0.08);
    border: 1px solid rgba(192, 192, 192, 0.18);
    border-radius: 24px;
    padding: 10px 16px;
    color: #e0e0e0;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.chat-input:focus {
    border-color: rgba(192, 192, 192, 0.4);
}

[data-theme="light"] .chat-input {
    background: #f5f5f5;
    border-color: rgba(0, 0, 0, 0.15);
    color: #1a1a1a;
}

[data-theme="light"] .chat-input:focus {
    border-color: rgba(0, 0, 0, 0.3);
}

.chat-send {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #1a1a1a;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.chat-send:hover {
    transform: scale(1.08);
}

.chat-send:active {
    transform: scale(0.95);
}

.chat-send:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.chat-send:focus-visible {
    outline: 2px solid #C0C0C0;
    outline-offset: 2px;
}