:root {
    --primary: #d97736;
    --primary-light: #f29c61;
    --primary-dark: #b85c20;
    --secondary: #0c3b5e;
    --secondary-light: #165b8f;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-radius: 12px;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Dark Mode Overrides */
body.dark-mode {
    --bg-light: #0f172a;
    --bg-white: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-radius: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.6);
}

body.dark-mode .nav-links a { color: var(--text-main); }
body.dark-mode .dashboard-nav { border-bottom: 1px solid #334155; }
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #334155;
    color: var(--text-main);
    border-color: #475569;
}
body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    border-color: var(--primary);
    background: #1e293b;
}

/* Modal backgrounds in dark mode */
body.dark-mode .modal-content {
    background: var(--bg-white);
    color: var(--text-main);
}
body.dark-mode .close-btn {
    color: var(--text-muted);
}
body.dark-mode .close-btn:hover {
    color: var(--text-main);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    touch-action: manipulation;
}

body {
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--secondary);
    font-weight: 800;
    line-height: 1.2;
}

p {
    line-height: 1.6;
    color: var(--text-muted);
}

.highlight {
    color: var(--primary);
}

/* Layout Elements */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-title p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1.1rem;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(217, 119, 54, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(217, 119, 54, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    border: 2px solid white;
}

.btn-secondary:hover {
    background: var(--bg-white);
    color: var(--secondary);
    transform: translateY(-2px);
}

.w-100 {
    width: 100%;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 0;
    z-index: 1000;
    transition: var(--transition);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

nav.scrolled .logo {
    color: var(--secondary);
}

.logo i {
    color: var(--primary);
}

.logo span {
    font-weight: 400;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: var(--transition);
}

nav.scrolled .nav-links a:not(.btn-primary) {
    color: var(--text-main);
}

.nav-links a:hover:not(.btn-primary):not(.btn-login) {
    color: var(--primary);
}

/* Navigation buttons */
.nav-links .btn-primary {
    padding: 10px 24px;
    font-size: 1rem;
}

.btn-login {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1.1rem;
    background: #AA151B;
    /* Spanish Red */
    color: white !important;
    box-shadow: 0 4px 15px rgba(170, 21, 27, 0.3);
    border: none;
}

.btn-login:hover {
    background: #8b1116;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(170, 21, 27, 0.4);
    color: white !important;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(12, 59, 94, 0.85) 0%, rgba(12, 59, 94, 0.4) 100%);
    z-index: -1;
}

.hero-content {
    color: white;
    max-width: 800px;
}

.hero-content h1 {
    color: white;
    font-size: 4rem;
    margin-bottom: 24px;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.5rem;
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

/* Services */
.services {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.service-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (hover: hover) {
    .service-card:hover {
        transform: translateY(-10px);
        box-shadow: var(--shadow-hover);
    }
}

.service-img-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.service-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-img-wrapper img {
    transform: scale(1.05);
}

.service-icon {
    position: absolute;
    bottom: -30px;
    right: 32px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(217, 119, 54, 0.4);
    border: 4px solid white;
}

.service-content {
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.service-content h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.service-content p {
    margin-bottom: 24px;
}

.service-features {
    list-style: none;
    margin-top: auto;
}

.service-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 500;
    color: var(--secondary);
}

.service-features li i {
    color: var(--primary);
    margin-top: 4px;
}

/* Why Us */
.why-us {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.container-flex {
    display: flex;
    align-items: center;
    gap: 60px;
}

.why-text {
    flex: 1;
}

.why-text h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.why-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.stat-item h4 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 8px;
}

.stat-item span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.why-image {
    flex: 1;
    position: relative;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.quote-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 24px;
}

.glass-card p {
    color: white;
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 24px;
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

/* Contact */
.contact {
    padding: 100px 0;
    background: var(--bg-light);
}

.contact-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    display: flex;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.contact-info {
    flex: 1;
    background: var(--secondary);
    color: white;
    padding: 60px 40px;
}

.contact-info h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 16px;
}

.contact-info>p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

.contact-details p {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 1.1rem;
    color: white;
}

.contact-details i {
    color: var(--primary);
    font-size: 1.5rem;
}

.contact-form {
    flex: 1.5;
    padding: 60px 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(217, 119, 54, 0.1);
}

/* Footer */
footer {
    background: #08263e;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.footer-logo i {
    color: var(--primary);
}

.footer-content p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Pricing / Package Cards */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 20px;
}

.package-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 40px 32px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.package-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.package-card.highlight {
    border: 2px solid var(--primary);
    transform: scale(1.05);
}

.package-card.highlight:hover {
    transform: scale(1.05) translateY(-10px);
}

.package-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.package-name {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 16px;
    text-align: center;
}

.package-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.1;
}

.package-price.text-only {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.3rem;
    /* to align with the large numbers */
}

.package-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.package-desc {
    text-align: center;
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.package-features {
    list-style: none;
    margin-bottom: 40px;
    flex-grow: 1;
}

.package-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    color: var(--secondary);
}

.package-features li i {
    color: var(--primary);
}

.package-card .btn-primary {
    text-align: center;
    width: 100%;
}

.package-card:not(.highlight) .btn-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

.package-card:not(.highlight) .btn-primary:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(217, 119, 54, 0.4);
}

