/* SalesTrack Pro Main stylesheet - Modern Premium Design System */

:root {
    --bg-primary: #0f172a; /* Slate 900 */
    --bg-secondary: #1e293b; /* Slate 800 */
    --bg-tertiary: #334155; /* Slate 700 */
    --border-color: #334155;
    
    --text-primary: #f8fafc; /* Slate 50 */
    --text-secondary: #94a3b8; /* Slate 400 */
    --text-muted: #64748b; /* Slate 500 */
    
    --primary: #6366f1; /* Indigo 500 */
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);
    
    --success: #10b981; /* Emerald 500 */
    --success-light: rgba(16, 185, 129, 0.1);
    
    --warning: #f59e0b; /* Amber 500 */
    --warning-light: rgba(245, 158, 11, 0.1);
    
    --danger: #ef4444; /* Rose 500 */
    --danger-light: rgba(239, 68, 68, 0.1);
    
    --sky: #0ea5e9; /* Sky 500 */
    --sky-light: rgba(14, 165, 233, 0.1);
    
    --sidebar-width: 280px;
    --header-height: 70px;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.logo-icon {
    color: #fff;
    width: 22px;
    height: 22px;
}

.brand-name h1 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand-name span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.active-user-card {
    margin: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    border: 1.5px solid var(--primary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.user-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

.user-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

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

.nav-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.app-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 700;
}

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

.role-switcher-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-md);
}

.role-switcher-container label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.content-canvas {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
}

/* Tab Panes */
.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

/* Sub-tabs */
.sub-tab-pane {
    display: none;
    animation: fadeIn 0.2s ease;
}

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

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

/* Cards & UI Blocks */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

/* Dashboard Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.metric-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

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

.metric-icon.primary { background: var(--primary-light); color: var(--primary); }
.metric-icon.success { background: var(--success-light); color: var(--success); }
.metric-icon.warning { background: var(--warning-light); color: var(--warning); }
.metric-icon.danger { background: var(--danger-light); color: var(--danger); }
.metric-icon.sky { background: var(--sky-light); color: var(--sky); }

.metric-details span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-details h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 4px;
}

/* Charts grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 24px;
}

.attendance-punch-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.chart-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    height: 380px;
    display: flex;
    flex-direction: column;
}

.chart-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.chart-card canvas {
    flex: 1;
    max-height: 290px;
}

/* Form Controls & Buttons */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.select-compact {
    padding: 6px 12px;
    font-size: 0.85rem;
    background-color: transparent;
    cursor: pointer;
}

.textarea {
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

.btn-compact {
    padding: 6px;
    border-radius: var(--radius-sm);
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.1); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-outline { background: transparent; border: 1.5px solid var(--border-color); color: var(--text-primary); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.05); }

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

/* Badges & Tags */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: capitalize;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-sky { background: var(--sky-light); color: var(--sky); }

/* Table Elements */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: rgba(255, 255, 255, 0.015);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.data-table td {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

.modal-lg {
    max-width: 800px;
}

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

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

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

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

#visitForm, #addStaffForm {
    padding: 24px;
}

#leaveForm, #expenseForm {
    padding: 20px;
}

.modal-body {
    padding: 24px;
}

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

/* Grids helper */
.grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

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

.grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.items-divider {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 4px;
    margin-top: 10px;
}

/* Attendance punching view styles */
.clock-display {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    color: #fff;
    margin: 12px 0;
    font-feature-settings: "tnum";
}

