@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.1);
    --secondary-color: #4f46e5;
    --accent-color: #06b6d4;
    
    --bg-dark: #0f172a;
    --bg-card-dark: rgba(30, 41, 59, 0.7);
    --border-dark: rgba(255, 255, 255, 0.08);
    --text-main-dark: #f8fafc;
    --text-muted-dark: #94a3b8;
    
    --bg-light: #f8fafc;
    --bg-card-light: rgba(255, 255, 255, 0.8);
    --border-light: rgba(15, 23, 42, 0.08);
    --text-main-light: #0f172a;
    --text-muted-light: #64748b;

    /* Status colors */
    --status-ready: #3b82f6; /* 접수완료 */
    --status-design: #eab308; /* 디자인중 */
    --status-confirm: #a855f7; /* 시안확정 */
    --status-paywait: #f97316; /* 입금대기 */
    --status-paid: #10b981; /* 입금완료 */
    --status-done: #06b6d4; /* 게재완료 */
    --status-pdf: #6366f1; /* PDF발송 */

    /* Active theme variables (Default to light mode for crisp professional read, can toggle to dark) */
    --bg-color: var(--bg-light);
    --card-bg: var(--bg-card-light);
    --border-color: var(--border-light);
    --text-color: var(--text-main-light);
    --text-muted: var(--text-muted-light);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --backdrop-blur: blur(12px);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-color: var(--bg-dark);
    --card-bg: var(--bg-card-dark);
    --border-color: var(--border-dark);
    --text-color: var(--text-main-dark);
    --text-muted: var(--text-muted-dark);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Header & Navigation Styles */
header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: var(--backdrop-blur);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.logo-section span {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-family: 'Outfit', sans-serif;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-item {
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-toggle-mode {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-mode:hover {
    background-color: var(--primary-light);
}

.btn-admin-switch {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-admin-switch:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-admin-switch.admin-active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* App Main Body Layout */
main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.view-section.active {
    display: block;
}

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

/* Cards & Glassmorphism Panels */
.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.glass-panel:hover {
    box-shadow: var(--shadow-xl);
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 0.75rem;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    color: var(--text-color);
    font-weight: 700;
}

/* Button UI kit */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.btn-success {
    background-color: #10b981;
    color: white;
}
.btn-success:hover {
    background-color: #059669;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}
.btn-danger:hover {
    background-color: #dc2626;
}

/* Step Wizard for Application */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    position: relative;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--border-color);
    z-index: 1;
    transform: translateY(-50%);
}

.wizard-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 1;
    transform: translateY(-50%);
    transition: var(--transition);
}

.step-node {
    position: relative;
    z-index: 2;
    background: var(--bg-color);
    border: 3px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition);
}

.step-node.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.step-node.completed {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    color: white;
}

.step-label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-muted);
}

.step-node.active .step-label {
    color: var(--primary-color);
}
.step-node.completed .step-label {
    color: var(--text-color);
}

.wizard-content {
    margin-top: 2rem;
    min-height: 350px;
}

.wizard-step-panel {
    display: none;
    animation: slideIn 0.3s ease-out;
}

.wizard-step-panel.active {
    display: block;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.wizard-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Grid & Layout Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .grid-2, .grid-3, .grid-1-2, .grid-2-1 {
        grid-template-columns: 1fr;
    }
    .wizard-steps {
        overflow-x: auto;
        padding-bottom: 1rem;
    }
}

/* Card Selection list for Ad Types */
.card-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.selector-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.selector-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.selector-card.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.selector-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.selector-card i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    display: block;
}

.selector-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

/* Interactive Description Box for Selected Ad Type */
.info-box {
    background: var(--primary-light);
    border-left: 4px solid var(--primary-color);
    padding: 1.25rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-top: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.info-box h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.info-item strong {
    color: var(--text-color);
    display: block;
    margin-bottom: 0.25rem;
}

.info-item span {
    color: var(--text-muted);
}

/* Pricing calculator form styling */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* Pricing Breakdown Screen */
.price-breakdown {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.breakdown-row.total {
    border-top: 2px dashed var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Calendar styling UI */
.calendar-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.calendar-nav-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
}

.calendar-nav-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 0.5rem;
}

.calendar-day-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
}

.calendar-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    padding: 0.25rem;
}