/* Tabs */
.services-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 32px;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--secondary);
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.tab-btn:hover {
    background: rgba(217, 119, 54, 0.1);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(217, 119, 54, 0.3);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-pane.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 900px) {

    .container-flex,
    .contact-card {
        flex-direction: column;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.lang-switcher span.divider {
    color: rgba(255, 255, 255, 0.4);
}

nav.scrolled .lang-switcher span.divider {
    color: rgba(0, 0, 0, 0.2);
}

.lang-switcher a.active {
    color: var(--primary) !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* CRM Layout Framework */
.crm-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background-color: var(--bg-light);
}

.crm-sidebar {
    width: 250px;
    flex-shrink: 0;
    background-color: var(--secondary);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    transition: var(--transition);
    z-index: 100;
}

.crm-sidebar .logo {
    padding: 0 24px 32px 24px;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    flex-wrap: wrap;
}

.crm-sidebar-menu {
    list-style: none;
    flex-grow: 1;
}

.crm-sidebar-menu li {
    margin-bottom: 4px;
}

.crm-sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.crm-sidebar-menu a i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.2rem;
}

.crm-sidebar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.crm-sidebar-menu a.active {
    background-color: var(--primary);
    color: white;
    border-left: 4px solid white;
}

.crm-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.crm-topbar {
    height: 70px;
    background: var(--bg-white);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.crm-topbar-left {
    display: flex;
    align-items: center;
}

.crm-topbar-search {
    position: relative;
    margin-left: 24px;
}

.crm-topbar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.crm-topbar-search input {
    padding: 8px 16px 8px 36px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    width: 300px;
    outline: none;
    transition: var(--transition);
}

.crm-topbar-search input:focus {
    border-color: var(--primary);
}

.crm-content {
    flex-grow: 1;
    padding: 24px;
    overflow-y: auto;
    position: relative;
}

/* CRM Table */
.crm-table-container,
.table-container {
    background: var(--bg-white);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 24px;
}

.crm-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.crm-table th,
.crm-table td,
.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.crm-table th,
.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.9rem;
}

.crm-table tbody tr,
.data-table tbody tr {
    transition: var(--transition);
}

.crm-table tbody tr:hover,
.data-table tbody tr:hover {
    background: #f8fafc;
}

.crm-table tbody tr:last-child td,
.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Slide Panel */
.slide-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 500px;
    max-width: 100vw;
    background: var(--bg-white);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.slide-panel.open {
    transform: translateX(0);
}

.slide-panel-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #f8fafc;
}

.slide-panel-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.slide-panel-close:hover {
    color: #ef4444;
}

