/* VisualTran Manager Dashboard CSS */
/* DevExpress Office 2019 Theme */

/* ========================================
   Theme Variables - Office 2019 Style
   ======================================== */

/* Default Theme: Office 2019 White */
:root, [data-theme="office-white"] {
    --primary-color: #0078D4;
    --primary-dark: #106EBE;
    --primary-light: #2B88D8;
    --primary-gradient: linear-gradient(180deg, #0078D4 0%, #106EBE 100%);
    --secondary-color: #605E5C;
    --success-color: #107C10;
    --warning-color: #FFB900;
    --danger-color: #D13438;
    --info-color: #0078D4;
    --bg-color: #FFFFFF;
    --bg-secondary: #F3F2F1;
    --card-bg: #FFFFFF;
    --card-shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.13), 0 0.3px 0.9px rgba(0, 0, 0, 0.11);
    --card-hover-shadow: 0 6.4px 14.4px rgba(0, 0, 0, 0.13), 0 1.2px 3.6px rgba(0, 0, 0, 0.11);
    --text-color: #323130;
    --text-muted: #605E5C;
    --border-color: #EDEBE9;
    --sidebar-bg: #FAF9F8;
    --sidebar-text: #323130;
    --sidebar-width: 260px;
    --input-bg: #FFFFFF;
    --input-border: #8A8886;
    --header-bg: #0078D4;
    --ribbon-bg: #F3F2F1;
}

/* Office 2019 Colorful (Blue Accent) */
[data-theme="office-colorful"] {
    --primary-color: #0078D4;
    --primary-dark: #106EBE;
    --primary-light: #2B88D8;
    --primary-gradient: linear-gradient(180deg, #0078D4 0%, #106EBE 100%);
    --secondary-color: #605E5C;
    --success-color: #107C10;
    --warning-color: #FFB900;
    --danger-color: #D13438;
    --info-color: #0078D4;
    --bg-color: #F3F2F1;
    --bg-secondary: #EDEBE9;
    --card-bg: #FFFFFF;
    --card-shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.13), 0 0.3px 0.9px rgba(0, 0, 0, 0.11);
    --card-hover-shadow: 0 6.4px 14.4px rgba(0, 0, 0, 0.13), 0 1.2px 3.6px rgba(0, 0, 0, 0.11);
    --text-color: #323130;
    --text-muted: #605E5C;
    --border-color: #C8C6C4;
    --sidebar-bg: linear-gradient(180deg, #0078D4 0%, #106EBE 100%);
    --sidebar-text: #FFFFFF;
    --input-bg: #FFFFFF;
    --input-border: #8A8886;
    --header-bg: #0078D4;
    --ribbon-bg: #FFFFFF;
}

/* Office 2019 Dark Grey */
[data-theme="office-darkgrey"] {
    --primary-color: #0078D4;
    --primary-dark: #106EBE;
    --primary-light: #2B88D8;
    --primary-gradient: linear-gradient(180deg, #0078D4 0%, #106EBE 100%);
    --secondary-color: #A19F9D;
    --success-color: #6BB700;
    --warning-color: #FFB900;
    --danger-color: #F1707A;
    --info-color: #3AA0F3;
    --bg-color: #2D2D30;
    --bg-secondary: #252526;
    --card-bg: #333337;
    --card-shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.3), 0 0.3px 0.9px rgba(0, 0, 0, 0.25);
    --card-hover-shadow: 0 6.4px 14.4px rgba(0, 0, 0, 0.35), 0 1.2px 3.6px rgba(0, 0, 0, 0.28);
    --text-color: #F3F3F3;
    --text-muted: #A19F9D;
    --border-color: #3F3F46;
    --sidebar-bg: #252526;
    --sidebar-text: #F3F3F3;
    --input-bg: #3C3C3C;
    --input-border: #5C5C5C;
    --header-bg: #2D2D30;
    --ribbon-bg: #333337;
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, background 0.3s ease;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    margin-top: auto;
    background: rgba(255,255,255,0.05);
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
}

.toggle-icon {
    transition: transform 0.3s;
}

/* Sidebar Collapsed State */
.sidebar-collapsed .sidebar {
    width: 60px;
}

.sidebar-collapsed .sidebar-header h1,
.sidebar-collapsed .sidebar-header span,
.sidebar-collapsed .nav-section,
.sidebar-collapsed .nav-item span,
.sidebar-collapsed .sidebar-toggle span:not(.toggle-icon) {
    display: none;
}

.sidebar-collapsed .sidebar-header {
    padding: 20px 10px;
    text-align: center;
}

.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 14px 10px;
}

.sidebar-collapsed .nav-item i {
    margin-right: 0;
    font-size: 18px;
}

.sidebar-collapsed .sidebar-toggle {
    padding: 14px 10px;
}

