/* ==========================================================================
   PROPERTIMASTER - CRAFTED DESIGN ENGINEERING STYLES
   Inspired by Emil Kowalski (Design Eng), Jakub Krehel (Better UI) & Paul Bakaus (Impeccable UI)
   ========================================================================== */

:root {
    /* Ultra-Dark SaaS Color Tokens (CareerOS Reference Palette) */
    --bg-dark: #050814;
    --bg-surface: #0b0f1e;
    --bg-card: #0f172a;
    --bg-card-hover: #1e293b;
    --border-color: rgba(99, 102, 241, 0.12);
    --border-color-light: rgba(99, 102, 241, 0.22);
    
    /* Vibrant Accent Tokens */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --accent-cyan: #38bdf8;
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.14);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.14);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.14);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.14);
    --purple: #8b5cf6;
    
    /* Typography Tokens */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Radius & Physics Timing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 20px rgba(99, 102, 241, 0.12);
}

/* Reset & Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Plus Jakarta Sans', 'Outfit', -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout Container */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 270px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 1001;
    transition: transform 0.3s var(--ease-out);
    pointer-events: auto !important;
    box-sizing: border-box;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 4px 20px 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 18px;
    position: relative;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 19px;
    box-shadow: 0 8px 20px var(--primary-glow);
    flex-shrink: 0;
}

.brand-text h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.4px;
}

.brand-text h2 span { color: var(--primary); }

.mobile-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 26px;
    cursor: pointer;
    margin-left: auto;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--success);
    background: var(--success-bg);
    padding: 3px 9px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.25) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-full);
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    position: relative;
    cursor: pointer !important;
    min-height: 42px;
    width: 100%;
    box-sizing: border-box;
}

.nav-item i {
    font-size: 15px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    color: #64748b;
    transition: transform 0.2s var(--ease-bounce), color 0.2s ease;
}

.nav-item span:not(.badge-hot):not(.badge-alert) {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item:hover i {
    color: var(--primary);
    transform: scale(1.12);
}

.nav-item:active {
    transform: scale(0.97);
}

.nav-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05));
    border-left: 3px solid var(--primary);
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.nav-item.active i {
    color: var(--primary);
}

.badge-alert {
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

.sidebar-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.9px;
    color: #475569;
    text-transform: uppercase;
    margin: 16px 4px 6px 4px;
}

.badge-hot {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    margin-left: auto;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
}

.user-card-saas {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-md);
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.user-avatar-bubble {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
    flex-shrink: 0;
}

.btn-switch-role {
    width: 100%;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-switch-role:hover {
    background: rgba(99, 102, 241, 0.22);
    color: #ffffff;
    border-color: var(--primary);
}

/* Hero Banner Card (CareerOS Style Header) */
.hero-banner-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(11, 15, 30, 0.98) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 20px;
    padding: 26px 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.8), 0 0 25px rgba(99, 102, 241, 0.12);
}

.hero-banner-card::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.banner-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.6px;
    margin-bottom: 6px;
    word-break: break-word;
}

.hero-desc {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 620px;
    line-height: 1.6;
    word-break: break-word;
}

.btn-glass-filter {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-glass-filter:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Alert Strip Bar */
.alert-strip-bar {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.8));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.alert-strip-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #cbd5e1;
}

.alert-strip-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.18);
    color: var(--warning);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.alert-strip-link {
    color: #818cf8;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
    background: transparent;
    border: none;
    cursor: pointer;
}

.alert-strip-link:hover {
    color: #a5b4fc;
    transform: translateX(3px);
}

/* 3-Column Modern Card Grid System */
.saas-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
    gap: 20px;
    width: 100%;
    max-width: 100%;
}

.saas-kavling-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(11, 15, 30, 0.95));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.saas-kavling-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(99, 102, 241, 0.15);
}