.slide-panel-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Hamburger for mobile */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary);
    cursor: pointer;
}


/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    align-items: flex-start;
}

.kanban-column {
    flex: 1;
    min-width: 0;
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.kanban-header {
    margin: 0 0 16px 0;
    color: var(--secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}

.kanban-header .badge {
    background: #e2e8f0;
    color: var(--secondary);
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100px;
}

.kanban-card {
    background: var(--bg-white);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
}

.kanban-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.k-card-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 10px;
    height: 10px;
    background: #e11d48;
    border-radius: 50%;
}

.k-card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.k-card-name {
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 2px;
}

.k-card-subject {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.k-card-type {
    font-size: 0.75rem;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

@media (max-width: 900px) {
    .crm-sidebar {
        position: fixed;
        left: -250px;
        height: 100vh;
    }

    .crm-sidebar.open {
        left: 0;
    }

    .hamburger {
        display: block;
        margin-right: 16px;
    }

    .slide-panel {
        width: 100%;
    }

    .crm-topbar-search {
        display: none;
    }

    /* Kanban Mobile View */
    .kanban-board {
        display: block;
    }

    .kanban-column {
        display: none;
        margin-top: 16px;
    }

    .kanban-column.active {
        display: block;
    }

    .kanban-mobile-tabs {
        display: flex !important;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 8px;
        border-bottom: 1px solid #e2e8f0;
    }

    .k-tab {
        background: var(--bg-white);
        border: 1px solid #e2e8f0;
        padding: 8px 16px;
        border-radius: 20px;
        white-space: nowrap;
        font-family: inherit;
        font-weight: 600;
        color: var(--text-muted);
        cursor: pointer;
    }

    .k-tab.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }
}

/* ==========================================================================
   SPA Client Portal Styles (Dashboard Panels)
   ========================================================================== */

/* Shared */
.page-container {
    padding: 120px 24px 60px 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}
.page-header h2 { margin: 0; }
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 16px;
}
.nav-center-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Inspecties */
.inspectie-list { display: grid; gap: 24px; }
.inspectie-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}
.inspectie-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}
.inspectie-header {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.inspectie-header h3 { margin: 0; font-size: 1.3rem; display: flex; align-items: center; gap: 12px; }
.inspectie-date { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.inspectie-body { padding: 0 32px 24px 32px; border-top: 1px solid rgba(0, 0, 0, 0.05); }
.inspectie-body p { margin-top: 16px; margin-bottom: 16px; }
.foto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.foto-grid img {
    width: 100%; height: 180px; object-fit: cover; border-radius: 8px; cursor: pointer; transition: var(--transition);
}
.foto-grid img:hover { transform: scale(1.03); box-shadow: var(--shadow); }
.lightbox {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); z-index: 9999; justify-content: center; align-items: center; cursor: pointer;
}

@media (max-width: 768px) {
    input, textarea, select {
        font-size: 16px !important;
    }
    .hide-on-mobile { display: none !important; }
    .show-on-mobile { display: flex !important; }
    .reverse-on-mobile { display: flex !important; flex-direction: column-reverse !important; }
}
.show-on-mobile { display: none; }

.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 90%; border-radius: 8px; }

