/*
==========================================================================
Palika Sarkar Home & Atelier B.V. - Utrecht Studio & Collectie Overzicht
Palika Sarkar Atelier Layout Architecture (Light & Dark Mode)
==========================================================================
*/

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

:root, [data-theme="light"] {
    --bg-primary: #f4f6f4;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #edf2ee;
    --accent-copper: #b87333;
    --accent-copper-light: #d4945a;
    --accent-gradient: linear-gradient(135deg, #b87333 0%, #d4945a 55%, #e2ab79 100%);
    --accent-gradient-hover: linear-gradient(135deg, #a56328 0%, #c48248 55%, #d4945a 100%);
    --text-primary: #1c1c1e;
    --text-secondary: #454d48;
    --text-muted: #636b66;
    --gain: #356e4d;
    --loss: #a84848;
    --border: #d8e0da;
    --shadow: rgba(28, 28, 30, 0.07);
    --chart-grid: rgba(28, 28, 30, 0.07);
    --overlay: rgba(28, 28, 30, 0.52);
    --surface-subtle: rgba(184, 115, 51, 0.07);
}

[data-theme="dark"] {
    --bg-primary: #1c1c1e;
    --bg-secondary: #232325;
    --bg-card: #2c2c2e;
    --bg-card-hover: #343436;
    --accent-copper: #b87333;
    --accent-copper-light: #c9845a;
    --accent-gradient: linear-gradient(135deg, #b87333 0%, #d4945a 50%, #c9845a 100%);
    --accent-gradient-hover: linear-gradient(135deg, #c9845a 0%, #daa57a 50%, #d4945a 100%);
    --text-primary: #f5f0e8;
    --text-secondary: #c2bdb4;
    --text-muted: #8e8a82;
    --gain: #6b8e6b;
    --loss: #c27878;
    --border: #3a3a3c;
    --shadow: rgba(0, 0, 0, 0.32);
    --chart-grid: rgba(255, 255, 255, 0.06);
    --overlay: rgba(0, 0, 0, 0.6);
    --surface-subtle: rgba(255, 255, 255, 0.04);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img, svg {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent-copper);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-copper-light);
}

/* ========================================
   Top Single-Row Site Header
======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1005;
    width: 100%;
    height: 74px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 14px var(--shadow);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-header .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 0;
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #1c1c1e;
    box-shadow: 0 4px 12px rgba(184, 115, 51, 0.25);
    flex-shrink: 0;
}

.logo-brand-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-text {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo-subtext {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    overflow: visible;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list > li {
    position: relative;
}

.nav-list > li > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-list > li > a:hover,
.nav-list > li > a.active {
    background-color: var(--bg-card-hover);
    color: var(--accent-copper);
}

.chevron-icon {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.nav-list > li.has-sub:hover > a .chevron-icon,
.nav-list > li.has-sub.open > a .chevron-icon {
    transform: rotate(180deg);
}

.submenu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 265px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 14px 32px var(--shadow);
    padding: 8px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.2s ease;
    z-index: 1010;
}

.nav-list > li.has-sub:hover > .submenu,
.nav-list > li.has-sub:focus-within > .submenu,
.nav-list > li.has-sub.open > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.submenu li a:hover,
.submenu li a.active {
    background-color: var(--bg-card-hover);
    color: var(--accent-copper);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-cta {
    padding: 9px 16px !important;
    font-size: 14px !important;
    white-space: nowrap;
    text-decoration: none;
}

/* ========================================
   Dashboard Layout (Palika Studio Grid)
======================================== */
.dashboard {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: calc(100vh - 74px);
    max-width: 1440px;
    margin: 0 auto;
}

/* ========================================
   Mobile Menu Toggle
======================================== */
.mobile-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    background-color: var(--bg-card-hover);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Sidebar Overlay
======================================== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--overlay);
    z-index: 1003;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ========================================
   Sidebar (Sticky Atelier Navigation)
======================================== */
.sidebar {
    background-color: var(--bg-secondary);
    padding: 24px 18px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 1004;
    height: calc(100vh - 74px);
    position: sticky;
    top: 74px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-copper), var(--accent-copper-light));
    border-radius: 10px;
}

.sidebar-status-box {
    background-color: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 22px;
}

.sidebar-status-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-copper);
    margin-bottom: 4px;
}

.sidebar-status-line {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--gain);
    flex-shrink: 0;
}

.nav-section {
    margin-bottom: 22px;
}

.nav-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    padding-left: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 9px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-gradient);
    color: #1c1c1e;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(184, 115, 51, 0.25);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.85;
}

