/* public/assets/backend/css/style.css */

:root {
    --primary: #4f46e5;
    --primary-light: rgba(79, 70, 229, 0.15);
    --secondary: #10b981;
    --white: #ffffff;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
}

/* --- BOX / CARD REFINEMENT --- */
.box.box-primary {
    border-top: none;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.box-header {
    border-bottom: 1px solid var(--border);
    background: #ffffff;
}

.box-header .box-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgb(3, 64, 195);
    margin: 0;
}


.box-body {
    padding: 20px;
}

.box-footer {
    padding: 16px 20px;
    background: #ffffff;
    border-top: 1px solid var(--border);
}

/* --- FORM CONTROLS --- */
.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 6px;
    display: inline-block;
}

.form-control {
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 8px;
    font-size: 0.875rem;
    height: auto;
    box-shadow: none;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

/* --- BUTTONS --- */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 4px 8px;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: #4338ca;
    border-color: #4338ca;
}

/* --- TABLE CUSTOMIZATION --- */
.table-responsive {
    border: none;
    border-radius: 8px;
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
    vertical-align: middle !important;
}

.table {
    margin-bottom: 0;
}

/* --- FLEX UTILITIES --- */
.d-flex {
    display: flex !important;
}

.flex-column {
    flex-direction: column !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-center {
    justify-content: center !important;
}

/* --- FORM ROW FLEX UTILITY --- */
/* Use this for rows that contain inputs and a delete/trash icon to keep them perfectly centered */
.form-row-flex, .d-flex-middle {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
}

/* Ensure form groups inside flex rows don't have bottom margins that break alignment */
.form-row-flex .form-group, .d-flex-middle .form-group {
    margin-bottom: 0 !important;
    flex: 1;
}

/* Ensure buttons inside flex rows don't have unnecessary margins */
.form-row-flex .btn, .d-flex-middle .btn {
    margin-top: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.justify-content-end {
    justify-content: flex-end !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.gap-1 {
    gap: 4px !important;
}

.gap-2 {
    gap: 8px !important;
}

.gap-3 {
    gap: 16px !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

/* --- STATUS TOGGLE STYLES --- */
.status-checkbox-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}

.status-checkbox-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2563eb;
    margin: 0;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}

.status-checkbox-wrap .status-text {
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.status-checkbox-wrap .status-text.active {
    color: #1e40af; /* blue-800 */
}

.status-checkbox-wrap .status-text.inactive {
    color: #64748b; /* gray-500 */
}

.table thead th {
    background: #ffffff;
    border-bottom: 2px solid var(--border);
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    color: #334155;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fcfdfe;
}

.table-hover tbody tr:hover {
    background-color: #f1f5f9;
}

/* Sidebar Specific Styles */
.sidebar-mini.sidebar-collapse .sidebar {
    width: 70px !important;
}

.main-sidebar {
    background: #ffffff !important;
    box-shadow: 4px 0 10px rgba(0,0,0,0.02);
}

.nav-sidebar .nav-item > .nav-link {
    border-radius: 8px;
    margin: 4px 8px;
    color: #64748b;
}

.nav-sidebar .nav-item > .nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

@font-face {
    font-family: 'KhmerOS_battambang';
    src: url('../../fonts/KhmerOS_battambang.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'KhmerOS_muollight';
    src: url('../../fonts/KhmerOS_muollight.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Times New Roman';
    src: url('../../fonts/Times New Roman.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Global Language Based Font Application */

/* Khmer Language - /km */
html[lang="km"], html[lang="kh"] {
    font-family: 'KhmerOS_battambang', sans !important;
}

html[lang="km"] h1, html[lang="km"] h2, html[lang="km"] h3, html[lang="km"] h4, html[lang="km"] h5, html[lang="km"] h6,
html[lang="kh"] h1, html[lang="kh"] h2, html[lang="kh"] h3, html[lang="kh"] h4, html[lang="kh"] h5, html[lang="kh"] h6 {
    font-family: 'KhmerOS_muollight', serif !important;
}

/* English and others - /en, /cn, /ja, etc. */
html[lang="en"], html[lang="cn"], html[lang="ja"], html[lang="zh"], html[lang="jp"] {
    font-family: 'Times New Roman', serif !important;
}

html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3, html[lang="en"] h4, html[lang="en"] h5, html[lang="en"] h6 {
    font-family: 'Times New Roman', serif !important;
}

/* public/assets/backend/css/style.css */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #ffffff;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg-main: #f8fafc;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e2e8f0;
}

/* Base styles */
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans;
}

/* Professional Buttons */
.btn-save, .btn-edit {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important; /* bg-green */
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 6px -1px rgba(40, 167, 69, 0.2) !important;
    transition: all 0.2s !important;
}

.btn-save:hover, .btn-edit:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px -2px rgba(40, 167, 69, 0.3) !important;
}

.btn-cancel, .btn-trash {
    background: linear-gradient(135deg, #ff8c00 0%, #ff7f50 100%) !important; /* bg-orange */
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
    box-shadow: 0 4px 6px -1px rgba(255, 140, 0, 0.2) !important;
}

.btn-cancel:hover, .btn-trash:hover {
    background: linear-gradient(135deg, #ff7f50 0%, #ff4500 100%) !important;
    transform: translateY(-1px) !important;
}

.btn-delete {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important; /* bg-red as before */
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    transform: translateY(-1px) !important;
}

/* Base definitions for standard classes used by user request */
.btn-save, .btn-edit {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
}

.btn-cancel, .btn-trash {
    background: linear-gradient(135deg, #ff8c00 0%, #ff7f50 100%) !important;
}

.btn-delete {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
}


/* Sidebar refined */
.sidebar {
    background: #ffffff !important;
    border-right: 1px solid var(--border) !important;
    transition: transform 0.3s ease, width 0.3s ease !important;
}

.sidebar-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    margin-right: 10px;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 10001; /* Higher than header but lower than sidebar */
    animation: fadeIn 0.3s ease;
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 10002 !important; /* Ensure it's above backdrop */
        transform: translateX(-100%);
        width: 280px !important;
        box-shadow: 10px 0 15px rgba(0,0,0,0.1) !important;
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .sidebar-toggle-btn {
        display: block;
    }

    .main-content {
        width: 100% !important;
        margin-left: 0 !important;
    }

    header {
        padding: 0 10px !important;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 260px !important;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr !important;
    }
}
header {
    padding: 0;
}
.nav-header {
    color: var(--text-muted);
    padding: 16px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-header:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.sub-nav-item {
    padding: 10px !important;
    font-size: 0.875rem;
    color: var(--text-muted) !important;
    transition: all 0.2s;
}

.sub-nav-item:hover {
    color: var(--primary) !important;
    background: var(--primary-light) !important;
}

/* Card professional styling */
.card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0;
}

/* Inputs refinement */
input[type="text"], input[type="number"], select, textarea {
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 8px !important;
    font-size: 0.875rem !important;
    transition: all 0.2s !important;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
    outline: none !important;
}

/* Remove default border of select option box in some browsers */
select option {
    border: none !important;
    outline: none !important;
}

select::-moz-focus-inner {
    border: 0 !important;
}

/* Custom Multi-select items */
.list-items {
    border-radius: 12px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid var(--border) !important;
}

.list-items .item {
    border-radius: 6px !important;
    margin: 2px 4px !important;
}

/* Modern Dashboard Cards (Override existing) */
/* Table Professional Styling */
.table-professional {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

.table-professional thead th {
    background-color: #ffffff;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.table-professional tbody td {
    padding: 16px;
    vertical-align: middle;
    color: #334155;
    font-size: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
}

.table-professional tbody tr:hover {
    background-color: #ffffff;
}

.table-professional tbody tr:last-child td {
    border-bottom: none;
}

/* Action buttons in table */
.actions-inline {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.actions-inline .btn-save, 
.actions-inline .btn-edit,
.actions-inline .btn-delete,
.actions-inline .btn-trash,
.table .btn-save, 
.table .btn-edit,
.table .btn-delete,
.table .btn-trash,
.btn-xs.btn-save,
.btn-xs.btn-edit,
.btn-xs.btn-delete,
.btn-xs.btn-trash,
.btn-xs.btn-cancel {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 5px !important;
    order: initial !important;
}

.actions-inline .btn-save, .actions-inline .btn-edit, .table .btn-save, .table .btn-edit, .btn-xs.btn-save, .btn-xs.btn-edit {
    color: #28a745 !important; /* Green for Edit/Save icons */
}

.actions-inline .btn-delete, .actions-inline .btn-trash, .table .btn-delete, .table .btn-trash, .btn-xs.btn-delete, .btn-xs.btn-trash {
    color: #ef4444 !important; /* Red for Delete/Trash icons */
}

.btn-action {
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.btn-action-edit {
    color: #6366f1;
}

.btn-action-edit:hover {
    background-color: #ffffff;
    border-color: #c7d2fe;
}

.btn-action-delete {
    color: #ef4444;
}

.btn-action-delete:hover {
    background-color: #fef2f2;
    border-color: #fecaca;
}

/* Professional Box/Card Override */
.box.box-primary {
    border-top: 3px solid var(--primary) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.box-header.with-border {
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 15px 20px !important;
}

.box-title {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: rgb(3, 64, 195) !important;
}

.titlefix {
    font-size: 1.25rem !important;
}

.box-body {
    padding: 20px !important;
}

/* Status Labels */
.label-status {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.label-status-active {
    background-color: #dcfce7;
    color: #166534;
}

.label-status-inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Link & List Item Refinement */
a, 
.sidebar a, 
.nav-link, 
.sub-nav-item, 
.nav-header {
    text-decoration: none !important;
}

li a {
    text-decoration: none !important;
}

/* Button Container Refinement */
.modal-footer, .box-footer, .card-footer, .form-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    padding: 1.25rem 1.5rem !important;
    border-top: 1px solid var(--border) !important;
    background-color: #f8fafc !important;
}

/* Ensure Save/Submit buttons are always at the end */
.btn-save, button[type="submit"] {
    order: 2 !important;
}

/* Ensure Cancel/Default buttons are before Save */
.btn-cancel, .btn-default, .pull-left {
    order: 1 !important;
    margin-right: auto !important; /* This pushes them to the left if only two buttons exist, or just keeps them at start */
}

/* Reset floats if they interfere */
.pull-right, .pull-left {
    float: none !important;
}


/* Modern Custom Checkbox */
.modern-checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.modern-checkbox-item:hover {
    background-color: #f1f5f9;
}

.modern-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background-color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-checkbox:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.modern-checkbox:checked::after {
    content: "\f00c";
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    color: white;
    font-size: 10px;
    position: absolute;
}

.modern-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.modern-checkbox-label {
    font-size: 0.875rem;
    color: #334155;
    font-weight: 500;
    transition: color 0.2s;
}

.modern-checkbox:checked + .modern-checkbox-label {
    color: #1e293b;
}

/* Custom Scrollbar for dropdowns */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #ffffff;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* Smart UI Inspired Modern Checkbox Dropdown */
.smart-dropdown-container {
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.smart-list-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    height: 40px;
    cursor: pointer;
    transition: background-color 0.1s ease-in-out;
    border-bottom: 1px solid #f5f5f5;
}

.smart-list-item:last-child {
    border-bottom: none;
}

.smart-list-item:hover {
    background-color: #e8f0fe;
}

.smart-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #333;
    border-radius: 2px; /* Square style from demo */
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.1s;
}

.smart-checkbox:checked {
    background-color: #2196f3;
    border-color: #2196f3;
}

.smart-checkbox:checked::after {
    content: "";
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    position: absolute;
    top: 1px;
}

.smart-item-label {
    font-family: "Inter", sans;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.smart-list-item:hover .smart-item-label {
    color: #000;
}


/* Bootstrap-Integrated Customize Column Dropdown */
.column-dropdown-menu {
    min-width: 220px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    background: #fff;
}

.column-dropdown-header {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-item-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 5px 0;
}

.column-item {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.column-item:hover {
    background-color: #f1f4f9;
}

.column-checkbox-wrapper {
    position: relative;
    width: 18px;
    height: 18px;
    margin-right: 12px;
}

.column-custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #adb5bd;
    border-radius: 4px;
    background: #fff;
    display: inline-block;
    transition: all 0.2s;
}

.column-item input:checked + .column-custom-checkbox {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.column-item input:checked + .column-custom-checkbox::after {
    content: "\f00c";
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    color: white;
    font-size: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.column-label {
    font-size: 13px;
    color: #495057;
    font-weight: 500;
}

.column-dropdown-footer {
    padding: 10px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
}

.btn-column-reset {
    font-size: 11px;
    font-weight: 600;
    color: #4f46e5;
    text-transform: uppercase;
    background: none;
    border: none;
    padding: 5px;
}

.btn-column-done {
    margin-left: auto;
    background-color: #4f46e5;
    color: white;
    border: none;
    padding: 4px 15px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}


/* Standard Bootstrap-like Column Dropdown */
.column-selection-dropdown {
    min-width: 250px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: .25rem;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.175);
    padding: 0;
}

.column-selection-header {
    padding: .5rem 1rem;
    margin-bottom: 0;
    font-size: .875rem;
    color: #6c757d;
    white-space: nowrap;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.column-selection-body {
    max-height: 350px;
    overflow-y: auto;
    padding: .5rem 0;
}

.column-selection-item {
    display: block;
    width: 100%;
    padding: .25rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    cursor: pointer;
    position: relative;
}

.column-selection-item:hover {
    background-color: #f8f9fa;
    color: #16181b;
    text-decoration: none;
}

/* FontAwesome Checkbox Styling */
.column-selection-item .fa-check-square, 
.column-selection-item .fa-square {
    width: 20px;
    margin-right: 10px;
    font-size: 14px;
}

.column-selection-item .fa-check-square {
    color: #007bff;
}

.column-selection-item .fa-square {
    color: #ced4da;
}

.column-selection-footer {
    padding: .5rem 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
}


/* Custom Searchable Multi-Select Styles */
.custom-multi-select-container {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    min-height: 42px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.custom-select-trigger:hover {
    border-color: #cbd5e1;
}

.custom-select-trigger.active {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.custom-select-trigger.has-error {
    border-color: #ef4444;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.selected-tags .tag {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
}

.selected-tags .tag .remove-tag {
    cursor: pointer;
    font-size: 11px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.selected-tags .tag .remove-tag:hover {
    opacity: 1;
}

.selected-tags .custom-select-placeholder {
    color: #94a3b8;
    font-size: 14px;
}

.custom-select-trigger .caret {
    color: #94a3b8;
}

/* Inline Checkbox Styling */
.checkbox-inline-container {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start;
    cursor: pointer;
    padding: 8px 12px;
    background-color: #fffbeb; /* bg-yellow-50 */
    border: 1px solid #fef3c7; /* border-yellow-100 */
    border-radius: 8px;
    transition: all 0.2s;
    user-select: none;
    line-height: 1;
}

.checkbox-inline-container:hover {
    background-color: #fef3c7;
}

.checkbox-inline-container input[type="checkbox"] {
    margin: 0 10px 0 0 !important;
    width: 18px !important;
    height: 18px !important;
    cursor: pointer;
    accent-color: #d97706; /* yellow-600 */
    flex-shrink: 0;
    vertical-align: middle;
    position: relative;
}

.checkbox-inline-label {
    font-weight: 700;
    color: #92400e; /* text-yellow-800 */
    font-size: 14px;
    margin: 0;
    display: inline-block;
    vertical-align: middle;
    line-height: normal;
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
    animation: fadeInScale 0.2s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ========================================== */
/* Professional Dropdown Search Form          */
/* ========================================== */

.dropdown-search-box {
    padding: 12px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

/* This wrapper locks the height to match the input exactly */
.dropdown-search-input-wrapper {
    position: relative;
    width: 100%;
    height: 36px;
}

.dropdown-search-icon {
    position: absolute;
    left: 7px; /* Exactly matching your iconBadge left in Index.tsx */
    top: 50%;
    transform: translateY(-50%);
    
    /* Exact match to your iconBadge in Index.tsx */
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 11px;
    pointer-events: none;
    z-index: 2;
}

/* Increased specificity to beat global input[type="text"] rules */
.custom-select-dropdown .dropdown-search-input {
    width: 100%;
    height: 100%; /* Fills the 36px wrapper exactly */
    /* 7px(left) + 24px(icon) + 9px(gap) = 40px left padding */
    padding: 0 12px 0 40px !important; 
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    font-size: 13px !important;
    color: #334155;
    outline: none !important;
    transition: all 0.2s ease;
}

/* Increased specificity for focus state */
.custom-select-dropdown .dropdown-search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}

/* Style the placeholder text */
.custom-select-dropdown .dropdown-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
    opacity: 1;
}

/* Prevent modal global padding from breaking multi-select triggers */
.custom-popup-body .custom-multi-select-container .custom-select-trigger {
    padding-left: 38px !important; 
}

.options-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 5px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.option-item:hover {
    background: #f8fafc;
}

.option-item.selected {
    background: #f0f4ff;
}

.option-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.option-item.selected .option-checkbox {
    background: #4f46e5;
    border-color: #4f46e5;
}

.option-checkbox i {
    color: #fff;
    font-size: 10px;
}

.option-label {
    font-size: 14px;
    color: #334155;
    flex: 1;
}

.no-options {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* Media Upload Styles */
.media-upload-container {
    padding: 20px;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    background: #f9f9f9;
}

.media-upload-container:hover {
    border-color: #3c8dbc;
    background: #f4f4f4;
}

.media-preview-wrapper {
    position: relative;
    display: inline-block;
    margin-top: 10px;
}

.media-preview-image {
    max-width: 150px;
    max-height: 150px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.media-remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dd4b39;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    border: 2px solid white;
}

.media-upload-icon {
    font-size: 40px;
    color: #ccc;
    margin-bottom: 10px;
}

.media-upload-text {
    color: #777;
    font-size: 14px;
}

.media-replace-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 4px;
}

.media-preview-wrapper:hover .media-replace-overlay {
    opacity: 1;
}


/* ================================================ */
/* d-flex Input Group - Right Icon Border Fix       */
/* ================================================ */

/* When react-select or AddableMultiSelect is inside .input-group-wrap div (flex child),
   remove its right border-radius so it connects to the icon span */
.input-group-wrap > div:first-child .select__control,
.input-group-wrap > div:first-child .css-13cymwt-control,
.input-group-wrap > div:first-child .custom-select-trigger,
.input-group-wrap > div:first-child [class*="control"] {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: none !important;
}

/* Also fix focus ring to not show gap on right */
.input-group-wrap > div:first-child .select__control:focus-within,
.input-group-wrap > div:first-child .css-13cymwt-control:focus-within,
.input-group-wrap > div:first-child .custom-select-trigger.active {
    border-right: none !important;
}

/* Ensure the standard form-control inside input-group-wrap has no right border */
.input-group-wrap .form-control {
    border-right: none !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Focus state for input-group fields */
.input-group-wrap .form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
}

/* Error state for input-group icon */
.input-group-icon-error {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}

/* Error state for input-group field */
.input-group-wrap .form-control.is-invalid,
.input-group-wrap .form-control:invalid {
    border-color: #ef4444 !important;
}
/* ================================================ */
/* Small Icon Badge inside Input Fields (Left Side) */
/* ================================================ */

.icon-wrap {
    position: relative;
    width: 100%;
}

.icon-badge {
    position: absolute;
    left: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: transparent; /* Removed white background */
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 11px;
    pointer-events: none;
    z-index: 10;
}

.icon-badge-error {
    background: transparent !important; /* Removed error background */
    color: #ef4444 !important;
}

/* Fix dropdown menu visibility issues */
.custom-popup-body {
    overflow: auto; /* Allow scrolling for long content */
    display: flex;
    flex-direction: column;
}

.custom-popup-box {
    overflow: hidden; /* Prevent overflow at box level */
}

/* Remove small border artifact on select options */
select option {
    background-color: #fff;
    color: #333;
    padding: 8px;
    border: none !important;
}

/* Ensure react-select menus are on top and not clipped */
[class*="-menu"] {
    z-index: 999999 !important;
}

.field-with-icon {
    padding-left: 38px !important;
}

/* Ensure react-select components also get the padding when wrapped */
.icon-wrap [class*="-control"],
.icon-wrap [class*="-ValueContainer"] {
    padding-left: 38px !important;
}

/* Ensure inputs with paddingLeft don't clip text */
.form-control {
    text-overflow: ellipsis;
}

/* Smooth focus ring that works with icon overlay */
.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
    outline: none !important;
}

/* Remove default left padding for inputs/selects 
   when custom icon badge is applied via inline style */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
    outline: none !important;
}
/* ================================================ */
/* Modal Form Padding Refinement                    */
/* ================================================ */
.custom-popup-body .form-control,
.custom-popup-body input[type="text"],
.custom-popup-body input[type="number"],
.custom-popup-body input[type="datetime-local"],
.custom-popup-body input[type="email"],
.custom-popup-body select,
.custom-popup-body textarea {
    padding-left: 38px !important;
}

/* Also target AddableMultiSelect and other custom components if they use standard classes */
.custom-popup-body .custom-select-trigger {
    padding-left: 38px !important;
}

/* Target react-select components in modals */
.custom-popup-body [class*="-control"],
.custom-popup-body [class*="-ValueContainer"] {
    padding-left: 38px !important; 
}

/* Ensure icons are always visible and positioned correctly in these padded fields */
.custom-popup-body .iconBadge, 
.custom-popup-body [style*="position: absolute"] {
    z-index: 10 !important;
}

/* --- MODAL BUTTON REFINEMENT --- */

/* Recreate primary buttons to green gradient */
.btn-primary, .btn-confirm {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 6px -1px rgba(40, 167, 69, 0.2) !important;
    transition: all 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-primary:hover, .btn-confirm:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px -2px rgba(40, 167, 69, 0.3) !important;
}

/* Secondary/Cancel buttons to orange gradient */
.btn-secondary, .btn-default, .btn-cancel {
    background: linear-gradient(135deg, #ff8c00 0%, #ff7f50 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 6px -1px rgba(255, 140, 0, 0.2) !important;
    transition: all 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-secondary:hover, .btn-default:hover, .btn-cancel:hover {
    background: linear-gradient(135deg, #ff7f50 0%, #ff4500 100%) !important;
    transform: translateY(-1px) !important;
}

/* Button Placement in Footers */
.modal-footer, .box-footer, .card-footer, .form-actions, .custom-popup-body .flex.justify-end {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    width: 100% !important;
}

/* Move Cancel/Secondary to the left */
.btn-cancel, .btn-secondary, .btn-default {
    order: -1 !important;
    margin-right: auto !important;
}

/* Save/Ok/Primary to the right */
.btn-save, .btn-primary, button[type="submit"], .btn-confirm {
    order: 1 !important;
}

/* Ensure Icons for all buttons */
.btn-primary:not(:has(i)):not(:has(span.mdi)):before, 
button[type="submit"]:not(:has(i)):not(:has(span.mdi)):before,
.btn-save:not(:has(i)):not(:has(span.mdi)):before {
    content: "\f0c7"; /* fa-save */
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    margin-right: 8px;
}

.btn-secondary:not(:has(i)):not(:has(span.mdi)):before, 
.btn-cancel:not(:has(i)):not(:has(span.mdi)):before,
.btn-default:not(:has(i)):not(:has(span.mdi)):before {
    content: "\f05e"; /* fa-ban */
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    margin-right: 8px;
}

/* SweetAlert2 Button Alignment override */
.swal2-actions {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 0 20px !important;
}

.swal2-confirm {
    order: 2 !important;
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
}

.swal2-cancel {
    order: 1 !important;
    background: linear-gradient(135deg, #ff8c00 0%, #ff7f50 100%) !important;
    margin-right: auto !important;
}

/* Additional button classes used in Media Picker */
.primary {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 6px -1px rgba(40, 167, 69, 0.2) !important;
    transition: all 0.2s !important;
}

.danger {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2) !important;
}

/* Ensure all button classes from MediaPicker have icons */
.primary:not(:has(i)):not(:has(span.mdi)):before {
    content: "\f058"; /* fa-circle-check */
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    margin-right: 8px;
}

.danger:not(:has(i)):not(:has(span.mdi)):before {
    content: "\f2ed"; /* fa-trash-can */
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    margin-right: 8px;
}

/* Button with text like "Confirm", "Save", "Create" etc. */
button:contains("Confirm"):not(:has(i)):not(:has(span.mdi)):before {
    content: "\f058";
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    margin-right: 8px;
}

/* Note: :contains is not valid CSS, but I'll use common classes */

/* --- SLOT REPEATER STYLES --- */
.slot-repeater-header {
    display: flex;
    gap: 10px;
    padding: 0 12px 8px 50px; /* Aligned with inputs, skipping the plus button space */
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
}

.slot-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.slot-row:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.slot-inputs-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 8px;
    padding: 0 4px;
}

.slot-input-group {
    position: relative;
    flex: 1;
}

.slot-separator {
    color: #94a3b8;
    font-weight: 500;
    font-size: 12px;
}

.slot-action-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 11px;
}

.slot-btn-plus {
    background-color: #ecfdf5;
    color: #059669;
    border-color: #d1fae5;
}

.slot-btn-plus:hover {
    background-color: #d1fae5;
    transform: scale(1.05);
}

.slot-btn-delete {
    background-color: #fff1f2;
    color: #e11d48;
    border-color: #ffe4e6;
}

.slot-btn-delete:hover {
    background-color: #ffe4e6;
    transform: scale(1.05);
}

.slot-input-group {
    flex: 1;
}

.slot-row .form-control {
    height: 38px !important;
    border-color: #e2e8f0 !important;
    background: #ffffff !important;
}

.slot-row .form-control:focus {
    background: #ffffff !important;
    border-color: var(--primary) !important;
}


.slot-row .icon-wrap {
    margin-bottom: 0;
    flex: 1;
}

.slot-row .icon-badge-sm {
    position: absolute;
    left: 1px;
    top: 1px;
    bottom: 1px;
    width: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; /* Removed background */
    border-right: none; /* Removed border */
    border-radius: 7px 0 0 7px;
    color: #64748b;
    font-size: 13px;
    z-index: 5;
    pointer-events: none;
}

.slot-row .field-with-icon-sm {
    padding-left: 42px !important;
}

.slot-row .icon-wrap-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* Style CustomSearchableMultiSelect trigger to match slot-row inputs */
.slot-row .custom-multi-select-container .custom-select-trigger {
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 12px 0 34px !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    font-size: 13px !important;
}

.slot-row .custom-multi-select-container .custom-select-trigger .icon-badge {
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    width: 34px !important;
    height: 100% !important;
    background: transparent !important; /* Removed background */
    border-right: none !important; /* Removed border */
    border-radius: 6px 0 0 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    font-size: 13px !important;
    pointer-events: none !important;
}

.slot-row .custom-multi-select-container .custom-select-trigger .selected-tags {
    gap: 2px !important;
}

.slot-row .custom-multi-select-container .custom-select-trigger .tag {
    padding: 1px 4px !important;
    font-size: 10px !important;
    border-radius: 4px !important;
}

.slot-row .custom-multi-select-container .custom-select-trigger .custom-select-placeholder {
    font-size: 13px !important;
    line-height: 32px !important;
}

.slot-row .custom-multi-select-container .custom-select-trigger .caret {
    right: 8px !important;
    font-size: 10px !important;
}

.custom-select-trigger.disabled {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    cursor: default !important;
    opacity: 0.7;
}

.custom-select-trigger.disabled .icon-badge {
    background: #ffffff !important;
    color: #94a3b8 !important;
}

/* Dashed vertical separator for slot columns */
.slot-column-separator {
    border-right: 1px dashed #cbd5e1;
    padding-right: 15px;
}

/* Compact Table Styles */
.compact-table th {
    padding: 4px 10px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

.compact-table td {
    padding: 2px 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    vertical-align: middle !important;
}

.compact-table .btn-xs {
    padding: 1px 4px !important;
    font-size: 11px !important;
}

.compact-table img {
    width: 25px !important;
    height: 25px !important;
}

.compact-table .icon-badge-img-placeholder {
    width: 25px !important;
    height: 25px !important;
}

/* Print Styles for Timetables */
@media print {
    body * {
        visibility: hidden;
    }
    .all-timetables-view, .all-timetables-view * {
        visibility: visible;
    }
    .all-timetables-view {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .timetable-group {
        page-break-after: always;
        border: 1px solid #000 !important;
        margin-bottom: 20px !important;
        padding: 15px !important;
        background: #fff !important;
    }
    .table-responsive {
        overflow: visible !important;
    }
    table {
        border-collapse: collapse !important;
        width: 100% !important;
    }
    th, td {
        border: 1px solid #000 !important;
        padding: 5px !important;
    }
    .bg-gray-100, .bg-gray-50 {
        background-color: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
    }
    .text-primary {
        color: #000 !important;
    }
    .btn, .box-header, .content-header, .main-sidebar, .main-footer, .navbar {
        display: none !important;
    }
}

/* Dropdown Search Box Styles */
.dropdown-search-box .dropdown-search-input-wrapper {
    position: relative;
}

.dropdown-search-box .dropdown-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    z-index: 10;
}

.dropdown-search-box .dropdown-search-input {
    width: 100%;
    padding: 8px 12px 8px 40px !important;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dropdown-search-box .dropdown-search-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Semester Repeater Styles */
.semester-row {
    border-left: 4px solid var(--primary);
    transition: all 0.2s;
}

.semester-row:hover {
    background-color: #f1f5f9 !important;
}

.bg-gray-50 {
    background-color: #f8fafc;
}

.border-b {
    border-bottom: 1px solid var(--border);
}

.border-right-dashed {
    border-right: 1px dashed var(--border);
}

@media (max-width: 767px) {
    .border-right-dashed {
        border-right: none;
        border-bottom: 1px dashed var(--border);
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
}

/* --- SEARCH CARD STYLES (FROM DEMO) --- */
.search-card {
    padding: 20px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    border: 1px solid var(--border) !important;
    margin-bottom: 24px !important;
}

.search-card .box-header {
    padding: 0 0 15px 0 !important;
    margin-bottom: 15px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.search-card .form-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    margin-bottom: 4px !important;
    text-transform: uppercase !important;
}

.search-card .box-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
}

.year-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #f0f4f8;
    color: var(--text-main);
    border: 1px solid var(--border);
    white-space: nowrap;
}

.semester-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #eef4fb;
    color: #1a6ab7;
    border: 1px solid #d4e4f5;
    white-space: nowrap;
}

/* --- EXAM CONFIG BADGES --- */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    min-width: 40px;
}

.order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    background: #fefce8;
    color: #a16207;
    border: 1px solid #fde68a;
    min-width: 32px;
}

.semester-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.semester-pill.s1 {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.semester-pill.s2 {
    background: #faf5ff;
    color: #9333ea;
    border: 1px solid #e9d5ff;
}

.exam-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.exam-type-badge.midterm {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.exam-type-badge.final {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.exam-type-badge.monthly {
    background: #fefce8;
    color: #a16207;
    border: 1px solid #fde68a;
}

/* --- ADDITIONAL DEMO STYLES --- */
.btn-add {
    background: linear-gradient(135deg, #1a6ab7 0%, #155d99 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 7px 16px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
}

.btn-add:hover {
    background: linear-gradient(135deg, #155d99 0%, #125080 100%) !important;
    transform: translateY(-1px) !important;
}

.info-hint {
    background: #eef4fb !important;
    border: 1px solid #d4e4f5 !important;
    border-radius: 6px !important;
    padding: 10px 16px !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    font-size: 12px !important;
    color: var(--sis-blue) !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
}

.info-hint i {
    font-size: 18px !important;
    flex-shrink: 0 !important;
    margin-top: 1px !important;
}

.action-icon {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color 0.15s;
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-icon:hover { color: var(--primary); }
.action-icon.delete:hover { color: #ef4444; }