/* Facturen */
.facturen-summary {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 20px; margin-bottom: 32px;
}
.summary-card {
    background: var(--bg-white); padding: 24px; border-radius: var(--border-radius); box-shadow: var(--shadow); text-align: center;
}
.summary-card h4 { color: var(--primary); font-size: 1.8rem; margin-bottom: 4px; }
.summary-card span { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.facturen-table-wrapper { background: var(--bg-white); border-radius: var(--border-radius); box-shadow: var(--shadow); overflow: hidden; }
.facturen-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.facturen-table thead { background: var(--secondary); color: white; }
.facturen-table th { padding: 16px 24px; text-align: left; font-weight: 600; }
.facturen-table td { padding: 16px 24px; border-bottom: 1px solid rgba(0, 0, 0, 0.05); color: var(--text-main); }
.facturen-table tbody tr { transition: var(--transition); }
.facturen-table tbody tr:hover { background: rgba(217, 119, 54, 0.05); }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.status-open { background: #fff3e0; color: #e65100; }
.status-betaald { background: #e8f5e9; color: #2e7d32; }
@media (max-width: 768px) {
    .facturen-table th:nth-child(4), .facturen-table td:nth-child(4) { display: none; }
}

/* Meldingen */
.melding-form-card { background: var(--bg-white); border-radius: var(--border-radius); box-shadow: var(--shadow); padding: 32px; margin-bottom: 40px; }
.melding-form-card h3 { margin-bottom: 24px; display: flex; align-items: center; gap: 12px; }
.melding-form-card .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.melding-form-card .form-group { margin-bottom: 16px; }
.melding-form-card select, .melding-form-card input, .melding-form-card textarea {
    width: 100%; padding: 14px 16px; border: 1px solid #e1e1e1; border-radius: 8px; font-family: inherit; font-size: 1rem; transition: var(--transition); background: var(--bg-light);
}
.melding-form-card select:focus, .melding-form-card input:focus, .melding-form-card textarea:focus {
    outline: none; border-color: var(--primary); background: var(--bg-white); box-shadow: 0 0 0 4px rgba(217, 119, 54, 0.1);
}
.success-message { display: none; padding: 16px; background: #e8f5e9; color: #2e7d32; border-radius: 8px; margin-bottom: 16px; font-weight: 600; }
.meldingen-list { display: grid; gap: 16px; }
.melding-card { background: var(--bg-white); border-radius: var(--border-radius); box-shadow: var(--shadow); padding: 24px 32px; display: flex; justify-content: space-between; align-items: center; transition: var(--transition); gap: 16px; }
.melding-card:hover { box-shadow: var(--shadow-hover); }
.melding-info { flex: 1; }
.melding-info h4 { margin-bottom: 4px; font-size: 1.1rem; }
.melding-info p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 4px; }
.melding-meta { display: flex; align-items: center; gap: 16px; font-size: 0.85rem; color: var(--text-muted); }
.status-nieuw { background: #e3f2fd; color: #1565c0; }
.status-in_behandeling { background: #fff3e0; color: #e65100; }
.status-afgehandeld { background: #e8f5e9; color: #2e7d32; }
@media (max-width: 768px) {
    .melding-form-card .form-row { grid-template-columns: 1fr; }
    .melding-card { flex-direction: column; align-items: flex-start; }
}

/* === PAYMENT MODAL === */
.payment-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    padding: 20px;
}

.payment-modal-content {
    background: var(--bg-white);
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    animation: modalPopIn 0.3s ease-out forwards;
    overflow: hidden;
}

@keyframes modalPopIn {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.payment-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.payment-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--secondary);
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover { color: #ef4444; }

.payment-modal-body {
    padding: 24px;
}

.payment-info-box {
    background: #f1f5f9;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.payment-option {
    margin-top: 12px;
}

.payment-option-btn {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    background: var(--bg-white);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.payment-option-btn i {
    color: var(--primary);
    margin-right: 12px;
}

.payment-option-btn:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.payment-details {
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
}

/* Notification Center */
.notification-container {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-btn {
    background: transparent;
    border: none;
    color: var(--secondary);
    font-size: 1.3rem;
    cursor: pointer;
    position: relative;
    padding: 8px;
    transition: var(--transition);
}

.notification-btn:hover {
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    margin-top: 12px;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.notification-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--secondary);
}

.mark-read-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
}

.mark-read-btn:hover {
    text-decoration: underline;
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.notification-item {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: rgba(217,119,54,0.05);
    border-left: 3px solid var(--primary);
}

.notification-item-title {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.95rem;
}

.notification-item-body {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.notification-item-time {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
}

.empty-notifications {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed !important;
        top: 70px !important;
        right: 12px !important;
        left: 12px !important;
        width: auto !important;
        max-width: none !important;
    }
    .notification-list {
        max-height: 60vh !important;
    }
}

/* User Menu Profile Dropdown */
.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: max-content;
    min-width: 200px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    margin-top: 12px;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-item {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

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

.profile-dropdown-item:hover {
    background: #f8fafc;
}

.profile-dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--primary);
}

body.dark-mode .profile-dropdown-item:hover {
    background: #0f172a;
}
body.dark-mode .profile-dropdown-item {
    border-color: #334155;
    color: var(--text-main);
}

/* Verwijder hover-hoogte effecten (translateY) op mobiel */
@media (max-width: 768px) {
    .service-card:hover,
    .package-card:hover,
    .inspectie-card:hover,
    .kanban-card:hover,
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none !important;
    }
    
    .package-card.highlight:hover {
        transform: scale(1.05) !important;
    }
}
/* Premium Logo Loader */
.premium-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-light);
    z-index: 9999;
    transition: opacity 0.6s ease-out;
}

.loader-pulse-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    animation: pulse-logo 2s infinite ease-in-out;
    object-fit: contain;
    background: white;
    padding: 8px;
}

@keyframes pulse-logo {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0,0,0, 0.05); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(0,0,0, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0,0,0, 0); }
}

