/* 
   dashboard/style.css  —  Modern premium styling with Glassmorphism & Neon Accents
*/

:root {
    --bg-dark: #090D16;
    --bg-panel: rgba(17, 24, 39, 0.7);
    --bg-card: rgba(30, 41, 59, 0.45);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(168, 85, 247, 0.5);
    
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;

    /* Accents */
    --accent-purple: #A855F7;
    --accent-purple-glow: rgba(168, 85, 247, 0.25);
    --accent-cyan: #06B6D4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.25);
    --accent-green: #10B981;
    --accent-green-glow: rgba(16, 185, 129, 0.15);
    --accent-orange: #F59E0B;
    --accent-orange-glow: rgba(245, 158, 11, 0.15);
    --accent-red: #EF4444;

    /* Portals color coding */
    --portal-linkedin: #0077B5;
    --portal-indeed: #2164E3;
    --portal-ba: #D51A1A;

    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --backdrop-blur: blur(12px) saturate(180%);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* Background glowing orbs */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.2;
    pointer-events: none;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    top: -200px;
    right: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

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

/* App Container Layout */
.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--glass-shadow);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px var(--accent-cyan-glow));
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #FFF 30%, #C084FC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* Custom Select Dropdown Styling */
.source-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.source-selector-wrapper label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

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

.select-container select {
    appearance: none;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 40px 10px 16px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    min-width: 240px;
}

.select-container select:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px var(--accent-purple-glow);
}

.select-arrow {
    position: absolute;
    right: 14px;
    color: var(--text-secondary);
    pointer-events: none;
}

/* KPI Summary Cards */
.kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.kpi-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.kpi-info h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFF;
}

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

.total-bg {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}
.max-bg {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
}
.avg-bg {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-orange);
}
.high-bg {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

/* Main Layout: Sidebar + Grid */
.main-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
    flex-grow: 1;
}

/* Sidebar Filters */
.sidebar-filters {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.filter-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 500;
}

.btn-text:hover {
    color: #FFF;
    text-shadow: 0 0 8px var(--accent-cyan-glow);
}

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

.filter-section label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Input Fields */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 12px 10px 38px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px var(--accent-purple-glow);
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
}

/* Slider Controls */
.score-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#score-slider-value {
    font-weight: 600;
    color: var(--accent-purple);
    font-size: 0.9rem;
    background: rgba(168, 85, 247, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    margin: 8px 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-purple);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
    transition: var(--transition-smooth);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.score-quick-presets {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.btn-preset {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 500;
}

.btn-preset:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFF;
}

.btn-preset.active {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

/* Custom checkbox elements */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    user-select: none;
    height: 20px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: rgba(255, 255, 255, 0.35);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: 0 0 8px var(--accent-purple-glow);
}

/* Custom colors for checkmarks depending on portal context */
.checkbox-container input:checked ~ .linkedin-chk {
    background-color: var(--portal-linkedin);
    border-color: var(--portal-linkedin);
}
.checkbox-container input:checked ~ .indeed-chk {
    background-color: var(--portal-indeed);
    border-color: var(--portal-indeed);
}
.checkbox-container input:checked ~ .ba-chk {
    background-color: var(--portal-ba);
    border-color: var(--portal-ba);
}

/* Mark checkmark sign inside checkbox */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Spreadsheet Grid View */
.spreadsheet-container {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 38px;
}

.table-results-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.selection-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.25s ease-out;
}

.selection-actions.hidden {
    display: none;
}

.selection-count {
    font-size: 0.9rem;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple) 0%, #7C3AED 100%);
    color: #FFF;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
    transition: var(--transition-smooth);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
    filter: brightness(1.1);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFF;
}

/* Spreadsheet Table Styling */
.table-scroll-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 320px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.jobs-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

/* Headers */
.jobs-table th {
    background: rgba(15, 23, 42, 0.9);
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.jobs-table th.sortable {
    cursor: pointer;
    transition: var(--transition-smooth);
}

.jobs-table th.sortable:hover {
    color: #FFF;
    background: rgba(15, 23, 42, 0.95);
}

.sort-icon {
    display: inline-block;
    width: 12px;
    margin-left: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Columns width properties */
.col-select { width: 45px; text-align: center; }
.col-score { width: 90px; text-align: center; }
.col-title { width: auto; }
.col-company { width: 220px; }
.col-location { width: 180px; }
.col-date { width: 120px; }
.col-actions { width: 80px; text-align: center; }

.checkbox-container.no-text {
    padding-left: 20px;
    display: inline-block;
}

/* Rows */
.jobs-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(30, 41, 59, 0.15);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.jobs-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.035);
}

.jobs-table tbody tr.selected {
    background: rgba(168, 85, 247, 0.06);
}

.jobs-table tbody tr.selected:hover {
    background: rgba(168, 85, 247, 0.09);
}

.jobs-table td {
    padding: 12px 16px;
    vertical-align: middle;
}

/* Score Badge */
.score-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    min-width: 48px;
}