.card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.card-logo-box {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.card-match-badge {
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.card-match-badge.ready { background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.3); color: #34d399; }
.card-match-badge.booked { background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.3); color: #fbbf24; }
.card-match-badge.sold { background: rgba(239, 68, 68, 0.18); border-color: rgba(239, 68, 68, 0.3); color: #f87171; }

.saas-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 4px;
}

.saas-card-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 14px;
}

.card-spec-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.spec-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 11px;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
}

.card-bottom-row {
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-price-label { font-size: 11px; color: #64748b; }
.card-price-value { font-size: 15px; font-weight: 700; color: #f8fafc; }

.card-action-link {
    color: #818cf8;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.card-action-link:hover {
    color: #ffffff;
    transform: translateX(3px);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.user-card .avatar {
    width: 38px;
    height: 38px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.user-info { display: flex; flex-direction: column; }
.user-info .name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-info .role { font-size: 11px; color: var(--text-muted); }

/* Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 999;
    pointer-events: none;
}

.sidebar-backdrop.active {
    display: block;
    pointer-events: auto;
}

/* Main Content Area */
.main-content {
    margin-left: 270px;
    flex: 1;
    min-width: 0;
    width: calc(100% - 270px);
    max-width: calc(100% - 270px);
    padding: 28px 36px;
    background: var(--bg-dark);
    padding-bottom: 90px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Topbar Header */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 28px;
    gap: 20px;
    width: 100%;
    max-width: 100%;
}

.mobile-header-bar {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.hamburger-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.hamburger-btn:active { transform: scale(0.94); }

.mobile-brand-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
}

.mobile-brand-title span { color: var(--primary); }

.topbar-left h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.topbar-left p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Select Controls */
.role-switcher-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.28);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    color: var(--primary);
    box-shadow: 0 4px 14px var(--primary-glow);
    min-height: 42px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.role-switcher-wrapper i {
    font-size: 14px;
    color: #818cf8;
    flex-shrink: 0;
}

.select-property-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    box-shadow: none;
    min-height: 44px;
}

.custom-select, .custom-input {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: var(--transition-fast);
    width: 100%;
    min-height: 44px;
}

select option {
    background-color: #111827 !important;
    color: #f9fafb !important;
    padding: 10px;
}

.role-switcher-wrapper select option, 
.select-property-wrapper select option, 
.custom-select option {
    background-color: #111827 !important;
    color: #ffffff !important;
}

.role-switcher-wrapper select {
    border: none;
    background: transparent;
    padding: 0 20px 0 0;
    font-weight: 600;
    font-size: 13px;
    color: #ffffff;
    width: 100%;
    outline: none;
    cursor: pointer;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23818cf8' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 18px;
}

.select-property-wrapper select {
    border: none;
    background: transparent;
    padding: 0;
    font-weight: 600;
    color: #ffffff;
}

.role-switcher-wrapper select { color: #ffffff; }

.custom-select:focus, .custom-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    min-height: 44px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

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

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

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

/* View Sections */
.view-section {
    display: none;
    animation: fadeIn 0.3s var(--ease-out);
}

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

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

/* Metrics Cards Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: 20px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
}

.metric-card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8) 0%, rgba(17, 24, 39, 0.95) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: var(--transition-fast);
    backdrop-filter: blur(8px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.metric-card:hover {
    border-color: var(--border-color-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-premium);
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.card-primary .metric-icon { background: var(--primary-glow); color: var(--primary); }
.card-success .metric-icon { background: var(--success-bg); color: var(--success); }
.card-warning .metric-icon { background: var(--warning-bg); color: var(--warning); }
.card-info .metric-icon { background: var(--info-bg); color: var(--info); }
.card-purple .metric-icon { background: rgba(139, 92, 246, 0.15); color: var(--purple); }

.metric-value {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(20px, 3.5vw, 26px);
    font-weight: 700;
    color: var(--text-primary);
    margin: 14px 0 6px 0;
    letter-spacing: -0.5px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.metric-sub { font-size: 12px; color: var(--text-muted); word-break: break-word; }
.trend-up { color: var(--success); font-weight: 600; }

/* Alert Banner */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.warning-banner {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.alert-icon { font-size: 20px; }
.alert-text { flex: 1; font-size: 13px; }

/* Dashboard Grid Layout */
.dashboard-grid-layout {
    display: flex;
    gap: 24px;
    width: 100%;
    max-width: 100%;
}

.flex-2 { flex: 2; min-width: 0; max-width: 100%; }
.flex-1 { flex: 1; min-width: 0; max-width: 100%; }

.panel-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-premium);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

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

.panel-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.panel-title span { font-size: 12px; color: var(--text-muted); }

/* Kavling Mini Grid Preview */
.kavling-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}

.block-card-mini {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.block-card-mini:hover {
    transform: translateY(-2px) scale(1.03);
    border-color: var(--primary);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.block-card-mini.ready { border-left: 4px solid var(--success); }
.block-card-mini.booked { border-left: 4px solid var(--warning); }
.block-card-mini.sold { border-left: 4px solid var(--danger); opacity: 0.75; }

.block-code {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.block-type { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.block-price { font-size: 11px; font-weight: 600; margin-top: 8px; color: var(--text-secondary); }

/* DP Expiration Timer List */
.dp-timer-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dp-timer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    gap: 10px;
    transition: var(--transition-fast);
}

.dp-timer-item:hover { border-color: var(--border-color-light); }

.dp-timer-info .title { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.dp-timer-info .customer { font-size: 11px; color: var(--text-muted); }

.timer-pill {
    font-family: 'Outfit', monospace;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--warning-bg);
    color: var(--warning);
    white-space: nowrap;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.timer-pill.expired {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Full Kavling Grid Toolbar & Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.search-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    flex: 1;
    min-width: 240px;
    max-width: 360px;
    min-height: 42px;
    transition: var(--transition-fast);
}

.search-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-input-group i {
    color: #818cf8;
    font-size: 14px;
    flex-shrink: 0;
}

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

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

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-group select.custom-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--bg-dark);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23818cf8' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding: 8px 36px 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    min-height: 42px;
    min-width: 150px;
    width: auto;
    flex: 0 1 auto;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-group select.custom-select:hover {
    border-color: var(--border-color-light);
}

.filter-group select.custom-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.kavling-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 20px;
    width: 100%;
    max-width: 100%;
}

.kavling-full-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-fast);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.kavling-full-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-premium);
}

.kavling-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.kavling-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.tag-ready { background: var(--success-bg); color: var(--success); }
.tag-booked { background: var(--warning-bg); color: var(--warning); }
.tag-sold { background: var(--danger-bg); color: var(--danger); }

.kavling-full-card h4 { font-size: 18px; font-weight: 700; margin-bottom: 4px; word-break: break-word; }
.kavling-specs { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

.kavling-price-box {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.kavling-price-box span { font-size: 11px; color: var(--text-muted); }
.kavling-price-box strong { font-size: 15px; color: var(--success); word-break: break-word; }

/* Custom Table Styles */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    display: block;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

.custom-table th {
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    word-break: break-word;
}

.custom-table tbody tr { transition: var(--transition-fast); }
.custom-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

/* Bottom Navigation Bar (Mobile) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    z-index: 90;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    backdrop-filter: blur(10px);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    flex: 1;
    text-align: center;
    min-height: 44px;
    justify-content: center;
}

.bottom-nav-item i { font-size: 18px; }
.bottom-nav-item.active { color: var(--primary); font-weight: 700; }

/* Modals System */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
    padding: 16px;
}

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

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: min(94vw, 540px);
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    box-shadow: 0 24px 48px rgba(0,0,0,0.7);
    transform: scale(0.96);
    transition: transform 0.2s var(--ease-bounce);
}

.modal-overlay.active .modal-card { transform: scale(1); }
.modal-lg { max-width: min(94vw, 760px); }

.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 { font-size: 18px; font-weight: 700; word-break: break-word; }
.modal-close { background: transparent; border: none; color: var(--text-muted); font-size: 24px; cursor: pointer; }
.modal-close:hover { color: #fff; }

.modal-body { padding: 22px; max-width: 100%; box-sizing: border-box; }
.modal-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

/* Form Layouts */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

.form-group { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 100%; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }

.transaction-calculator-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 18px;
    border-radius: var(--radius-md);
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 8px;
}

.calc-summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    background: rgba(0, 0, 0, 0.25);
    padding: 14px;
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* SVG Site Plan Map GIS Engine */
.geo-map-container {
    height: 420px;
    width: 100%;
    background: #0d1322;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.map-plot-rect {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    stroke-width: 2px;
}

.map-plot-rect.ready { fill: #10b981; stroke: #34d399; fill-opacity: 0.8; }
.map-plot-rect.booked { fill: #f59e0b; stroke: #fbbf24; fill-opacity: 0.85; }
.map-plot-rect.sold { fill: #ef4444; stroke: #f87171; fill-opacity: 0.6; }

.map-plot-rect:hover {
    fill-opacity: 1;
    stroke-width: 4px;
    filter: drop-shadow(0 0 8px var(--primary));
}

.map-plot-label {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    fill: #ffffff;
    pointer-events: none;
    text-anchor: middle;
}

.svg-map-tooltip {
    position: absolute;
    background: #111827;
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.7);
    pointer-events: none;
    z-index: 10;
    display: none;
    transform: translate(-50%, -120%);
}

.view-mode-toggle { display: flex; gap: 8px; }

/* Utilities */
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-success { color: var(--success) !important; }
.text-muted { color: var(--text-muted) !important; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.py-3 { padding-top: 16px; padding-bottom: 16px; }
.text-center { text-align: center; }

/* Custom Scrollbars for Design Engineering Polish */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Toast Notifications System */
.toast-container {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-surface);
    border: 1px solid var(--border-color-light);
    padding: 14px 22px;
    border-radius: var(--radius-md);
    color: #fff;
    box-shadow: 0 14px 28px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s var(--ease-bounce);
    max-width: 90vw;
}

.toast-success {
    border-left: 4px solid var(--success);
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), var(--bg-surface));
}

.toast-danger {
    border-left: 4px solid var(--danger);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), var(--bg-surface));
}