/* ==========================================================================
   INBOX & WEBMAIL MODULE STYLING
   ========================================================================== */
/* ==========================================================================
   E-MAIL CLIENT (INBOX) COMPONENT
   ========================================================================== */
.inbox-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inbox-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.inbox-container {
    display: grid;
    grid-template-columns: 390px 1fr;
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    min-height: 680px;
    height: calc(100vh - 210px);
    overflow: hidden;
}

.inbox-list-pane {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
    height: 100%;
    overflow: hidden;
}

.inbox-header,
.inbox-pane-header {
    padding: 16px 18px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.inbox-header-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.inbox-header-title h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
}

/* Nieuwe e-mail knop */
.inbox-compose-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(217, 119, 54, 0.28);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.inbox-compose-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 119, 54, 0.38);
    filter: brightness(1.06);
}

.inbox-compose-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(217, 119, 54, 0.2);
}

/* Zoekbalk: fix zodat tekst nooit onder het vergrootglas zit */
.inbox-search-box {
    position: relative;
    width: 100%;
}

.inbox-search-box input,
.admin-card .inbox-search-box input {
    width: 100% !important;
    padding: 10px 38px 10px 42px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 0.88rem !important;
    font-family: inherit !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    background: #f8fafc !important;
    color: #1e293b !important;
    box-sizing: border-box !important;
}

.inbox-search-box input:focus,
.admin-card .inbox-search-box input:focus {
    border-color: var(--primary) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(217, 119, 54, 0.15) !important;
}

.inbox-search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 2;
}

.inbox-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.2s;
    z-index: 2;
}

.inbox-search-clear:hover {
    background: #cbd5e1;
    color: #1e293b;
}

/* Filter chips */
.inbox-filter-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.inbox-filter-chips::-webkit-scrollbar {
    display: none;
}

.inbox-filter-chip,
.inbox-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.inbox-filter-chip:hover,
.inbox-chip:hover {
    background: #f1f5f9;
    color: var(--secondary);
    border-color: #cbd5e1;
}

.inbox-filter-chip.active,
.inbox-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(217, 119, 54, 0.25);
}

/* E-maillijst */
.inbox-list,
.inbox-emails-list {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    -webkit-overflow-scrolling: touch;
}

.inbox-list::-webkit-scrollbar,
.inbox-emails-list::-webkit-scrollbar {
    width: 6px;
}

.inbox-list::-webkit-scrollbar-track,
.inbox-emails-list::-webkit-scrollbar-track {
    background: transparent;
}

.inbox-list::-webkit-scrollbar-thumb,
.inbox-emails-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
}