.date-display {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.attendance-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.attendance-status-banner {
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.attendance-status-banner.warning { background: var(--warning-light); color: var(--warning); }
.attendance-status-banner.success { background: var(--success-light); color: var(--success); }

.mock-device-viewport {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.selfie-emulator {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.selfie-placeholder {
    width: 100%;
    height: 180px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    gap: 8px;
    background-size: cover;
    background-position: center;
}

.cam-icon {
    width: 32px;
    height: 32px;
}

.gps-emulator-details {
    width: 100%;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-md);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.detail-row .label { color: var(--text-secondary); }

/* Leaflet maps containers */
.leaflet-map-container {
    height: 360px;
    border-radius: var(--radius-lg);
    z-index: 10;
    background: var(--bg-primary);
}

.map-card {
    padding: 0;
    overflow: hidden;
}

.map-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.map-header h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-header p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Kanban System */
.kanban-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    align-items: flex-start;
}

.kanban-col {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 12px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

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

.kanban-col-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kanban-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
    max-height: 540px;
}

.kanban-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: var(--transition);
}

.kanban-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.kanban-card h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.kanban-card p {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.kanban-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
}

.kanban-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* Kanban column color backgrounds */
.bg-danger-light { background: rgba(239, 68, 68, 0.02); }
.bg-warning-light { background: rgba(245, 158, 11, 0.02); }
.bg-sky-light { background: rgba(14, 165, 233, 0.02); }
.bg-indigo-light { background: rgba(99, 102, 241, 0.02); }
.bg-success-light { background: rgba(16, 185, 129, 0.02); }

.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-sky { color: var(--sky); }
.text-indigo { color: var(--primary); }
.text-success { color: var(--success); }

/* Horizontal Tabs (HR and sub-navigation) */
.horizontal-tabs {
    padding: 8px 16px;
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--bg-secondary);
}

.tab-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.tab-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.tab-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* Detail modal view styles */
.visit-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 4px;
    margin-bottom: 10px;
}

.detail-table {
    width: 100%;
}

.detail-table td {
    padding: 8px 4px;
    font-size: 0.88rem;
}

.detail-table td.label {
    color: var(--text-secondary);
    font-weight: 500;
    width: 150px;
}

.detail-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.detail-photo-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    text-align: center;
    cursor: pointer;
}

.detail-photo-card img {
    max-width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

.detail-photo-card span {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: block;
}

/* Admin Checklist */
.permissions-checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-row label {
    font-size: 0.88rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Diagnostic lines */
.metric-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.88rem;
    border-bottom: 1.5px solid var(--border-color);
}

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

.metric-row .label { color: var(--text-secondary); }

/* Quick helpers */
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }
.flex-col { display: flex; flex-direction: column; }
.gap-3 { gap: 12px; }
.max-h-400 { max-height: 400px; overflow-y: auto; }
.text-sm { font-size: 0.8rem; }
.text-muted { color: var(--text-muted); }
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hidden-input { display: none; }

/* Responsive adjustments */
@media(max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    .kanban-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
    }
    .menu-toggle {
        display: block;
    }
    .grid-2col, .grid-3col, .grid-4col, .attendance-punch-layout {
        grid-template-columns: 1fr !important;
    }
    .attendance-punch-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 12px !important;
    }
    .attendance-punch-buttons button {
        width: 100% !important;
        justify-content: center !important;
    }
    .kanban-container {
        grid-template-columns: 1fr;
    }
    .app-header {
        padding: 0 16px;
    }
    .leaflet-map-container {
        height: 260px !important;
    }
    .kanban-column {
        margin-bottom: 20px;
    }
    .horizontal-tabs {
        flex-wrap: wrap !important;
    }
    
    /* Table Responsive fixes */
    .table-container {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .data-table th, .data-table td {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }
    .card {
        padding: 16px !important;
    }
    .main-content {
        padding: 16px !important;
    }
    .section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
    }
    .filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 8px !important;
    }
    .filter-bar input, .filter-bar button, .filter-bar select {
        width: 100% !important;
    }
}

@media(max-width: 480px) {
    .page-title {
        font-size: 16px;
    }
    .session-user-badge {
        display: none !important;
    }
    .btn-logout span {
        display: none !important;
    }
    .btn-logout {
        padding: 8px 10px;
    }
    .modal-content {
        width: 95% !important;
        padding: 16px !important;
    }
    
    /* Extra narrow table font adjustments */
    .data-table th, .data-table td {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
}

/* Login Screen Styles */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at top right, #1e1b4b, var(--bg-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 36px 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.4s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo {
    margin: 0 auto 16px auto;
    width: 52px;
    height: 52px;
}

.login-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
}

.login-header p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.quick-login-section {
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
}

.quick-login-title {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-login-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-chip {
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.session-user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-md);
}
.fw-600 { font-weight: 600; }

.quote-item-row {
    display: grid;
    grid-template-columns: 2.5fr 1.2fr 1.5fr auto;
    gap: 8px;
    align-items: center;
}

