:root {
    --primary-color: #2A4D38;      /* Official ADHA deep green */
    --primary-dark: #1E3728;       /* Darker green for headers/hover */
    --accent-color: #C5A059;       /* Gold/Sand accent */
    --accent-light: #E8DCC4;      /* Soft gold */
    --bg-light: #F4F7F5;           /* Light body background */
    --bg-card: #FFFFFF;            /* White card background */
    --bg-secondary: #EBF4F0;       /* Light sage green for panels */
    --text-primary: #1C2621;       /* Dark charcoal for text */
    --text-muted: #5D6B64;         /* Muted grey-green */
    --border-color: #DFE5E1;       /* Delicate green-grey border */
    --success-color: #2E7D32;      /* Positive states */
    --error-color: #C62828;        /* Alert states */
    --shadow-sm: 0 1px 3px rgba(42, 77, 56, 0.05);
    --shadow-md: 0 4px 12px rgba(42, 77, 56, 0.08);
    --shadow-lg: 0 12px 32px rgba(42, 77, 56, 0.12);
    --font-sans: 'Outfit', sans-serif;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.4;
    overflow-x: hidden;
    font-size: 13px; /* High density baseline font size */
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: #C1D0C7;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--primary-color);
    color: var(--bg-card);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    border-right: 2px solid var(--accent-color);
    transition: var(--transition);
}

.brand-section {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-color);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
}

.brand-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    color: var(--bg-card);
}

.brand-subtitle {
    font-size: 9px;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-top: 2px;
}

.nav-menu {
    list-style: none;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 12.5px;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--bg-card);
}

.nav-item.active {
    background-color: var(--accent-color);
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.sidebar-footer a {
    color: var(--accent-color);
    text-decoration: none;
}

/* Mobile Nav Bar Toggle */
.mobile-header-toggle {
    display: none;
    background-color: var(--primary-color);
    color: var(--bg-card);
    height: 50px;
    align-items: center;
    padding: 0 16px;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 110;
    box-shadow: var(--shadow-sm);
}

.menu-toggle-btn {
    background: transparent;
    border: none;
    color: var(--bg-card);
    font-size: 20px;
    cursor: pointer;
}

/* Main Content Area */
.main-content {
    margin-left: 250px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 250px);
    transition: var(--transition);
}

/* Top Navigation Header */
.top-header {
    background-color: var(--bg-card);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: var(--shadow-sm);
}

.search-bar-container {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 5px 14px;
    width: 480px;
    transition: var(--transition);
}

.search-bar-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(42, 77, 56, 0.1);
    background-color: var(--bg-card);
}

.search-icon {
    color: var(--text-muted);
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.search-icon svg {
    width: 18px;
    height: 18px;
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.uae-pass-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #FFF3F0;
    color: #E03E1A;
    font-weight: 700;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(224, 62, 26, 0.2);
}

.uae-pass-badge.authenticated {
    background-color: #E8F5E9;
    color: var(--success-color);
    border-color: rgba(46, 125, 50, 0.2);
}

.agent-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 14px;
}

.agent-info {
    display: flex;
    flex-direction: column;
}

.agent-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.agent-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* Page Container styling */
.page-view {
    padding: 16px;
    flex-grow: 1;
    display: none;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.page-view.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

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

/* Tab Header and Utilities */
.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 4px;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
    border-radius: 1px;
}

/* Customer 360 Workspace Grid Layout */
.workspace-grid {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 16px;
    width: 100%;
}

.customer-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0; /* Prevents grid items from overflowing */
}

/* Card Styling */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(42, 77, 56, 0.15);
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.card-title svg {
    width: 16px;
    height: 16px;
    color: var(--accent-color);
}

/* Customer Profile Card Specifics */
.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4px 0 10px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.profile-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-id {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    font-family: monospace;
}

.profile-badge-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.badge {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 10px;
    text-transform: uppercase;
}