.inbox-list::-webkit-scrollbar-thumb:hover,
.inbox-emails-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.inbox-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.inbox-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.inbox-card.active {
    background: #fff7ed;
    border-color: var(--primary-light);
    box-shadow: 0 3px 12px rgba(217, 119, 54, 0.1);
}

.inbox-card.unread {
    border-left: 4px solid var(--primary);
    background: #fafafa;
}

.inbox-card.unread .inbox-card-subject {
    font-weight: 700;
    color: #0f172a;
}

.inbox-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.inbox-card-avatar,
.inbox-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.inbox-card-from,
.inbox-card-sender {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-card-date {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.inbox-card-subject {
    font-size: 0.85rem;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-card-preview {
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.inbox-badge-direction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.3px;
}

.inbox-badge-inbound {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.inbox-badge-outbound {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Detail View Pane */
.inbox-detail-pane {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    height: 100%;
    overflow: hidden;
}

.inbox-empty-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    padding: 40px;
    text-align: center;
}

.inbox-detail-header {
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
    flex-shrink: 0;
}

.inbox-detail-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.inbox-detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

.inbox-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.inbox-action-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.inbox-action-btn:hover {
    background: #f8fafc;
    color: var(--secondary);
    border-color: #94a3b8;
    transform: translateY(-1px);
}

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

.inbox-action-btn.primary {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(217, 119, 54, 0.25);
}

.inbox-action-btn.primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 10px rgba(217, 119, 54, 0.35);
}

.inbox-detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #64748b;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.inbox-detail-body {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 24px;
    line-height: 1.6;
    color: #334155;
    font-size: 0.95rem;
    word-break: break-word;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    -webkit-overflow-scrolling: touch;
}

.inbox-detail-body::-webkit-scrollbar {
    width: 6px;
}

.inbox-detail-body::-webkit-scrollbar-track {
    background: transparent;
}

.inbox-detail-body::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 6px;
}

.inbox-detail-body::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

.inbox-detail-body img {
    max-width: 100%;
    height: auto;
}

.inbox-detail-body table {
    max-width: 100%;
    border-collapse: collapse;
}

.inbox-detail-body blockquote {
    margin: 12px 0;
    padding: 0 0 0 14px;
    border-left: 3px solid #cbd5e1;
    color: #475569;
}

.inbox-detail-body hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 20px 0;
}

.inbox-quick-reply {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.inbox-quick-reply textarea,
.admin-card .inbox-quick-reply textarea {
    width: 100% !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 10px 14px !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    resize: vertical !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
}

.inbox-quick-reply textarea:focus,
.admin-card .inbox-quick-reply textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(217, 119, 54, 0.15) !important;
}

@media (max-width: 900px) {
    .inbox-container {
        grid-template-columns: 1fr;
        height: calc(100dvh - 180px);
        min-height: 520px;
    }
    .inbox-list-pane {
        height: 100%;
    }
    .inbox-list-pane.hide-mobile {
        display: none !important;
    }
    .inbox-detail-pane {
        height: 100%;
    }
    .inbox-detail-pane.hide-mobile {
        display: none !important;
    }
    .inbox-detail-header {
        padding: 14px 16px;
        gap: 8px;
    }
    .inbox-detail-title {
        font-size: 1.15rem;
        word-break: break-word;
    }
    .inbox-detail-meta {
        padding: 8px 12px;
        font-size: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .inbox-detail-body {
        padding: 16px !important;
        font-size: 16px !important;
        line-height: 1.6;
        word-break: break-word;
    }
    .inbox-detail-body blockquote {
        margin: 8px 0;
        padding-left: 10px;
        font-size: 14px;
    }
    .inbox-quick-reply {
        padding: 12px 16px;
    }
    #inboxQuickReplyText,
    .admin-card .inbox-quick-reply textarea {
        font-size: 16px !important;
        padding: 12px 14px !important;
        min-height: 80px;
        border-radius: 8px !important;
    }
    #inboxSendQuickReplyBtn {
        min-height: 44px;
        padding: 10px 18px;
        font-size: 0.95rem;
    }
}

