/* ============================================================
   MoldeWeb — Comprehensive CSS System (Dark + Light Mode)
   ============================================================ */

/* ---------- Root Variables ---------- */
:root {
    --ink: #0D315E;
    --bg-primary: #FFFFFF;
    --bg-deep: #F8FAFC;
    --gold: #087FA8;
    --teal: #0EA5E9;
    --brand-blue: #0D315E;
    --slate: #64748B;
    --contour: rgba(14, 165, 233, 0.04);
    --surface-dark: #111827;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --transition: all 0.25s cubic-bezier(.4,0,.2,1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 40px rgba(14,165,233,.1), 0 4px 12px rgba(0,0,0,.06);
    --shadow-glow: 0 0 40px rgba(14,165,233,.15);
}

html[data-theme="dark"], .dark, html.dark {
    --ink: #F1F5F9;
    --bg-primary: #0B0F19;
    --bg-deep: #151E2E;
    --gold: #38BDF8;
    --teal: #38BDF8;
    --brand-blue: #38BDF8;
    --slate: #94A3B8;
    --contour: rgba(56, 189, 248, 0.05);
    --surface-dark: #1F2937;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,.4);
    --shadow-lg: 0 10px 40px rgba(56,189,248,.1), 0 4px 12px rgba(0,0,0,.3);
}

