/* Premium Design Stylesheet for Tender Tracker */

:root {
    /* Prowise & HCS Consultancy Colors */
    --prowise-black: #1B1C1C;
    --prowise-turquoise: #47A9AC;
    --prowise-turquoise-glow: rgba(71, 169, 172, 0.15);
    
    --bg-dark: #f4f6f9; /* 优雅明亮浅灰蓝底，清爽高端 */
    --bg-card: #ffffff; /* 纯白高亮卡片 */
    --bg-sidebar: #f8fafc; /* 高雅浅灰蓝色侧边栏 */
    --border-color: #e2e8f0; /* 优雅的 Light Slate 边框 */
    --text-primary: #0f172a; /* 极深灰 Slate 标题（100% 高对比高清晰） */
    --text-secondary: #475569; /* 深灰副标题 */
    --text-muted: #64748b; /* 辅助静音灰 */
    
    --primary: var(--prowise-turquoise);
    --primary-glow: var(--prowise-turquoise-glow);
    --secondary: #0d9488; /* 深翡翠绿松石 */
    
    /* Status Colors adjusted for perfect contrast in light theme */
    --color-new: #0284c7; /* 深天空蓝 */
    --color-interested: #b45309; /* 深琥珀金 */
    --color-applied: #0d9488; /* 深翡翠绿 */
    --color-ignored: #4b5563; /* 铅灰 */
    
    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 80% 20%, rgba(71, 169, 172, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 15% 85%, rgba(13, 148, 136, 0.03) 0%, transparent 40%);
    background-attachment: fixed;
    height: 100vh;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.08);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.15);
}

/* Main Layout Grid */
.app-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    height: 100vh;
    position: relative;
}

/* Sidebar Styling */
.sidebar {
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 30px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
}

.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.logo-text .highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtitle {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    padding: 14px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
}

.nav-btn i {
    font-size: 18px;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.03);
}

.nav-btn.active {
    color: var(--text-primary);
    background: linear-gradient(90deg, rgba(71, 169, 172, 0.08) 0%, rgba(13, 148, 136, 0.03) 100%);
    border-left: 3px solid var(--primary);
    box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.01);
}

.sync-section {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.glow-btn {
    box-shadow: 0 4px 20px var(--primary-glow);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(71, 169, 172, 0.45);
}

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

.sync-status-text {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    min-height: 18px;
}

/* Main Content Area */
.main-content {
    padding: 40px;
    overflow-y: auto;
    height: 100vh;
}

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

.header-title h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.search-bar-container {
    position: relative;
    width: 320px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
}

#search-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px 12px 44px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.015);
    transition: var(--transition-smooth);
}

#search-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(71, 169, 172, 0.15), 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Tab panes */
.tab-pane {
    display: none;
}

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

/* Filter Tabs & Badges */
.filter-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    overflow-x: auto;
}

.filter-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.filter-tab:hover {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.03);
}

.filter-tab.active {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.05);
}

.badge {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-primary);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
}