/* Modal E-mail Opstellen / Beantwoorden op Mobiel */
@media (max-width: 768px) {
    #composeEmailModal {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100% !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 16px !important;
        box-sizing: border-box !important;
        border: none !important;
    }
    #composeEmailModal[open] {
        display: flex !important;
        flex-direction: column !important;
    }
    #composeEmailForm {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    #composeEmailModal .form-group {
        margin-bottom: 12px !important;
    }
    #composeEmailModal label {
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        color: #334155 !important;
        margin-bottom: 6px !important;
        display: block !important;
    }
    #composeEmailModal input,
    #composeEmailModal select {
        font-size: 16px !important;
        padding: 12px 14px !important;
        border-radius: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    #composeEmailModal .compose-body-group {
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 220px !important;
        margin-bottom: 14px !important;
    }
    #composeEmailBody {
        font-size: 16px !important;
        padding: 14px !important;
        line-height: 1.6 !important;
        border-radius: 8px !important;
        flex: 1 !important;
        min-height: 220px !important;
        box-sizing: border-box !important;
        resize: none !important;
        width: 100% !important;
    }
    .compose-modal-footer {
        display: flex !important;
        justify-content: flex-end !important;
        gap: 12px !important;
        padding-top: 14px !important;
        margin-top: auto !important;
        border-top: 1px solid #e2e8f0 !important;
    }
    .compose-modal-footer button {
        min-height: 44px !important;
        padding: 10px 20px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
    }
}

dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ==========================================================================
   WhatsApp Business Module Styles
   ========================================================================== */
.whatsapp-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    min-height: 680px;
    height: calc(100vh - 210px);
    overflow: hidden;
}

.whatsapp-list-pane {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
    height: 100%;
    overflow: hidden;
}

.whatsapp-header {
    padding: 16px 18px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.whatsapp-header-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.whatsapp-header-title h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1f2937;
}

.whatsapp-compose-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    background: #25D366;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-compose-btn:hover {
    background: #1eb956;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45);
}

.whatsapp-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.whatsapp-search-box i {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}

.whatsapp-search-box input {
    width: 100%;
    padding: 8px 32px 8px 34px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.88rem;
    background: #f1f5f9;
    color: #1e293b;
    outline: none;
    transition: all 0.2s;
}

.whatsapp-search-box input:focus {
    background: #ffffff;
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.whatsapp-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.whatsapp-conv-item {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-left 0.15s ease;
    border-left: 4px solid transparent;
}

.whatsapp-conv-item:hover {
    background: #f1f5f9;
}

.whatsapp-conv-item.active {
    background: #f0fdf4;
    border-left-color: #25D366;
}

.whatsapp-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #25D366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
}

.whatsapp-conv-body {
    flex: 1;
    min-width: 0;
}

.whatsapp-conv-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.whatsapp-conv-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.whatsapp-conv-time {
    font-size: 0.72rem;
    color: #94a3b8;
    flex-shrink: 0;
    margin-left: 8px;
}

.whatsapp-conv-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.whatsapp-conv-snippet {
    font-size: 0.82rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.whatsapp-conv-badge {
    background: #25D366;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* Chat Details Pane */
.whatsapp-chat-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #efeae2;
    background-image: radial-gradient(#d5cdc4 1px, transparent 1px);
    background-size: 20px 20px;
    overflow: hidden;
    position: relative;
}

.whatsapp-chat-header {
    padding: 12px 18px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    z-index: 10;
}

.whatsapp-chat-header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-chat-header-title {
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
    margin: 0;
}

.whatsapp-chat-header-subtitle {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
}

.whatsapp-window-alert {
    padding: 8px 16px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    color: #92400e;
    z-index: 5;
}

.whatsapp-window-alert.active-window {
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
    color: #166534;
}

.whatsapp-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.whatsapp-bubble {
    max-width: 68%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.45;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    word-break: break-word;
}

.whatsapp-bubble.inbound {
    align-self: flex-start;
    background: #ffffff;
    color: #1e293b;
    border-top-left-radius: 2px;
}

.whatsapp-bubble.outbound {
    align-self: flex-end;
    background: #d9fdd3;
    color: #1e293b;
    border-top-right-radius: 2px;
}

.whatsapp-bubble-text {
    white-space: pre-wrap;
}

.whatsapp-bubble-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 3px;
    margin-left: 12px;
}

.whatsapp-bubble.outbound .whatsapp-bubble-meta {
    color: #55755d;
}

.whatsapp-template-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
    font-weight: 600;
}