/* ---------- Floating Contact Dock ---------- */
.contact-dock { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: .65rem; }
.contact-dock-actions { display: flex; align-items: center; gap: .55rem; }
.contact-chat-panel { width: min(20rem, calc(100vw - 2rem)); padding: 1rem; border: 1px solid rgba(148,163,184,.22); border-radius: 1rem; background: var(--bg-primary); box-shadow: 0 18px 50px rgba(2,8,23,.2); }
.dock-button { width: 2.75rem; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: white; box-shadow: 0 8px 24px rgba(2,8,23,.2); transition: transform .2s ease, box-shadow .2s ease; }
.dock-button:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(2,8,23,.28); }
.dock-whatsapp { background: #16a34a; }
.dock-phone { background: #0ea5e9; }
.dock-chat { background: #2563eb; border: 0; cursor: pointer; }
.dock-launcher { width: 3.25rem; height: 3.25rem; box-shadow: 0 10px 30px rgba(37,99,235,.35); }
.dashboard-order-toast { position: fixed; top: 5.5rem; right: 1.5rem; z-index: 55; display: flex; align-items: center; gap: .75rem; width: min(22rem, calc(100vw - 2rem)); padding: .8rem; border: 1px solid rgba(245,158,11,.35); border-radius: 1rem; background: var(--admin-surface, #fff); box-shadow: 0 14px 36px rgba(2,8,23,.22); animation: dashboard-toast-in .25s ease-out; }
html.dark .dashboard-order-toast { background: #121b24; border-color: rgba(245,158,11,.45); }
.admin-notification-count { position: absolute; top: -.35rem; right: -.35rem; min-width: 1.05rem; height: 1.05rem; padding: 0 .25rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #f43f5e; color: #fff; font-size: .55rem; font-weight: 900; border: 2px solid var(--admin-surface, #fff); }
.admin-notification-panel { position: absolute; top: calc(100% + .75rem); right: 0; width: 17rem; padding: .8rem; border: 1px solid var(--admin-border, #e2e8f0); border-radius: 1rem; background: var(--admin-surface, #fff); box-shadow: 0 18px 45px rgba(2,8,23,.2); }
html.dark .admin-notification-panel { background: #121b24; border-color: #263744; }
@keyframes dashboard-toast-in { from { opacity: 0; transform: translateY(-.5rem); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--ink);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Site Container ---------- */
.site-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (min-width: 640px) {
    .site-container { padding-left: 1.75rem; padding-right: 1.75rem; }
}

@media (min-width: 1024px) {
    .site-container { padding-left: 2.5rem; padding-right: 2.5rem; }
}

/* ---------- Bento Card ---------- */
.bento-card {
    background-color: var(--bg-primary);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.bento-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.2);
}

html[data-theme="dark"] .bento-card, .dark .bento-card {
    background-color: var(--bg-deep);
    border-color: rgba(56, 189, 248, 0.1);
}

html[data-theme="dark"] .bento-card:hover, .dark .bento-card:hover {
    border-color: rgba(56, 189, 248, 0.25);
    box-shadow: 0 8px 32px rgba(56,189,248,.08);
}

/* ---------- Admin Cards ---------- */
.admin-light-card {
    background-color: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.dark .admin-light-card {
    background-color: #0D1929;
    border-color: #1E293B;
    color: #F1F5F9;
}

.admin-light-card:hover {
    box-shadow: var(--shadow-md);
}

/* ---------- Admin Sidebar Items ---------- */
.admin-light-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    transition: var(--transition);
    text-decoration: none;
}

.admin-light-sidebar-item:hover {
    background-color: #F1F9FF;
    color: #0284C7;
}

.admin-light-sidebar-item.active {
    background-color: #EFF8FF;
    color: #0284C7;
    font-weight: 700;
}

.dark .admin-light-sidebar-item {
    color: #94A3B8;
}

.dark .admin-light-sidebar-item:hover {
    background-color: #132238;
    color: #38BDF8;
}

.dark .admin-light-sidebar-item.active {
    background-color: rgba(3, 105, 161, 0.3);
    color: #38BDF8;
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #0EA5E9, #2563EB);
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 0.875rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(14,165,233,.35);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(14,165,233,.45);
    background: linear-gradient(135deg, #0284C7, #1D4ED8);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--ink);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 0.875rem;
    border: 1.5px solid rgba(148, 163, 184, 0.3);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--teal);
    color: var(--teal);
    background: rgba(14, 165, 233, 0.05);
}

/* ---------- Form Inputs ---------- */
.form-input {
    width: 100%;
    background-color: rgba(248, 250, 252, 1);
    border: 1.5px solid rgba(226, 232, 240, 1);
    border-radius: 0.875rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--ink);
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

.form-input:focus {
    border-color: var(--teal);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

html[data-theme="dark"] .form-input, .dark .form-input {
    background-color: rgba(15, 23, 42, 0.8);
    border-color: rgba(51, 65, 85, 0.8);
    color: #F1F5F9;
}

html[data-theme="dark"] .form-input:focus, .dark .form-input:focus {
    border-color: #38BDF8;
    background-color: rgba(15, 23, 42, 1);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

/* ---------- Section Backgrounds ---------- */
.bg-contour {
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 30%, rgba(14, 165, 233, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
}

/* ---------- Gradient Text ---------- */
.text-gradient {
    background: linear-gradient(135deg, #0EA5E9, #2563EB, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Shimmer / Pulse Animation ---------- */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-float { animation: float 4s ease-in-out infinite; }
.animate-fade-up { animation: fadeInUp 0.6s ease both; }
.animate-scale-in { animation: scaleIn 0.4s ease both; }

/* ---------- Portfolio Cards ---------- */
.portfolio-card {
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.portfolio-card .card-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .card-overlay {
    opacity: 1;
}

/* ---------- Hero Glow ---------- */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

/* ---------- Stats Counter ---------- */
.stat-number {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ---------- Badge Pill ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.badge-teal {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--teal);
}

.badge-emerald {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10B981;
}

.badge-purple {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #8B5CF6;
}

/* ---------- Google Button ---------- */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1.5px solid #E2E8F0;
    border-radius: 0.875rem;
    color: #1E293B;
    font-weight: 700;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.btn-google:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transform: translateY(-1px);
}

.btn-google .google-icon {
    width: 1.125rem;
    height: 1.125rem;
}

/* ---------- Divider with Text ---------- */
.divider-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #94A3B8;
    font-size: 0.75rem;
    font-weight: 600;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

.dark .divider-text::before,
.dark .divider-text::after {
    background: #1E293B;
}

/* ---------- Tag Tech Stack ---------- */
.tech-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(14, 165, 233, 0.08);
    color: var(--teal);
    border: 1px solid rgba(14, 165, 233, 0.15);
}

html[data-theme="dark"] .tech-tag, .dark .tech-tag {
    background: rgba(56, 189, 248, 0.08);
    color: #38BDF8;
    border-color: rgba(56, 189, 248, 0.15);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.7); }

/* ---------- Toast / Alert ---------- */
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #DC2626;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

html[data-theme="dark"] .alert-success, .dark .alert-success {
    background: rgba(16, 185, 129, 0.08);
    color: #34D399;
}

html[data-theme="dark"] .alert-error, .dark .alert-error {
    background: rgba(239, 68, 68, 0.08);
    color: #F87171;
}

/* ---------- Pricing Cards ---------- */
.pricing-card-popular {
    box-shadow: 0 0 0 2px #0EA5E9, 0 16px 48px rgba(14,165,233,.2);
}

/* ---------- Booking Form ---------- */
.time-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.875rem;
    border-radius: 0.625rem;
    border: 1.5px solid rgba(226, 232, 240, 1);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    background: white;
    color: #475569;
}

.time-slot:hover, .time-slot.selected {
    border-color: #0EA5E9;
    background: rgba(14, 165, 233, 0.08);
    color: #0284C7;
}

html[data-theme="dark"] .time-slot, .dark .time-slot {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(51, 65, 85, 0.8);
    color: #94A3B8;
}

html[data-theme="dark"] .time-slot:hover,
html[data-theme="dark"] .time-slot.selected,
.dark .time-slot:hover,
.dark .time-slot.selected {
    border-color: #38BDF8;
    background: rgba(56, 189, 248, 0.08);
    color: #38BDF8;
}

/* ---------- Image Upload Preview ---------- */
.upload-zone {
    border: 2px dashed rgba(148, 163, 184, 0.4);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(248, 250, 252, 0.5);
}

.upload-zone:hover {
    border-color: var(--teal);
    background: rgba(14, 165, 233, 0.04);
}

.dark .upload-zone {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(56, 189, 248, 0.2);
}

/* ---------- Mobile Safe Areas ---------- */
@media (max-width: 640px) {
    .site-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    .no-print { display: none !important; }
    body { background: white; color: black; }
}

/* ---------- Focus Styles (Accessibility) ---------- */
:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

/* ---------- Selection Color ---------- */
::selection {
    background: rgba(14, 165, 233, 0.2);
    color: inherit;
}

/* ---------- Smooth Transition for Theme ---------- */
html, body, .admin-light-card, .bento-card, header, aside {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.15s ease;
}

/* ============================================================
   DARK MODE — Explicit overrides when .dark class is on <html>
   ============================================================ */

/* Body & Base */
html.dark, html.dark body {
    background-color: #0B0F19 !important;
    color: #F1F5F9 !important;
}

html.dark .bg-primary {
    background-color: #0B0F19 !important;
}

html.dark .bg-deep {
    background-color: #151E2E !important;
}

/* Bento Cards */
html.dark .bento-card {
    background-color: #1F2937 !important;
    border-color: rgba(56, 189, 248, 0.08) !important;
}

/* Text Colors */
html.dark .text-ink {
    color: #F1F5F9 !important;
}

html.dark .text-slate-500 {
    color: #94A3B8 !important;
}

html.dark .text-slate-600 {
    color: #CBD5E1 !important;
}

html.dark .text-slate-700 {
    color: #E2E8F0 !important;
}

html.dark .text-slate-900 {
    color: #F8FAFC !important;
}

/* Backgrounds */
html.dark .bg-white {
    background-color: #1F2937 !important;
}

html.dark .bg-slate-50 {
    background-color: #111827 !important;
}

html.dark .bg-slate-100 {
    background-color: #1F2937 !important;
}

html.dark .bg-slate-800 {
    background-color: #1F2937 !important;
}

/* Borders */
html.dark .border-slate-200\/60 {
    border-color: rgba(56, 189, 248, 0.08) !important;
}

html.dark .border-slate-200 {
    border-color: #374151 !important;
}

html.dark .border-slate-700 {
    border-color: #374151 !important;
}

/* Header / Navbar */
html.dark header {
    border-color: rgba(56, 189, 248, 0.08) !important;
    background-color: rgba(11, 15, 25, 0.85) !important;
}

/* Footer */
html.dark footer {
    background-color: #060A13 !important;
    border-color: rgba(56, 189, 248, 0.08) !important;
    color: #CBD5E1 !important;
}

html.dark footer a:hover {
    color: #38BDF8 !important;
}

/* Form Inputs */
html.dark input[type="text"],
html.dark input[type="email"],
html.dark input[type="password"],
html.dark input[type="date"],
html.dark input[type="tel"],
html.dark textarea,
html.dark select {
    background-color: #1F2937 !important;
    border-color: #374151 !important;
    color: #F1F5F9 !important;
}

html.dark input:focus,
html.dark textarea:focus,
html.dark select:focus {
    border-color: #38BDF8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12) !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #6B7280 !important;
}

/* Mobile menu */
html.dark [data-mobile-menu] {
    background-color: #1F2937 !important;
    border-color: #374151 !important;
}

/* Tables */
html.dark table {
    color: #CBD5E1 !important;
}

html.dark thead {
    border-color: #374151 !important;
}

html.dark tbody tr:hover {
    background-color: rgba(31, 41, 55, 0.5) !important;
}

/* Portfolio cards */
html.dark .portfolio-card {
    background-color: #1F2937 !important;
    border-color: rgba(56, 189, 248, 0.08) !important;
}

/* Alert / Success messages */
html.dark .bg-emerald-500\/10 {
    background-color: rgba(16, 185, 129, 0.08) !important;
}

html.dark .text-emerald-700 {
    color: #34D399 !important;
}

html.dark .bg-red-500\/10 {
    background-color: rgba(239, 68, 68, 0.08) !important;
}

html.dark .text-red-700 {
    color: #F87171 !important;
}