.badge-new { background: rgba(56, 189, 248, 0.12); color: #0284c7; }
.badge-interested { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.badge-applied { background: rgba(20, 184, 166, 0.12); color: #0d9488; }
.badge-ignored { background: rgba(107, 114, 128, 0.12); color: #4b5563; }

/* Tenders Cards Grid */
.tenders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

/* Glassmorphism Card Design */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    cursor: pointer;
    min-height: 250px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.035), 0 1px 3px rgba(15, 23, 42, 0.015);
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(71, 169, 172, 0.4);
    box-shadow: 0 16px 36px rgba(71, 169, 172, 0.12), 0 4px 8px rgba(0, 0, 0, 0.02);
}

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

.card-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.country-badge {
    display: inline-block;
    white-space: nowrap;
    margin-right: 6px;
    font-weight: 600;
    color: #3b82f6;
    font-style: normal;
}

.status-indicator {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-new { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.status-interested { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-applied { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-ignored { background: rgba(107, 114, 128, 0.15); color: #9ca3af; border: 1px solid rgba(107, 114, 128, 0.3); }

.card-body {
    margin-bottom: 18px;
    flex-grow: 1;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-metadata {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.amount-highlight {
    color: #fbbf24 !important;
    font-weight: 600;
}

.amount-highlight i {
    color: #f59e0b;
    margin-right: 2px;
}

.amount-highlight-drawer i {
    color: #fbbf24;
    margin-right: 4px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-val {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.classification-tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Skeleton Loading Screens */
.skeleton-card {
    height: 250px;
    background: rgba(15, 23, 42, 0.015);
    border: 1px solid rgba(15, 23, 42, 0.025);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.skeleton-shimmer {
    background: linear-gradient(90deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.03) 50%, rgba(15,23,42,0) 100%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-line {
    height: 16px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.03);
    margin-bottom: 12px;
}

.skeleton-title { width: 80%; height: 20px; }
.skeleton-text { width: 100%; height: 60px; }
.skeleton-tag { width: 30%; height: 18px; }

/* Empty state design */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    max-width: 420px;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* Settings Tab Styling */
.settings-card {
    max-width: 680px;
    margin: 0 auto;
}

.settings-card h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
}

.setting-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-group label {
    font-size: 14px;
    color: var(--text-primary);
}

.label-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

textarea#keywords-input, textarea#clients-input {
    width: 100%;
    min-height: 100px;
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    resize: vertical;
    transition: var(--transition-smooth);
}

textarea#keywords-input:focus, textarea#clients-input:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.04);
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

#api-key-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 48px 14px 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

#api-key-input:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.04);
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    transition: var(--transition-smooth);
}

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

.password-input-container .icon-btn {
    position: absolute;
    right: 14px;
}

.key-status-text {
    font-size: 12.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.key-status-text i {
    color: var(--color-new);
}

.key-configured {
    color: #34d399;
}
.key-configured i {
    color: #34d399;
}

/* Detail Drawer & Overlays (Glassmorphism Slide Panel) */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer {
    position: fixed;
    top: 0;
    right: -560px;
    width: 560px;
    height: 100%;
    background: #ffffff;
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 40px rgba(15, 23, 42, 0.06);
    z-index: 101;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer.active {
    transform: translateX(-560px);
}

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

.close-drawer-btn {
    font-size: 20px;
}

.status-select {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

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

.drawer-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
}

.drawer-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.drawer-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.drawer-text {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-line;
}

.link-btn {
    background: rgba(71, 169, 172, 0.1);
    color: var(--primary);
    border: 1px solid rgba(71, 169, 172, 0.3);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--transition-smooth);
    width: fit-content;
}

.link-btn:hover {
    background: rgba(71, 169, 172, 0.2);
    border-color: var(--primary);
}

.drawer-footer {
    padding: 24px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(15, 23, 42, 0.02);
}

.note-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#tender-notes {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    font-family: var(--font-body);
    font-size: 13.5px;
    color: var(--text-primary);
    outline: none;
    min-height: 80px;
    resize: none;
    transition: var(--transition-smooth);
}

#tender-notes:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.04);
}

/* Awarded / Winner Styles */
.card-awarded {
    border-color: rgba(16, 185, 129, 0.35) !important;
    background: linear-gradient(135deg, #ffffff 0%, rgba(16, 185, 129, 0.05) 100%) !important;
}

.card-awarded:hover {
    border-color: rgba(16, 185, 129, 0.6) !important;
    box-shadow: 0 16px 36px rgba(16, 185, 129, 0.15) !important;
}

.card-winner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    border: none;
}

.status-awarded {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.badge-awarded {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #059669 !important;
}

/* Week header */
.week-group-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.015);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    margin-top: 18px;
    margin-bottom: 6px;
}

.week-group-header i {
    color: var(--primary);
}

/* Winner Info Panel in Drawer */
.winner-info-panel {
    background: #fffbef; /* 温暖雅致的象牙金 background */
    border: 1px solid #fde68a; /* 柔和的香槟金 border */
    border-radius: 10px;
    padding: 10px 16px; /* 极简紧凑内边距 */
    margin-bottom: 14px; /* 减少外边距占用空间 */
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.04);
    flex-shrink: 0; /* 绝对不允许浏览器为了凑空间而压缩它的高度 */
}

.winner-info-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.winner-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #b45309; /* 深色琥珀金，极高对比度，超清晰 */
    margin-bottom: 12px;
    font-family: var(--font-heading);
}

.winner-name-badge {
    display: inline-block;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff; /* 纯白高对比度文字 */
    background: #d97706; /* 尊贵温润的深琥珀金背景色，100% 清晰度 */
    border: 1px solid #b45309;
    padding: 6px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.15);
}

/* Animations and Responsive adaptations */
@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none; /* In a real app we'd build a drawer for this, keeping it simple */
    }
}

/* Home Page Header Status Dropdown */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-dropdown-container {
    position: relative;
    width: 200px;
}

.filter-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}

.home-status-select {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 48px 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.015);
    transition: var(--transition-smooth);
    appearance: none; /* Hide default browser arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
}

.clear-select-icon {
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    z-index: 2;
    display: none;
}

.clear-select-icon:hover {
    color: var(--primary);
}

.home-status-select:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(71, 169, 172, 0.15), 0 4px 12px rgba(0, 0, 0, 0.03);
}

.status-dropdown-container::after {
    content: '\f078'; /* FontAwesome chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 11px;
    pointer-events: none;
    z-index: 1;
}

.home-status-select option {
    background: #ffffff;
    color: var(--text-primary);
}

/* Drawer actions buttons */
.drawer-actions-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    width: 100%;
}