.whatsapp-chat-composer {
    padding: 12px 16px;
    background: #f0f2f5;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    z-index: 10;
}

.whatsapp-chat-composer textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #ffffff;
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    resize: none;
    max-height: 120px;
    min-height: 42px;
    box-sizing: border-box;
    line-height: 1.4;
    transition: border-color 0.15s;
}

.whatsapp-chat-composer textarea:focus {
    border-color: #25D366;
}

.whatsapp-send-circle-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #25D366;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.4);
    transition: transform 0.15s, background 0.15s;
    flex-shrink: 0;
}

.whatsapp-send-circle-btn:hover {
    background: #1eb956;
    transform: scale(1.05);
}

.whatsapp-send-circle-btn:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.whatsapp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #64748b;
    text-align: center;
    padding: 30px;
}

/* Dark mode adjustments */
body.dark-mode .whatsapp-container {
    background: #111b21;
    border-color: #222d34;
}

body.dark-mode .whatsapp-list-pane {
    background: #111b21;
    border-color: #222d34;
}

body.dark-mode .whatsapp-header {
    background: #202c33;
    border-color: #222d34;
}

body.dark-mode .whatsapp-header-title h3 {
    color: #e9edef;
}

body.dark-mode .whatsapp-search-box input {
    background: #202c33;
    border-color: #222d34;
    color: #e9edef;
}

body.dark-mode .whatsapp-conv-item {
    border-bottom-color: #222d34;
}

body.dark-mode .whatsapp-conv-item:hover {
    background: #202c33;
}

body.dark-mode .whatsapp-conv-item.active {
    background: #2a3942;
    border-left-color: #25D366;
}

body.dark-mode .whatsapp-conv-name {
    color: #e9edef;
}

body.dark-mode .whatsapp-conv-snippet {
    color: #8696a0;
}

body.dark-mode .whatsapp-chat-pane {
    background: #0b141a;
    background-image: radial-gradient(#1f2c34 1px, transparent 1px);
}

body.dark-mode .whatsapp-chat-header {
    background: #202c33;
    border-color: #222d34;
}

body.dark-mode .whatsapp-chat-header-title {
    color: #e9edef;
}

body.dark-mode .whatsapp-chat-header-subtitle {
    color: #8696a0;
}

body.dark-mode .whatsapp-bubble.inbound {
    background: #202c33;
    color: #e9edef;
}

body.dark-mode .whatsapp-bubble.outbound {
    background: #005c4b;
    color: #e9edef;
}

body.dark-mode .whatsapp-bubble-meta {
    color: #8696a0;
}

body.dark-mode .whatsapp-bubble.outbound .whatsapp-bubble-meta {
    color: #8696a0;
}

body.dark-mode .whatsapp-chat-composer {
    background: #202c33;
    border-color: #222d34;
}

body.dark-mode .whatsapp-chat-composer textarea {
    background: #2a3942;
    border-color: #2a3942;
    color: #e9edef;
}

@media (max-width: 900px) {
    .whatsapp-container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
    }
    .whatsapp-list-pane {
        height: calc(100vh - 220px);
    }
    .whatsapp-list-pane.hide-mobile {
        display: none !important;
    }
    .whatsapp-chat-pane.hide-mobile {
        display: none !important;
    }
}