.badge-gold {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
    border: 1px solid var(--accent-color);
}

.badge-sentiment {
    background-color: #E8F5E9;
    color: var(--success-color);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

/* DHP Property Component */
.property-widget {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.land-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
}

.summary-stat-box {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.summary-stat-box:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.summary-num {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

.summary-lbl {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.land-map-mock {
    width: 100%;
    height: 100px;
    border: 1px dashed var(--accent-color);
    border-radius: 6px;
    background-color: #FAF6EE;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.map-svg {
    width: 100%;
    height: 100%;
}

/* Grid for Workspace Widgets */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Ticket/Email Lists */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 140px;
    overflow-y: auto;
    padding-right: 4px;
}

.list-item {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
}

.list-item:hover {
    background-color: var(--bg-card);
    border-color: var(--accent-color);
    transform: translateX(2px);
    box-shadow: 0 2px 6px rgba(42, 77, 56, 0.05);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.item-date {
    font-size: 10px;
    color: var(--text-muted);
}

.item-meta {
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-indicator {
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 8px;
}

.status-open {
    background-color: #FFF3E0;
    color: #EF6C00;
}

.status-closed {
    background-color: #E8F5E9;
    color: var(--success-color);
}

.priority-high {
    color: var(--error-color);
    font-weight: 600;
}

.priority-medium {
    color: #EF6C00;
    font-weight: 600;
}

.item-snippet {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Timeline component */
.timeline-container {
    margin-top: 8px;
}

.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-event {
    position: relative;
    padding-bottom: 12px;
}

.timeline-event:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -20px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 2px.5 solid var(--accent-color);
    z-index: 2;
    transition: var(--transition);
}

.timeline-event:hover .timeline-marker {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.timeline-content {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition);
}

.timeline-content:hover {
    background-color: var(--bg-card);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.timeline-time {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
}

.timeline-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Interactive simulation tools */
.widget-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-card);
}

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

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

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

.btn-accent {
    background-color: var(--accent-color);
    color: var(--primary-dark);
}

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

/* Search Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-secondary);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Modal / Drawer details CSS */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 38, 33, 0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background-color: var(--bg-card);
    width: 500px;
    max-width: 90%;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop.active .modal {
    transform: scale(1);
}

.modal-header {
    background-color: var(--primary-color);
    color: var(--bg-card);
    padding: 16px 24px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    cursor: pointer;
}

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

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 70vh;
    overflow-y: auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-control {
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
}

.modal-footer {
    padding: 16px 24px;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Detail Drawer (Slides from right) */
.detail-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 38, 33, 0.3);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.detail-drawer-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.detail-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    max-width: 100%;
    height: 100%;
    background-color: var(--bg-card);
    box-shadow: -8px 0 32px rgba(0,0,0,0.15);
    border-left: 2px solid var(--accent-color);
    z-index: 160;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.detail-drawer-backdrop.active .detail-drawer {
    right: 0;
}

.drawer-header {
    background-color: var(--primary-color);
    color: var(--bg-card);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title {
    font-size: 16px;
    font-weight: 700;
}

.drawer-close-btn {
    background: transparent;
    border: none;
    color: var(--bg-card);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.drawer-body {
    padding: 24px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-section {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.detail-block {
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 14px;
    border: 1px solid var(--border-color);
}

.detail-grid-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px dashed var(--border-color);
}

.detail-grid-row:last-child {
    border-bottom: none;
}

/* Dynamic Live Status Feed */
.live-status-ticker {
    background-color: #E8F5E9;
    color: var(--success-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(46, 125, 50, 0.2);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.2); }
    70% { box-shadow: 0 0 0 6px rgba(46, 125, 50, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}

.live-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success-color);
    display: inline-block;
}

/* Detailed Architecture Section */
.architecture-tabs-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.arch-toggle-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.arch-tab-btn {
    padding: 10px 20px;
    border-radius: 6px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.arch-tab-btn.active {
    background-color: var(--primary-color);
    color: var(--bg-card);
    border-color: var(--primary-color);
}

.arch-tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.arch-tab-content.active {
    display: block;
}

.arch-detailed-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 16px;
}

.arch-component-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.arch-component-card {
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 14px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.arch-component-card:hover {
    border-color: var(--accent-color);
    background-color: var(--bg-card);
    transform: translateX(3px);
}

.arch-component-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.arch-component-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.arch-diagram-pane {
    background-color: #F8F9F8;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Interactive SVG Nodes */
.interactive-svg-container {
    width: 100%;
    height: 350px;
    background-color: var(--bg-card);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    position: relative;
}

/* Tooltip overlay in visualizer node click */
.node-tooltip {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--bg-card);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
    font-size: 12px;
    z-index: 20;
    border-top: 3px solid var(--accent-color);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: var(--transition);
}

.node-tooltip.active {
    opacity: 1;
    transform: translateY(0);
}

.node-tooltip-title {
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 4px;
    font-size: 13px;
}

/* Media Queries for full responsiveness */
@media (max-width: 1200px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
    
    .customer-sidebar {
        flex-direction: row;
        width: 100%;
    }
    
    .customer-sidebar > .card {
        flex: 1;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        left: -280px; /* Hide sidebar */
    }
    
    .sidebar.mobile-active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 60px; /* Offset for mobile header */
    }
    
    .mobile-header-toggle {
        display: flex;
    }
    
    .top-header {
        display: none; /* Hide standard header, use mobile toggle */
    }
    
    .page-view {
        padding: 20px;
    }
    
    .arch-detailed-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .customer-sidebar {
        flex-direction: column;
    }
    
    .widgets-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-bar-container {
        width: 100%;
    }
    
    .compare-matrix-section {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   PROPOSAL VIEW STYLING (Pitch Deck & Business Architecture)
   ========================================================================== */

.proposal-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.deck-viewer-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.deck-viewer-header {
    background-color: var(--primary-color);
    color: var(--bg-card);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slide-counter {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-color);
}

.deck-stage {
    min-height: 400px;
    background-color: var(--bg-light);
    padding: 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-content {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 800px;
    min-height: 380px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 32px;
    display: none;
    flex-direction: column;
    position: relative;
    border-top: 4px solid var(--accent-color);
}

.slide-content.active {
    display: flex;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.slide-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.slide-body {
    flex-grow: 1;
    font-size: 14px;
}

.slide-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.deck-controls {
    background-color: var(--bg-secondary);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deck-nav-btn {
    padding: 8px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.deck-nav-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: var(--bg-card);
    border-color: var(--primary-color);
}

.deck-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.download-link-btn {
    text-decoration: none;
}

/* Compare Matrix grid styling */
.compare-matrix-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.compare-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.compare-card.recommended {
    border: 2px solid var(--primary-color);
    position: relative;
}

.recommended-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background-color: var(--accent-color);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.pro-con-list {
    list-style: none;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pro-con-item {
    display: flex;
    gap: 12px;
    font-size: 13px;
}

.icon-pro {
    color: var(--success-color);
    font-weight: 700;
}

.icon-con {
    color: var(--error-color);
    font-weight: 700;
}

.pro-con-text {
    font-weight: 500;
}

.pro-con-subtext {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Side by side comparison tables */
.comparison-table-wrapper {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-top: 24px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.comparison-table th, .comparison-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background-color: var(--primary-color);
    color: var(--bg-card);
    font-weight: 600;
}

.comparison-table th:first-child {
    border-top-left-radius: 12px;
}
.comparison-table th:last-child {
    border-top-right-radius: 12px;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:nth-child(even) {
    background-color: var(--bg-light);
}

.comparison-table td:nth-child(2) {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.comparison-table .feature-col {
    font-weight: 600;
    color: var(--primary-color);
}

/* Interactive Architecture Visualizer */
.architecture-visualizer {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.visualizer-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.visualizer-stage {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 40px 20px;
    background-color: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
}

.visual-node {
    width: 130px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    z-index: 10;
    transition: var(--transition);
}

.visual-node.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
    transform: scale(1.05);
}

.visual-node.primary {
    background-color: var(--primary-color);
    color: var(--bg-card);
    border-color: var(--primary-color);
}

.node-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.node-desc {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 4px;
}

.visual-node.primary .node-desc {
    color: var(--bg-secondary);
}

.visual-connector {
    flex-grow: 1;
    height: 4px;
    background-color: var(--border-color);
    position: relative;
    z-index: 1;
}

.connector-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 20px;
    opacity: 0;
}

.connector-pulse.animating {
    animation: pulseFlow 1s linear infinite;
    opacity: 1;
}

@keyframes pulseFlow {
    0% { left: 0%; }
    100% { left: 100%; }
}

.visualizer-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

/* Interactive Timeline elements in deck slides */
.slide-bullet-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.slide-bullet-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.bullet-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-color);
    margin-top: 8px;
    flex-shrink: 0;
}

.bullet-text-bold {
    font-weight: 600;
    color: var(--primary-color);
}

/* Commercial comparison estimator tool */
.estimator-tool {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.estimator-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.estimator-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
}

.estimator-select {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-family: var(--font-sans);
    font-size: 13px;
    outline: none;
    background-color: var(--bg-card);
}

.estimator-results {
    text-align: right;
}

.savings-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--success-color);
}

.savings-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

/* Desktop Cockpit Sizing (Auto-fit viewport without scrollbars) */
@media (min-width: 1024px) {
    body {
        height: 100vh;
        overflow: hidden;
    }
    .app-container {
        height: 100vh;
        overflow: hidden;
    }
    .sidebar {
        height: 100vh;
    }
    .main-content {
        height: 100vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    .top-header {
        flex-shrink: 0;
    }
    .page-view {
        height: calc(100vh - 60px);
        padding: 10px 16px;
        display: none;
        flex-direction: column;
    }
    #page-workspace {
        overflow: hidden;
    }
    #page-proposal {
        overflow-y: auto;
    }
    .page-view.active {
        display: flex;
    }
    .section-title-bar {
        flex-shrink: 0;
        margin-bottom: 6px;
    }
    .live-status-ticker {
        flex-shrink: 0;
        margin-bottom: 8px;
    }
    .workspace-grid {
        flex-grow: 1;
        min-height: 0;
        height: auto;
        grid-template-columns: 310px 1fr;
        gap: 12px;
    }
    .customer-sidebar {
        height: 100%;
        min-height: 0;
        gap: 12px;
    }
    .customer-sidebar > .card:first-child {
        flex-shrink: 0;
    }
    .customer-sidebar > .card:last-child {
        flex: 1 1 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    .property-widget {
        flex: 1 1 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .land-map-mock {
        flex: 1 1 0;
        min-height: 70px;
    }
    .dashboard-main {
        height: 100%;
        min-height: 0;
        gap: 12px;
    }
    .widgets-grid {
        flex: 3 3 0;
        min-height: 0;
        gap: 10px;
        grid-template-rows: 1fr 1fr;
        grid-template-columns: 1fr 1fr;
    }
    .widgets-grid > .card {
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding: 10px 12px;
    }
    .item-list {
        flex: 1 1 0;
        min-height: 0;
        max-height: none; /* override height limit to let flex sizing take over */
    }
    .dashboard-main > .card {
        flex: 2 2 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
        padding: 10px 12px;
    }
    .timeline-container {
        flex: 1 1 0;
        min-height: 0;
        overflow-y: auto;
    }
}

/* Responsive fixes */
@media (max-width: 1200px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
    .customer-sidebar {
        flex-direction: row;
    }
    .customer-sidebar > .card {
        flex: 1;
    }
}