.toast-warning {
    border-left: 4px solid var(--warning);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), var(--bg-surface));
}

.toast-info {
    border-left: 4px solid var(--primary);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), var(--bg-surface));
}

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

/* Mobile Breakpoints */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); width: 270px; box-shadow: 10px 0 30px rgba(0,0,0,0.6); }
    .sidebar.mobile-open { transform: translateX(0); }
    .mobile-close-btn { display: block; }
    .main-content { 
        margin-left: 0; 
        width: 100%; 
        max-width: 100vw; 
        padding: 16px 14px 85px 14px; 
    }
    .mobile-header-bar { display: flex; }
    .dashboard-grid-layout { flex-direction: column; }
    .bottom-nav { display: flex; }
    .hero-banner-card { padding: 18px 20px; }
    .hero-title { font-size: 22px; }
}

@media (max-width: 640px) {
    .topbar { flex-direction: column; align-items: stretch; gap: 14px; }
    .topbar-right { flex-direction: column; align-items: stretch; }
    .role-switcher-wrapper, .select-property-wrapper { width: 100%; justify-content: space-between; }
    .metrics-grid { grid-template-columns: 1fr; }
    .modal-card { width: 95%; max-width: 95vw; margin: 8px; }
    .modal-body { padding: 16px; }
    .modal-header { padding: 14px 16px; }
    .modal-footer { padding: 12px 16px; }
    .toast-container { right: 12px; left: 12px; bottom: 74px; }
    .toast { max-width: 100%; }
    .search-input-group { min-width: 100%; }
    .filter-group { width: 100%; }
    .filter-group select, .filter-group button { width: 100%; }
}