.score-badge.high {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.score-badge.medium {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.score-badge.low {
    background: rgba(156, 163, 175, 0.1);
    color: #D1D5DB;
    border: 1px solid rgba(156, 163, 175, 0.15);
}

/* Job Title & Badges */
.job-title-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.job-title-text {
    font-weight: 600;
    color: #FFF;
    font-size: 0.95rem;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-tag.source-linkedin {
    background: rgba(0, 119, 181, 0.15);
    color: #71C9F8;
    border: 1px solid rgba(0, 119, 181, 0.25);
}
.badge-tag.source-indeed {
    background: rgba(33, 100, 227, 0.15);
    color: #7DA4FF;
    border: 1px solid rgba(33, 100, 227, 0.25);
}
.badge-tag.source-ba {
    background: rgba(213, 26, 26, 0.15);
    color: #FFA4A4;
    border: 1px solid rgba(213, 26, 26, 0.25);
}

/* Table Company & Location columns */
.company-text {
    font-weight: 500;
    color: var(--text-primary);
}

.location-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.date-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Action Links */
.btn-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
}

.btn-icon-link:hover {
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--accent-cyan);
}

/* Loading & Empty States */
.loading-state, .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3.5px solid rgba(255, 255, 255, 0.08);
    border-top: 3.5px solid var(--accent-purple);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

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

/* Slide Drawer Container */
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    visibility: hidden;
    transition: visibility 0.4s;
}

.drawer.open {
    visibility: visible;
}

.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.drawer.open .drawer-overlay {
    opacity: 1;
}

.drawer-content {
    position: absolute;
    top: 0;
    right: -600px;
    width: 600px;
    max-width: 100%;
    height: 100%;
    background: #0E1424;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer.open .drawer-content {
    right: 0;
}

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

.drawer-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.btn-close-drawer {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
}

.btn-close-drawer:hover {
    color: #FFF;
    transform: rotate(90deg);
}

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

/* Details inside drawer */
.detail-main-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-company-loc {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.divider-dot {
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
}

.detail-actions-row {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
}

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

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

.meta-val {
    font-size: 0.95rem;
    font-weight: 500;
}

.detail-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-section h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-cyan);
    font-weight: 700;
}

.detail-reason-box {
    background: rgba(245, 158, 11, 0.06);
    border-left: 3.5px solid var(--accent-orange);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.detail-desc-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
    background: rgba(0, 0, 0, 0.15);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-tag-pill {
    background: rgba(168, 85, 247, 0.1);
    color: #D8B4FE;
    border: 1px solid rgba(168, 85, 247, 0.15);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Floating AI Console */
.ai-console {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 440px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-purple-glow);
    z-index: 90;
    backdrop-filter: var(--backdrop-blur);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-console.closed {
    transform: translateY(calc(100% - 54px));
}

.ai-console-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.console-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}

.badge {
    background: var(--accent-purple);
    color: #FFF;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
}

.btn-toggle-console {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: transform 0.3s;
}

.ai-console.closed .btn-toggle-console {
    transform: rotate(180deg);
}

.ai-console-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 480px;
    overflow-y: auto;
}

.console-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.console-setting-row.flex-col {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.console-setting-row label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.select-container.compact select {
    padding: 6px 30px 6px 12px;
    font-size: 0.85rem;
    min-width: 180px;
    border-radius: 8px;
}

.console-setting-row textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 10px;
    font-family: inherit;
    font-size: 0.85rem;
    resize: none;
    transition: var(--transition-smooth);
}

.console-setting-row textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
}

/* Preview Content Box */
.preview-area-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.preview-content {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #A7F3D0;
    height: 150px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.glow-pulse {
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0% { filter: drop-shadow(0 0 1px var(--accent-purple-glow)); }
    50% { filter: drop-shadow(0 0 8px var(--accent-purple)); }
    100% { filter: drop-shadow(0 0 1px var(--accent-purple-glow)); }
}

.w-100 {
    width: 100%;
}

/* Toast Notification Styling */
.toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(16, 24, 48, 0.95);
    color: #FFF;
    border: 1px solid var(--accent-cyan);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 12px var(--accent-cyan-glow);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDownFadeIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
}

@keyframes slideDownFadeIn {
    0% { transform: translateY(-20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Media Queries */
@media(max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 768px) {
    .app-container {
        padding: 16px;
        gap: 16px;
    }
    
    .app-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
    }
    
    .source-selector-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .select-container select {
        width: 100%;
        min-width: unset;
    }
    
    .kpi-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .kpi-card {
        padding: 12px 16px;
    }
    
    .kpi-value {
        font-size: 1.4rem;
    }
    
    .kpi-info h3 {
        font-size: 0.75rem;
    }
    
    .kpi-icon-wrapper {
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }
    
    .kpi-icon-wrapper svg {
        width: 18px;
        height: 18px;
    }
}

@media(max-width: 576px) {
    .kpi-container {
        grid-template-columns: 1fr;
    }
    
    .ai-console {
        width: calc(100% - 24px);
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
    
    .ai-console.closed {
        transform: translateY(calc(100% - 50px));
    }
    
    .ai-console-header {
        padding: 12px 16px;
    }
    
    .ai-console-body {
        padding: 16px;
        max-height: 380px;
    }
    
    .table-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .selection-actions {
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }
    
    .selection-count {
        width: 100%;
        text-align: center;
    }
    
    .btn-primary, .btn-secondary {
        flex-grow: 1;
        text-align: center;
        justify-content: center;
    }
    
    .table-scroll-wrapper {
        max-height: calc(100vh - 280px);
    }
}