.calendar-cell:hover:not(.disabled):not(.other-month) {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.calendar-cell.other-month {
    color: var(--text-muted);
    opacity: 0.3;
    pointer-events: none;
}

.calendar-cell.disabled {
    color: var(--text-muted);
    background-color: rgba(0, 0, 0, 0.03);
    opacity: 0.5;
    cursor: not-allowed;
}

[data-theme="dark"] .calendar-cell.disabled {
    background-color: rgba(255, 255, 255, 0.03);
}

.calendar-cell.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.calendar-cell.has-notice {
    font-weight: 700;
    color: var(--primary-color);
}

.calendar-cell.has-notice:not(.selected)::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.calendar-cell.closed-notice {
    color: var(--text-muted);
    text-decoration: line-through;
    cursor: not-allowed;
    pointer-events: none;
}

.calendar-legend {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* File Upload drag and drop */
.file-dropzone {
    border: 2px dashed var(--border-color);
    background-color: rgba(0,0,0,0.01);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

[data-theme="dark"] .file-dropzone {
    background-color: rgba(255,255,255,0.01);
}

.file-dropzone:hover, .file-dropzone.dragover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.file-dropzone i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.file-dropzone h4 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.file-dropzone p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.uploaded-files-list {
    margin-top: 1.5rem;
}

.uploaded-file-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-info i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.file-details {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-remove-file {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
}

.btn-remove-file:hover {
    color: #ef4444;
}

/* Badge System */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.badge-ready { background-color: rgba(59, 130, 246, 0.15); color: var(--status-ready); }
.badge-design { background-color: rgba(234, 179, 8, 0.15); color: var(--status-design); }
.badge-confirm { background-color: rgba(168, 85, 247, 0.15); color: var(--status-confirm); }
.badge-paywait { background-color: rgba(249, 115, 22, 0.15); color: var(--status-paywait); }
.badge-paid { background-color: rgba(16, 185, 129, 0.15); color: var(--status-paid); }
.badge-done { background-color: rgba(6, 182, 212, 0.15); color: var(--status-done); }
.badge-pdf { background-color: rgba(99, 102, 241, 0.15); color: var(--status-pdf); }

/* Timeline Tracker UI */
.status-timeline {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    position: relative;
    overflow-x: auto;
    padding-bottom: 1.5rem;
}

.status-timeline::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 5%;
    right: 5%;
    height: 4px;
    background-color: var(--border-color);
    z-index: 1;
}

.timeline-progress-bar {
    position: absolute;
    top: 25px;
    left: 5%;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--status-paid));
    z-index: 1;
    transition: var(--transition);
}

.timeline-node {
    position: relative;
    z-index: 2;
    background: var(--bg-color);
    border: 4px solid var(--border-color);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}

.timeline-node.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 6px var(--primary-light);
    color: var(--primary-color);
    background-color: var(--bg-color);
}

.timeline-node.completed {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    color: white;
}

.timeline-label {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--text-muted);
}

.timeline-node.active .timeline-label {
    color: var(--primary-color);
}
.timeline-node.completed .timeline-label {
    color: var(--text-color);
}

/* Order Lookup Card */
.search-box-wrapper {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Proof Visualizer Box */
.proof-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-md);
}

.proof-preview-container {
    width: 100%;
    height: 380px;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .proof-preview-container {
    background: #1e293b;
}

.proof-preview-img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: var(--shadow-lg);
    border: 1px solid #cbd5e1;
}

.proof-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.proof-no-image i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.proof-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

/* Interactive AI FAQ Chatbot Widget */
.chatbot-container {
    height: 500px;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-avatar {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.chatbot-title h4 {
    color: white;
    font-size: 1.05rem;
}
.chatbot-title span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: rgba(0,0,0,0.01);
}

[data-theme="dark"] .chatbot-messages {
    background-color: rgba(255,255,255,0.01);
}

.chat-bubble {
    max-width: 80%;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    line-height: 1.5;
    animation: bubblePop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bubblePop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.chat-bubble.bot {
    background: var(--bg-color);
    color: var(--text-color);
    align-self: flex-start;
    border-top-left-radius: 2px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.chat-bubble.user {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-top-right-radius: 2px;
    box-shadow: var(--shadow-sm);
}

.chatbot-quick-replies {
    padding: 0.75rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
}

.quick-reply-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
}

.quick-reply-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.chatbot-input-area {
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}

.chatbot-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-color);
    outline: none;
    font-size: 0.95rem;
}