.nav-item.active .nav-icon {
    opacity: 1;
    stroke: #1c1c1e;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    background-color: var(--bg-secondary);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 10px;
    background-color: var(--bg-primary);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.theme-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 600;
}

.theme-switch {
    position: relative;
    width: 46px;
    height: 24px;
    background-color: var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
}

.theme-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background-color: var(--text-primary);
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

[data-theme="light"] .theme-switch {
    background: var(--accent-gradient);
}

[data-theme="light"] .theme-switch::after {
    transform: translateX(22px);
    background-color: #1c1c1e;
}

.atelier-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--text-primary);
    background-color: var(--surface-subtle);
    border: 1px solid var(--accent-copper);
    text-decoration: none;
    width: 100%;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.atelier-contact-btn:hover {
    background: var(--accent-gradient);
    color: #1c1c1e;
}

/* ========================================
   Main Content Area
======================================== */
.main-content {
    padding: 32px 36px;
    min-width: 0;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

/* ========================================
   Cards & Typography
======================================== */
.card {
    background-color: var(--bg-card);
    border-radius: 14px;
    padding: 26px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px var(--shadow);
    transition: all 0.3s ease;
    min-width: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-description {
    font-size: 14.5px;
    color: var(--text-secondary);
}

/* ========================================
   Buttons
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    background-color: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
}

.btn:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-copper);
    color: var(--text-primary);
}

.btn.primary {
    background: var(--accent-gradient);
    border: none;
    color: #1c1c1e;
}

.btn.primary:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-1px);
    color: #1c1c1e;
}

.btn-group {
    display: flex;
    gap: 14px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ========================================
   Form Elements
======================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 18px;
    min-width: 0;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-textarea {
    min-height: 110px;
    resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-copper);
}

/* ========================================
   Toggle Switches
======================================== */
.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.toggle-item:last-child {
    border-bottom: none;
}

.toggle-info {
    flex: 1;
}

.toggle-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.toggle-description {
    font-size: 13.5px;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background-color: var(--border);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
    border: none;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background-color: var(--text-primary);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch.active {
    background: var(--accent-gradient);
}

.toggle-switch.active::after {
    transform: translateX(22px);
    background-color: #1c1c1e;
}

/* ========================================
   Material & Glaze Badges (Palika Studio Icons)
======================================== */
.glaze-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
    flex-shrink: 0;
}

.glaze-icon.koper { background: linear-gradient(135deg, #b87333, #8f541e); }
.glaze-icon.salie { background: linear-gradient(135deg, #5a8a6a, #356e4d); }
.glaze-icon.zand { background: linear-gradient(135deg, #c9a678, #9c7a4c); }
.glaze-icon.leisteen { background: linear-gradient(135deg, #4f5d65, #2f383d); }
.glaze-icon.vlas { background: linear-gradient(135deg, #8c7b65, #635544); }
.glaze-icon.oker { background: linear-gradient(135deg, #d4945a, #a86b32); }

/* ========================================
   Site Footer
======================================== */
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 36px 28px;
    margin-top: 48px;
}

.footer-grid {
    max-width: 1360px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.footer-col h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent-copper);
}

.footer-bottom {
    max-width: 1360px;
    margin: 24px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: var(--text-muted);
}

/* ========================================
   Cookie Banner (Telecommunicatiewet Art. 11.7a)
======================================== */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 680px;
    margin: 0 auto;
    background-color: var(--bg-secondary);
    border: 2px solid var(--accent-copper);
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner.hidden {
    display: none !important;
}

.cookie-text {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* ========================================
   Responsive Breakpoints
======================================== */
@media (max-width: 1240px) {
    .logo-subtext {
        display: none;
    }
    .nav-list > li > a {
        padding: 8px 9px;
        font-size: 13.5px;
    }
}

@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }
    .mobile-menu-toggle {
        display: inline-flex;
    }
    .dashboard {
        grid-template-columns: minmax(0, 1fr);
    }
    .sidebar {
        position: fixed;
        top: 74px;
        left: 0;
        height: calc(100vh - 74px);
        width: 280px;
        transform: translateX(-100%);
        box-shadow: 6px 0 24px var(--shadow);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        padding: 24px 20px;
    }
    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .form-group.full-width {
        grid-column: span 1;
    }
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .header-inner {
        padding: 0 14px;
    }
    .header-cta {
        display: none;
    }
    .main-content {
        padding: 18px 14px;
    }
    .card {
        padding: 18px;
    }
    .btn-group {
        flex-direction: column;
    }
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        bottom: 12px;
        left: 12px;
        right: 12px;
    }
}
