/* DMS Universal Theme */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #e2bde7;
    --secondary: #e2a1c2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f1f5f9;
    --white: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --sidebar-width: 260px;
}

* { box-sizing: border-box; }

/* Background */
body.theme-gradient {
    font-family: 'Inter', 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #9869ce 0%, #d7e4f3 50%, #9869ce 100%);
    background-attachment: fixed;
    background-size: 200% 200%;
    color: var(--text-primary);
    overflow-x: hidden;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Right panel layout */
.right-panel {
    margin-left: var(--sidebar-width) !important;
    min-height: 100vh !important;
    transition: all 0.3s ease !important;
    width: calc(100% - var(--sidebar-width)) !important;
    position: relative !important;
    z-index: 1 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    animation: fadeIn 0.5s ease-out;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border);
}
.header-menu { display: flex; justify-content: space-between; align-items: center; }
.user-area img { transition: all 0.3s ease; border: 2px solid var(--border); }
.user-area img:hover { transform: scale(1.1); border-color: var(--primary); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }

/* Cards */
.card-theme, .content-card { background: var(--white); border-radius: 16px; box-shadow: var(--shadow); }
.content-card { margin: 2rem; padding: 2rem; }

.section-title, .content-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Buttons */
.btn-gradient, .btn-action, .btn-search {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-gradient:hover, .btn-action:hover, .btn-search:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4); color: var(--white); text-decoration: none; }

/* Inputs */
.input-theme, .search-input { padding: 0.875rem 1rem; border: 2px solid var(--border); border-radius: 10px; font-size: 0.9375rem; transition: all 0.3s ease; }
.input-theme:focus, .search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); }

/* Tables - Legacy support only */
.table-theme { border-collapse: separate; border-spacing: 0; width: 100%; border-radius: 10px; overflow: hidden; }
.table-theme thead th { background: var(--primary); color: var(--white); font-weight: 600; padding: 1rem; border: none; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.5px; }
.table-theme thead th:nth-child(even) { background: var(--secondary); }
.table-theme tbody tr { transition: all 0.3s ease; }
.table-theme tbody tr:hover { background: var(--light); }
.table-theme tbody td { padding: 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }

/* Universal table styles override - ensure table-professional takes precedence */
.table-professional,
table.table-professional,
#bootstrap-data-table-export.table-professional {
    /* This ensures our universal styles override any theme.css rules */
}

/* Universal Form Control Fixes */
/* Fix dropdown options being cut off across the entire site */
.form-control {
    padding: 0.75rem 1rem !important;
    border: 2px solid var(--border) !important;
    border-radius: 10px !important;
    font-size: 0.9375rem !important;
    transition: all 0.3s ease !important;
    background: var(--white) !important;
    min-height: 48px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
}

/* Fix dropdown options visibility */
.form-control option {
    padding: 0.5rem 1rem !important;
    background: var(--white) !important;
    color: var(--text-primary) !important;
    border: none !important;
    font-size: 0.9375rem !important;
    line-height: 1.4 !important;
}

/* Ensure dropdown has proper z-index */
select.form-control {
    z-index: 10 !important;
    position: relative !important;
}

/* Fix for dropdown options being cut off */
.form-control:focus {
    z-index: 1000 !important;
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

/* Status badges */
.status-badge { padding: 0.375rem 0.875rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; display: inline-block; }
.status-scheduled { background: #fef3c7; color: #92400e; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

/* Legacy compatibility classes used in some grids */
.completed { background-color: #c7fab6; }
.scheduled { background-color: #ffffe6; }
.cancelled { background-color: #f27a6b; }

/* Utilities */
.overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; }
.overlay.active { display: block; }

/* Responsive */
@media (max-width: 768px) {
    .right-panel { margin-left: 0 !important; width: 100% !important; }
    .content-card { margin: 1rem; padding: 1rem; }
}