.chatbot-input:focus {
    border-color: var(--primary-color);
}

.btn-chat-send {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-chat-send:hover {
    background: var(--primary-hover);
}

/* FAQ Accordion UI */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-question {
    padding: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.faq-item.active .faq-question::after {
    content: '-';
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    background-color: rgba(0,0,0,0.005);
    color: var(--text-muted);
    font-size: 0.95rem;
}

[data-theme="dark"] .faq-answer {
    background-color: rgba(255,255,255,0.005);
}

.faq-item.active .faq-answer {
    padding: 1.25rem;
    max-height: 1000px;
    border-top: 1px solid var(--border-color);
    transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
}

/* Consultation request card layout */
.consult-card-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 800px) {
    .consult-card-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Admin Dashboard Metrics styling */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1000px) {
    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 550px) {
    .metrics-row {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
}

.metric-info h5 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.metric-card:nth-child(2) .metric-icon {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.metric-card:nth-child(3) .metric-icon {
    background-color: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.metric-card:nth-child(4) .metric-icon {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Admin Orders Management Table */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.admin-table th {
    background-color: var(--primary-light);
    color: var(--text-color);
    font-weight: 700;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.admin-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .admin-table tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.25s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 550px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

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

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Payment gateway specific styles */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.payment-method-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.payment-method-card:hover {
    border-color: var(--primary-color);
}

.payment-method-card.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.payment-method-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    display: block;
}

.payment-method-card span {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 300;
}

.toast {
    background: var(--bg-dark);
    color: var(--text-main-dark);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 300px;
}

@keyframes toastSlideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success i { color: #10b981; }
.toast.info i { color: #3b82f6; }
.toast.warning i { color: #f59e0b; }
.toast.error i { color: #ef4444; }

/* Fontawesome Icons fallback (embedded styling) */
[class^="icon-"] {
    display: inline-block;
    width: 1em;
    height: 1em;
    stroke-width: 0;
    stroke: currentColor;
    fill: currentColor;
}

/* Statistics chart elements */
.chart-container {
    height: 280px;
    width: 100%;
    margin-top: 1rem;
    position: relative;
}

.chart-wrapper {
    display: flex;
    height: 200px;
    align-items: flex-end;
    gap: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.chart-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar {
    width: 100%;
    background: linear-gradient(to top, var(--primary-color), var(--accent-color));
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease-out;
    position: relative;
    min-height: 4px;
}

.chart-bar-value {
    position: absolute;
    top: -24px;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-color);
}

.chart-bar-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* ==========================================================================
   PWA Installation Banner & Guide Modal Styles
   ========================================================================== */

/* PWA Banner */
.pwa-banner {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    animation: slideDown 0.3s ease-out;
}
.pwa-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.pwa-banner-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pwa-banner-text {
    display: flex;
    flex-direction: column;
}
.pwa-banner-text strong {
    font-size: 0.95rem;
    color: var(--text-color);
}
.pwa-banner-text span {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-pwa-banner-close {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.btn-pwa-banner-close:hover {
    background: rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .btn-pwa-banner-close:hover {
    background: rgba(255, 255, 255, 0.05);
}

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

@media (max-width: 768px) {
    .pwa-banner {
        padding: 0.75rem 1rem;
    }
    .pwa-banner-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .pwa-banner-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* PWA Guide Modal */
.pwa-guide-modal {
    max-width: 550px !important;
}
.pwa-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    gap: 0.5rem;
}
.pwa-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.pwa-tab-btn:hover {
    color: var(--text-color);
}
.pwa-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.pwa-tab-content {
    display: none;
}
.pwa-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}
.pwa-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.pwa-step-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    align-items: flex-start;
    transition: var(--transition);
}
[data-theme="dark"] .pwa-step-card {
    background: rgba(255, 255, 255, 0.02);
}
.pwa-step-card:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}
.pwa-step-num {
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.pwa-step-body strong {
    display: block;
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}
.pwa-step-body p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.pwa-direct-install-box {
    background: var(--primary-light);
    border: 1px dashed var(--primary-color);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    text-align: center;
    margin-top: 1rem;
    animation: pulseBorder 2s infinite;
}

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

@keyframes pulseBorder {
    0% { border-color: var(--primary-color); }
    50% { border-color: var(--accent-color); }
    100% { border-color: var(--primary-color); }
}