.download-btn-drawer {
    flex: 1.3;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
    text-align: center;
}

.download-btn-drawer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    filter: brightness(1.08);
}

.glow-btn-drawer {
    position: relative;
    overflow: hidden;
}

.glow-btn-drawer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    animation: button-shimmer 4s infinite;
}

.link-btn-drawer {
    flex: 0.7;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: var(--transition-smooth);
    text-align: center;
}

.link-btn-drawer:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-secondary);
}

@keyframes button-shimmer {
    0% {
        left: -60%;
    }
    15% {
        left: 120%;
    }
    100% {
        left: 120%;
    }
}

/* Modal Dialog Style */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

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

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%);
    width: 90%;
    max-width: 500px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
    margin: 0;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-instruction {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.modal-body .input-group {
    width: 100%;
}

.modal-body input[type="text"] {
    width: 100%;
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13.5px;
    outline: none;
    transition: var(--transition-smooth);
}

.modal-body input[type="text"]:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.04);
    box-shadow: 0 0 10px rgba(71, 169, 172, 0.15);
}

.modal-status-text {
    font-size: 13px;
    min-height: 20px;
    transition: var(--transition-smooth);
}

.modal-status-text.error {
    color: #ef4444;
}

.modal-status-text.success {
    color: #10b981;
}

.modal-status-text.info {
    color: var(--primary);
}