.sidebar-collapsed .sidebar-toggle .toggle-icon {
    transform: rotate(180deg);
}

.sidebar-collapsed .main-content {
    margin-left: 60px;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.sidebar-header span {
    font-size: 12px;
    color: #94a3b8;
}

.sidebar-nav {
    padding: 16px 0;
    flex: 1;
}

.nav-section {
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.nav-item.active {
    background: rgba(37, 99, 235, 0.2);
    color: #fff;
    border-left-color: var(--primary-color);
}

.nav-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
}

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

/* Header */
.header {
    background: var(--card-bg);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title h2 {
    font-size: 24px;
    font-weight: 600;
}

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

/* Content Area */
.content {
    padding: 32px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

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

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-card .stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-card .stat-icon.green { background: #d1fae5; color: #10b981; }
.stat-card .stat-icon.yellow { background: #fef3c7; color: #f59e0b; }
.stat-card .stat-icon.purple { background: #ede9fe; color: #8b5cf6; }

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 14px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
}

tr:hover {
    background: #f8fafc;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-received { background: #e0e7ff; color: #4338ca; }
.badge-analyzing { background: #fef3c7; color: #b45309; }
.badge-quote-sent { background: #dbeafe; color: #1d4ed8; }
.badge-approved { background: #d1fae5; color: #047857; }
.badge-in-progress { background: #fce7f3; color: #be185d; }
.badge-review { background: #ede9fe; color: #7c3aed; }
.badge-completed { background: #d1fae5; color: #047857; }
.badge-delivered { background: #ccfbf1; color: #0d9488; }
.badge-cancelled { background: #fee2e2; color: #dc2626; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Primary Button - Uses theme gradient */
.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    filter: brightness(0.95);
}

/* Secondary Button */
.btn-secondary {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1.5px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-success:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
    transform: translateY(-1px);
}

/* Warning Button - 어두운 텍스트 사용 */
.btn-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    font-weight: 600;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

/* Info Button */
.btn-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-info:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
    transform: translateY(-1px);
}

/* Outline Buttons */
.btn-outline-primary {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-outline-success {
    background: transparent;
    color: #15803d;
    border: 2px solid #22c55e;
    font-weight: 600;
}

.btn-outline-success:hover {
    background: #22c55e;
    color: #ffffff;
}

.btn-outline-danger {
    background: transparent;
    color: #dc2626;
    border: 2px solid #ef4444;
    font-weight: 600;
}

.btn-outline-danger:hover {
    background: #ef4444;
    color: #ffffff;
}

.btn-outline-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    font-weight: 500;
}

.btn-outline-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--text-color);
    border: none;
    font-weight: 500;
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

/* Button Sizes */
.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 5px;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 10px;
}

/* Icon Button */
.btn-icon {
    padding: 8px;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    border: none;
}

.btn-icon:hover {
    background: #f1f5f9;
    color: var(--text-color);
}

.btn-icon.btn-icon-primary:hover {
    background: #dbeafe;
    color: var(--primary-color);
}

.btn-icon.btn-icon-danger:hover {
    background: #fee2e2;
    color: var(--danger-color);
}

/* Button Group */
.btn-group {
    display: inline-flex;
    gap: 4px;
}

.btn-group .btn {
    border-radius: 6px;
}

/* Loading Button */
.btn-loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

select.form-control {
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") right 10px center/20px no-repeat;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 40px;
}

/* Form Input & Select (aliases for form-control) */
.form-input,
.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    background-color: #fff;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-select {
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") right 10px center/20px no-repeat;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 40px;
    cursor: pointer;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 24px;
}

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

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Utilities */
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 16px; }

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Progress Bar */
.progress {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tab:hover {
    color: var(--text-color);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ========================================
   Theme Picker
   ======================================== */
.theme-picker {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.theme-picker-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.theme-picker-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.theme-picker-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    min-width: 280px;
    border: 1px solid var(--border-color);
}

.theme-picker-panel.show {
    display: block;
    animation: slideUp 0.3s ease;
}

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

.theme-picker-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.theme-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.theme-option:hover {
    transform: scale(1.08);
}

.theme-option.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 4px var(--primary-color);
}

.theme-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.theme-option[data-theme="office-white"] { background: linear-gradient(135deg, #FFFFFF 0%, #F3F2F1 50%, #0078D4 100%); border: 1px solid #EDEBE9; }
.theme-option[data-theme="office-colorful"] { background: linear-gradient(135deg, #0078D4 0%, #106EBE 100%); }
.theme-option[data-theme="office-darkgrey"] { background: linear-gradient(135deg, #2D2D30 0%, #252526 50%, #0078D4 100%); }

.theme-label {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 6px;
}

/* Cards with theme support */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--card-hover-shadow);
}

/* Form inputs with theme support */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color), 0.1);
    outline: none;
}

/* Table with theme support */
.table,
.data-table {
    background: var(--card-bg);
}

.table th,
.data-table th {
    background: var(--bg-secondary);
    color: var(--text-color);
}

.table td,
.data-table td {
    border-color: var(--border-color);
    color: var(--text-color);
}

.table tr:hover,
.data-table tr:hover {
    background: var(--bg-secondary);
}

/* Smooth theme transition */
body,
.sidebar,
.card,
.btn,
.main-content,
.header,
input,
select,
textarea {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ========================================
   Office 2019 Dark Grey Theme Styles
   ======================================== */

/* Dark theme button adjustments */
[data-theme="office-darkgrey"] .btn-secondary {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="office-darkgrey"] .btn-secondary:hover {
    background: var(--border-color);
    border-color: var(--primary-color);
    color: var(--primary-light);
}

[data-theme="office-darkgrey"] .btn-outline-primary {
    color: var(--primary-light);
    border-color: var(--primary-light);
}

[data-theme="office-darkgrey"] .btn-outline-secondary {
    color: var(--text-color);
    border-color: var(--border-color);
}

/* Dark theme text and backgrounds */
[data-theme="office-darkgrey"] {
    color-scheme: dark;
}

[data-theme="office-darkgrey"] .main-content {
    background: var(--bg-color);
}

[data-theme="office-darkgrey"] .header {
    background: var(--card-bg);
    border-bottom-color: var(--border-color);
}

[data-theme="office-darkgrey"] .card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

[data-theme="office-darkgrey"] h1,
[data-theme="office-darkgrey"] h2,
[data-theme="office-darkgrey"] h3,
[data-theme="office-darkgrey"] h4 {
    color: var(--text-color);
}

[data-theme="office-darkgrey"] p,
[data-theme="office-darkgrey"] span,
[data-theme="office-darkgrey"] label {
    color: var(--text-color);
}

/* Dark theme tables */
[data-theme="office-darkgrey"] table th {
    background: var(--bg-secondary) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

[data-theme="office-darkgrey"] table td {
    background: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color) !important;
}

[data-theme="office-darkgrey"] table tr:hover td {
    background: var(--bg-secondary);
}

/* Dark theme inputs */
[data-theme="office-darkgrey"] input,
[data-theme="office-darkgrey"] select,
[data-theme="office-darkgrey"] textarea {
    background: var(--input-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--input-border) !important;
}

[data-theme="office-darkgrey"] input::placeholder {
    color: var(--text-muted);
}

/* Dark theme modals */
[data-theme="office-darkgrey"] .modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

[data-theme="office-darkgrey"] .modal-header {
    border-bottom-color: var(--border-color);
}

[data-theme="office-darkgrey"] .modal-footer {
    border-top-color: var(--border-color);
}

/* Dark theme badges */
[data-theme="office-darkgrey"] .badge-secondary {
    background: var(--bg-secondary);
    color: var(--text-color);
    border-color: var(--border-color);
}

/* Dark theme nav items */
[data-theme="office-darkgrey"] .nav-item {
    color: var(--text-muted);
}

[data-theme="office-darkgrey"] .nav-item:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="office-darkgrey"] .nav-item.active {
    color: var(--text-color);
    background: rgba(0, 120, 212, 0.2);
    border-left-color: var(--primary-color);
}

/* Office White theme sidebar */
[data-theme="office-white"] .sidebar {
    border-right: 1px solid var(--border-color);
}

[data-theme="office-white"] .nav-item {
    color: var(--text-muted);
}

[data-theme="office-white"] .nav-item:hover {
    color: var(--text-color);
    background: var(--bg-secondary);
}

[data-theme="office-white"] .nav-item.active {
    color: var(--primary-color);
    background: rgba(0, 120, 212, 0.1);
    border-left-color: var(--primary-color);
}

/* Office Colorful theme sidebar */
[data-theme="office-colorful"] .nav-item {
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="office-colorful"] .nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="office-colorful"] .nav-item.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    border-left-color: #ffffff;
}

/* Ensure all buttons have readable text */
.btn {
    font-weight: 500;
    letter-spacing: 0.01em;
}

.btn-primary,
.btn-success,
.btn-danger,
.btn-info {
    font-weight: 600;
}

/* Badge improvements for all themes */
.badge {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-primary {
    background: var(--primary-color);
    color: #ffffff;
}

.badge-success {
    background: #22c55e;
    color: #ffffff;
}

.badge-warning {
    background: #fbbf24;
    color: #78350f;
}

.badge-danger {
    background: #ef4444;
    color: #ffffff;
}

.badge-info {
    background: #0ea5e9;
    color: #ffffff;
}

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