.modal-footer {
    padding: 18px 24px;
    background: rgba(10, 11, 18, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.drawer-tender-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--primary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.drawer-tender-link:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tender-document-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
    transition: var(--transition-smooth);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* Card-level status select dropdown */
.card-status-select {
    padding: 4px 20px 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    cursor: pointer;
    font-family: var(--font-body);
    outline: none;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-repeat: no-repeat !important;
    background-position: right 6px center !important;
    background-size: 8px 8px !important;
    transition: all 0.3s ease;
    box-sizing: border-box;
    display: inline-block;
}

.card-status-select.status-new {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath fill='%2360a5fa' d='M2 3l3 3 3-3z'/%3E%3C/svg%3E") !important;
}

.card-status-select.status-interested {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath fill='%23fbbf24' d='M2 3l3 3 3-3z'/%3E%3C/svg%3E") !important;
}

.card-status-select.status-applied {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath fill='%2334d399' d='M2 3l3 3 3-3z'/%3E%3C/svg%3E") !important;
}

.card-status-select.status-ignored {
    background-color: rgba(107, 114, 128, 0.15) !important;
    color: #9ca3af !important;
    border: 1px solid rgba(107, 114, 128, 0.3) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath fill='%239ca3af' d='M2 3l3 3 3-3z'/%3E%3C/svg%3E") !important;
}

.card-status-select.status-awarded {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath fill='%23fbbf24' d='M2 3l3 3 3-3z'/%3E%3C/svg%3E") !important;
}

.card-status-select:hover {
    filter: brightness(0.95);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.card-status-select option {
    background: #ffffff;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 10px;
}

/* ====================================================
   Commercial Butler & Finance Dashboard Styles
   ==================================================== */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: var(--transition-smooth);
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(71, 169, 172, 0.08);
    border-color: var(--primary);
}

.kpi-icon {
    font-size: 32px;
    color: var(--primary);
    background: rgba(71, 169, 172, 0.08);
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-card.collected .kpi-icon {
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.kpi-card.pending .kpi-icon {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.kpi-details h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin: 0 0 4px 0;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 4px;
}

.kpi-details p {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
}

/* TSV Importer Card */
.butler-import-box {
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.import-header {
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(71, 169, 172, 0.02);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.import-header:hover {
    background: rgba(71, 169, 172, 0.05);
}

.import-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-header h4 i {
    color: var(--primary);
}

#import-toggle-icon {
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.import-body {
    padding: 24px;
    border-top: none;
}

.import-body textarea {
    width: 100%;
    height: 110px;
    background: #fafafb;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    color: var(--text-primary);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: var(--transition-smooth);
    box-sizing: border-box;
}

.import-body textarea:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(71, 169, 172, 0.15);
}

/* Workspace Panels */
.butler-workspace {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.butler-crm, .butler-advisor {
    padding: 24px;
    min-height: 500px;
}

.crm-header, .advisor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.crm-header h3, .advisor-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.crm-header h3 i, .advisor-header h3 i {
    color: var(--primary);
}

/* Meeting Timeline Style */
.timeline {
    position: relative;
    padding-left: 24px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: -23px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 4px rgba(71, 169, 172, 0.15);
}

.timeline-content {
    background: #fafafb;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 18px;
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border-color: rgba(71, 169, 172, 0.3);
}

.timeline-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

.timeline-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.timeline-notes {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    white-space: pre-wrap;
}

.timeline-actions {
    margin-top: 8px;
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Advisor Recommendations Styles */
.advice-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.advice-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    background: #ffffff;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01);
}

.advice-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.03);
    border-color: var(--primary);
}

.advice-card.direct_match {
    border-left: 4px solid var(--primary);
    background: linear-gradient(to right, rgba(71, 169, 172, 0.02), #ffffff);
}

.advice-card.topic_match {
    border-left: 4px solid #10b981;
    background: linear-gradient(to right, rgba(16, 185, 129, 0.02), #ffffff);
}

.advice-card.general {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.02), #ffffff);
}

.advice-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 6px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.advice-card.direct_match .advice-badge {
    background: rgba(71, 169, 172, 0.1);
    color: var(--primary);
}

.advice-card.topic_match .advice-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.advice-card.general .advice-badge {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.advice-subject {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.advice-text {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

.advice-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.03);
    font-size: 11px;
    color: var(--text-muted);
}

/* Modals general enhancements */
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fafafb;
    color: var(--text-primary);
    outline: none;
    font-size: 13px;
    transition: var(--transition-smooth);
    box-sizing: border-box;
}

.form-group input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(71, 169, 172, 0.15);
}

.form-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fafafb;
    color: var(--text-primary);
    outline: none;
    font-size: 13px;
    font-family: var(--font-body);
    transition: var(--transition-smooth);
    resize: none;
}

.form-group textarea:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(71, 169, 172, 0.15);
}

/* ==========================================================================
   AUTH LAYOUT & PREMIUM LIGHT-THEME STYLES (Login & Register Pages)
   ========================================================================== */

.auth-body {
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
    background-image: 
        radial-gradient(circle at 80% 20%, rgba(71, 169, 172, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 15% 85%, rgba(13, 148, 136, 0.04) 0%, transparent 50%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 
        0 15px 35px -5px rgba(15, 23, 42, 0.06), 
        0 10px 20px -10px rgba(15, 23, 42, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    transition: var(--transition-smooth);
    animation: authCardFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 28px;
    gap: 12px;
}

.auth-logo img {
    height: 44px;
    width: auto;
}

.auth-logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 21px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
    display: inline-block;
}

.auth-logo-text .highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-logo-sub {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: -6px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 15px;
    transition: var(--transition-smooth);
}

.auth-input {
    width: 100%;
    padding: 12px 16px 12px 42px !important;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fafafb;
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-body);
    font-size: 13.5px;
    transition: var(--transition-smooth);
    box-sizing: border-box;
}

.input-wrapper:focus-within i {
    color: var(--primary);
}

.auth-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(71, 169, 172, 0.1);
}

.auth-flash-container {
    margin-bottom: 20px;
    animation: authCardFadeIn 0.3s ease;
}

.auth-flash-message {
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.auth-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* ==========================================================================
   MODULAR LANGUAGE SELECTOR COMPONENT (ZH / EN / NL)
   ========================================================================== */

.language-selector {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.lang-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
    background: #fafafb;
}

.lang-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    min-width: 140px;
    z-index: 100;
    transform: translateY(8px);
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.lang-dropdown.show {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.lang-option {
    background: transparent;
    border: none;
    outline: none;
    padding: 8px 12px;
    text-align: left;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    width: 100%;
}

.lang-option:hover {
    background: rgba(71, 169, 172, 0.05);
    color: var(--primary);
}

.lang-option.active {
    background: rgba(71, 169, 172, 0.08);
    color: var(--text-primary);
    font-weight: 600;
}

/* Floating selector position specifically for Auth pages */
.auth-lang-container {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
}

/* Header User Profile Dropdown */
.user-menu-container {
    position: relative;
    display: inline-block;
    margin-right: 8px;
    border-right: 1px solid var(--border-color);
    padding-right: 16px;
    white-space: nowrap;
}

.user-menu-btn {
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.user-menu-btn:hover {
    background-color: var(--bg-hover, rgba(0, 0, 0, 0.03));
    color: var(--primary);
}

.user-menu-btn.active {
    background-color: var(--bg-hover, rgba(0, 0, 0, 0.03));
    color: var(--primary);
}

.user-menu-btn .arrow-icon {
    font-size: 9px;
    color: var(--text-muted);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-menu-btn.active .arrow-icon {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 16px; /* Align with the padded container border */
    min-width: 110px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    padding: 4px 0;
    margin-top: 6px;
    z-index: 100;
    display: none;
    transform-origin: top right;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-dropdown-menu.show {
    display: block;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.user-dropdown-item:hover {
    background-color: #fff1f2;
    color: #dc3545;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


/* Premium Green Pulse Status Badge */
.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}


/* Multi-Country Filter Styles */
.country-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.country-filter-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-right: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.country-tab {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.country-tab:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: rgba(15, 23, 42, 0.02);
}

.country-tab.active {
    background: var(--prowise-turquoise-glow);
    border-color: var(--primary);
    color: var(--text-primary);
    font-weight: 700;
}

/* ==========================================================================
   Sales Market Intelligence Dashboard (ERP Style)
   ========================================================================== */

.dashboard-header-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-title-group h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.dashboard-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.dashboard-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.dashboard-time-filter {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.dash-time-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.dash-time-btn:hover {
    color: var(--text-primary);
}

.dash-time-btn.active {
    background: #ffffff;
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dashboard-country-capsules {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dash-country-capsule {
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dash-country-capsule:hover {
    border-color: var(--primary);
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.02);
}

.dash-country-capsule.active {
    background: var(--prowise-turquoise-glow);
    border-color: var(--primary);
    color: var(--text-primary);
    font-weight: 700;
}

/* KPI Metric Cards Grid */
.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
    border-color: rgba(37, 99, 235, 0.3);
}

.kpi-icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.kpi-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kpi-title {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.kpi-number {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.15;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.kpi-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

/* Dashboard Row Grid */
.dashboard-row-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.dash-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.dash-card-60 { grid-column: span 1; }
.dash-card-40 { grid-column: span 1; }
.dash-card-55 { grid-column: span 1; }
.dash-card-45 { grid-column: span 1; }
.dash-card-100 {
    margin-bottom: 24px;
}

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.dash-card-title-group h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-card-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
}

.dash-rank-toggle {
    display: inline-flex;
    background: #f1f5f9;
    padding: 2px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.dash-toggle-btn {
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.dash-toggle-btn.active {
    background: #ffffff;
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Winner Table Styling */
.dash-table-wrapper {
    overflow-x: auto;
    flex: 1;
    min-height: 280px;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.dash-table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.dash-table td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    color: var(--text-primary);
    vertical-align: middle;
}

.dash-table tbody tr {
    transition: background 0.15s ease;
}

.dash-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
}

.rank-1 { background: #fef3c7; color: #b45309; }
.rank-2 { background: #f1f5f9; color: #475569; }
.rank-3 { background: #ffedd5; color: #c2410c; }
.rank-other { background: transparent; color: var(--text-muted); }

.winner-clickable-name {
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.winner-clickable-name:hover {
    color: var(--primary);
    text-decoration: underline;
}

.country-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #f1f5f9;
    color: var(--text-secondary);
}

.dash-card-footer-hint {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Chart Canvas Containers */
.chart-container {
    position: relative;
    width: 100%;
    height: 310px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doughnut-chart-container {
    height: 300px;
}

.timeline-chart-container {
    height: 340px;
}

/* Responsive Rules for Dashboard */
@media (max-width: 1024px) {
    .dashboard-row-grid {
        grid-template-columns: 1fr;
    }
}


