@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

html {
    font-size: 16px;
}

:root {
    --primary: #1e3a8a; /* Deep Blue, formal and official */
    --primary-hover: #1d4ed8;
    --secondary: #0d9488; /* Teal / soft secondary color */
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --info: #0284c7;
    --dark: #0f172a;
    --light: #f8fafc;
    --bg-color: #f1f5f9; /* Slate 100 - clean light gray background */
    --text-main: #0f172a; /* Slate 900 - dark text for strong contrast */
    --text-muted: #475569; /* Slate 600 - dark muted gray for readable subtext */

    --glass-bg: #ffffff; /* Solid white background for cards */
    --glass-border: #cbd5e1; /* Slate 300 - clear, visible border */
    --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03), 0 10px 15px -3px rgba(0, 0, 0, 0.05); /* Light, professional shadow */
    --z-sidebar: 1000;
    --z-overlay: 950;
    --z-header: 900;
    --z-modal: 2000;

    --font-main: 'Prompt', 'Inter', sans-serif; /* Modern Thai / English fonts */
    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-color);
    background-image: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Utilities (Adapted for Light Theme) */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    --card-padding: 2rem;
    padding: var(--card-padding);
}

.glass-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar-overlay {
    display: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
}

p {
    line-height: 1.6;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px; /* Uniform rounded corners */
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.form-control:hover,
.datatable-input:hover,
.datatable-selector:hover {
    border-color: #94a3b8; /* Elegant darker border on hover */
}

.form-control:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.08);
}

.form-control::file-selector-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 1rem;
    transition: var(--transition);
    font-weight: 500;
}

.form-control::file-selector-button:hover {
    background: var(--primary-hover);
}

select.form-control option {
    background: #ffffff;
    color: var(--text-main);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    font-size: 0.925rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-info:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #b45309;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

.btn-block {
    width: 100%;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 100px; /* Modern fully-rounded capsule pill */
    font-size: 0.775rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: var(--transition);
    border: 1px solid transparent;
    gap: 0.35rem;
}

.badge i {
    margin-right: 0;
    font-size: 0.825rem;
}

.badge-pending {
    background: rgba(217, 119, 6, 0.08) !important;
    color: #d97706 !important;
    border: 1px solid rgba(217, 119, 6, 0.2) !important;
}

.badge-approved {
    background: rgba(5, 150, 105, 0.08) !important;
    color: #059669 !important;
    border: 1px solid rgba(5, 150, 105, 0.2) !important;
}

.badge-rejected {
    background: rgba(220, 38, 38, 0.08) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.2) !important;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    background: transparent;
    border: none;
    box-shadow: none;
}

.table-responsive:hover {
    box-shadow: none;
}

/* Make tables stretch edge-to-edge horizontally inside glass-panel card container */
.datatable-container,
.table-responsive > .table {
    margin-left: calc(-1 * var(--card-padding, 2rem)) !important;
    margin-right: calc(-1 * var(--card-padding, 2rem)) !important;
    width: calc(100% + (2 * var(--card-padding, 2rem))) !important;
    max-width: none !important;
    border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
}

/* Add breathing room/padding to first and last cell columns to align with padded elements */
.table th:first-child,
.table td:first-child,
.datatable-table th:first-child,
.datatable-table td:first-child {
    padding-left: var(--card-padding, 2rem) !important;
}

.table th:last-child,
.table td:last-child,
.datatable-table th:last-child,
.datatable-table td:last-child {
    padding-right: var(--card-padding, 2rem) !important;
}

.table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 10px !important; /* Spacing between floating row strips */
    margin-bottom: 0;
}

/* Base header styles */
.table th {
    color: #64748b; /* Slate 500 */
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.25rem !important;
    background: transparent !important; /* Blends with white card background */
    border: none !important;
    vertical-align: middle;
}

/* Floating table row cells */
.table tbody tr td {
    background: #ffffff !important;
    border-top: 1px solid rgba(226, 232, 240, 0.7) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
    border-left: none !important;
    border-right: none !important;
    padding: 1.25rem 1.25rem !important;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01);
    vertical-align: middle;
}

.table tbody tr td:first-child {
    border-left: 1px solid rgba(226, 232, 240, 0.7) !important;
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
    padding-left: var(--card-padding, 2rem) !important;
}

.table tbody tr td:last-child {
    border-right: 1px solid rgba(226, 232, 240, 0.7) !important;
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    padding-right: var(--card-padding, 2rem) !important;
}

.table tbody tr:hover td {
    background: #f8fafc !important; /* Soft luxury tint */
    border-color: rgba(30, 58, 138, 0.2) !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.03) !important;
}

.table tbody tr:hover td:first-child {
    border-left-color: rgba(30, 58, 138, 0.2) !important;
}

.table tbody tr:hover td:last-child {
    border-right-color: rgba(30, 58, 138, 0.2) !important;
}

/* Table Utilities */
.col-nowrap {
    white-space: nowrap;
}

.col-w-sm { width: 80px; }
.col-w-md { width: 150px; }
.col-w-lg { width: 250px; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.85rem; }
.font-medium { font-weight: 500; }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Dashboard Stat Cards Layout */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-link .glass-panel {
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 1rem !important;
    text-align: center;
    height: 100%;
}

.card-link:hover .glass-panel {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stats-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stats-grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stats-icon {
    font-size: 1.8rem !important;
    margin-bottom: 0.5rem !important;
    display: inline-block;
}

.stats-title {
    color: var(--text-muted);
    font-size: 0.825rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.25rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-number {
    font-size: 1.8rem !important;
    font-weight: bold;
    margin: 0 !important;
    line-height: 1.2;
}

@media (max-width: 1200px) {
    .stats-grid-4, .stats-grid-5, .stats-grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid-4, .stats-grid-5, .stats-grid-6, .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .stats-grid-4, .stats-grid-5, .stats-grid-6, .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Sidebar / Nav */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #ffffff; /* Clean light theme background */
    border-right: 1px solid #e2e8f0; /* Distinct border line to separate from content */
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.04); /* Subtle shadow for depth */
}

/* Ensure borders inside sidebar match light theme */
.sidebar > div:first-child {
    border-bottom: 1px solid #e2e8f0 !important;
}

.sidebar .text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar div:last-child {
    color: #64748b !important; /* Muted footer text */
    border-top: 1px solid #e2e8f0 !important;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #0f172a; /* Slate 900 - blackish text for strong contrast */
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    margin-bottom: 0.5rem;
    gap: 1rem;
    font-weight: 600; /* Bolder text for premium feel */
    font-size: 0.925rem;
}

.nav-link i {
    font-size: 1.2rem;
    color: #334155; /* Slate 700 - darker icons */
    opacity: 0.95;
    transition: var(--transition);
}

.nav-link:hover {
    background: #f1f5f9; /* Light slate hover background */
    color: var(--primary); /* Deep blue primary color text */
}

.nav-link:hover i {
    color: var(--primary);
    opacity: 1;
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.18);
}

.nav-link.active i {
    color: #ffffff !important;
    opacity: 1;
}

.nav-link.text-danger {
    color: #ef4444 !important; /* Standout red color for logout */
}

.nav-link.text-danger i {
    color: #ef4444 !important;
}

.nav-link.text-danger:hover {
    background: #fef2f2;
    color: #dc2626 !important;
}

.nav-link.text-danger:hover i {
    color: #dc2626 !important;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-error {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.alert-success {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: var(--z-sidebar);
        transition: left 0.3s ease;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        padding: 1rem;
        margin-top: 60px;
    }

    .mobile-header {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #ffffff;
        border-bottom: 1px solid var(--glass-border);
        padding: 0 1.5rem;
        align-items: center;
        justify-content: space-between;
        z-index: var(--z-header);
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        z-index: var(--z-overlay);
    }

    .sidebar-overlay.active {
        display: block;
    }
}

.mobile-header {
    display: none;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 640px) {
    .glass-panel {
        --card-padding: 1.5rem !important;
        padding: var(--card-padding) !important;
    }
    
    .main-content header h2 {
        font-size: 1.25rem;
    }
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    margin: auto;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

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

.modal-body {
    padding: 1.5rem;
}

.close-btn {
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Simple-DataTables Overrides for Premium Light Theme */
.datatable-wrapper {
    color: var(--text-main);
    font-family: var(--font-main);
}

.datatable-top {
    padding: 0 0 1rem 0 !important;
    background: transparent;
    border-bottom: none;
    margin-bottom: 0.5rem !important; /* Spacing before table */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.datatable-bottom {
    padding: 1rem 0 0 0 !important;
    background: transparent;
    border-top: none;
    margin-top: 0.5rem !important; /* Spacing after table */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.datatable-input {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: var(--text-main);
    padding: 0.65rem 1rem 0.65rem 2.25rem !important; /* Spacious padding for search icon */
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    width: 280px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 16px 16px;
}

.datatable-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.08);
}

.datatable-selector {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: var(--text-main);
    padding: 0.65rem 2rem 0.65rem 1rem !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    appearance: none; /* Custom arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 10px) center;
    background-size: 14px 14px;
}

.datatable-selector:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.08);
}

.datatable-pagination ul {
    display: flex;
    padding-left: 0;
    list-style: none;
    gap: 0.25rem;
    margin: 0;
}

.datatable-pagination li {
    display: inline-block;
}

.datatable-pagination a {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    margin: 0;
    padding: 0.55rem 0.95rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    text-decoration: none;
}

.datatable-pagination a:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: var(--text-main);
}

.datatable-pagination .active a,
.datatable-pagination .active a:focus,
.datatable-pagination .active a:hover {
    background: linear-gradient(135deg, var(--primary), #1d4ed8) !important;
    color: white !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25) !important;
}

.datatable-pagination .disabled a,
.datatable-pagination .disabled a:hover {
    background: #f8fafc;
    color: #cbd5e1;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.datatable-table {
    border-collapse: separate !important;
    border-spacing: 0 10px !important; /* Spacing between floating row strips */
    width: 100% !important;
    border: none !important;
}

.datatable-table>thead>tr>th {
    color: #64748b !important; /* Slate 500 */
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 0.75rem 1.25rem !important;
    background: transparent !important; /* Blends with white card background */
    border: none !important;
    vertical-align: middle !important;
}

.datatable-table>tbody>tr>td {
    background: #ffffff !important;
    border-top: 1px solid rgba(226, 232, 240, 0.7) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
    border-left: none !important;
    border-right: none !important;
    padding: 1.25rem 1.25rem !important;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01);
    vertical-align: middle !important;
}

.datatable-table>tbody>tr>td:first-child {
    border-left: 1px solid rgba(226, 232, 240, 0.7) !important;
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
    padding-left: var(--card-padding, 2rem) !important;
}

.datatable-table>tbody>tr>td:last-child {
    border-right: 1px solid rgba(226, 232, 240, 0.7) !important;
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    padding-right: var(--card-padding, 2rem) !important;
}

.datatable-table>tbody>tr {
    background: transparent !important;
}

.datatable-table>tbody>tr:hover td {
    background: #f8fafc !important; /* Soft luxury tint */
    border-color: rgba(30, 58, 138, 0.2) !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.03) !important;
}

.datatable-table>tbody>tr:hover td:first-child {
    border-left-color: rgba(30, 58, 138, 0.2) !important;
}

.datatable-table>tbody>tr:hover td:last-child {
    border-right-color: rgba(30, 58, 138, 0.2) !important;
}

.datatable-info {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Hide default simple-datatables sorting triangles */
.datatable-sorter::before,
.datatable-sorter::after {
    display: none !important;
}

.datatable-sorter {
    position: relative;
    padding-right: 1.5rem !important;
    display: inline-flex;
    align-items: center;
    color: #334155 !important;
    font-weight: 600 !important;
}

/* Add custom elegant sort icon using FontAwesome */
.datatable-sorter::after {
    content: "\f0dc" !important; /* fa-sort */
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    position: absolute;
    right: 0px;
    font-size: 0.75rem;
    opacity: 0.35;
    transition: var(--transition);
    display: inline-block !important;
}

.datatable-sorter:hover::after {
    opacity: 0.8;
    color: var(--primary);
}

.ascending .datatable-sorter::after {
    content: "\f0de" !important; /* fa-sort-up */
    opacity: 0.9;
    color: var(--primary);
}

.descending .datatable-sorter::after {
    content: "\f0dd" !important; /* fa-sort-down */
    opacity: 0.9;
    color: var(--primary);
}

/* Premium Buttons inside Tables */
.table td .btn,
.datatable-table td .btn {
    width: auto;
    height: 32px;
    padding: 0 0.85rem;
    border-radius: 20px; /* Modern pill shape */
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    gap: 0.35rem;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.table td .btn:hover,
.datatable-table td .btn:hover {
    transform: translateY(-1.5px) !important;
}

/* success buttons (e.g. view file) */
.table td .btn-success,
.datatable-table td .btn-success {
    background: rgba(13, 148, 136, 0.06) !important; /* Soft Teal tint */
    color: #0d9488 !important;
    border: 1px solid rgba(13, 148, 136, 0.18) !important;
}
.table td .btn-success:hover,
.datatable-table td .btn-success:hover {
    background: #0d9488 !important;
    color: #ffffff !important;
    border-color: #0d9488 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25) !important;
}

/* danger buttons (e.g. delete) */
.table td .btn-danger,
.datatable-table td .btn-danger {
    background: rgba(220, 38, 38, 0.06) !important; /* Soft Red tint */
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.18) !important;
}
.table td .btn-danger:hover,
.datatable-table td .btn-danger:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25) !important;
}

/* warning buttons (e.g. edit) */
.table td .btn-warning,
.datatable-table td .btn-warning {
    background: rgba(217, 119, 6, 0.06) !important; /* Soft Amber tint */
    color: #d97706 !important;
    border: 1px solid rgba(217, 119, 6, 0.18) !important;
}
.table td .btn-warning:hover,
.datatable-table td .btn-warning:hover {
    background: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25) !important;
}

/* info buttons (e.g. download or alternative views) */
.table td .btn-info,
.datatable-table td .btn-info {
    background: rgba(2, 132, 199, 0.06) !important; /* Soft Sky Blue tint */
    color: #0284c7 !important;
    border: 1px solid rgba(2, 132, 199, 0.18) !important;
}
.table td .btn-info:hover,
.datatable-table td .btn-info:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25) !important;
}

/* primary buttons (e.g. assess/evaluate) */
.table td .btn-primary,
.datatable-table td .btn-primary {
    background: rgba(30, 58, 138, 0.06) !important; /* Soft Primary tint */
    color: var(--primary) !important;
    border: 1px solid rgba(30, 58, 138, 0.18) !important;
}
.table td .btn-primary:hover,
.datatable-table td .btn-primary:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25) !important;
}

/* Custom Table Cell Typography Overrides for Luxury look */
.table td,
.datatable-table td {
    font-weight: 500 !important;
    color: #1e293b !important; /* Slate 800 */
    font-size: 0.95rem !important; /* Larger readable base text */
}

/* Date format styling */
.table td:first-child,
.datatable-table td:first-child {
    font-weight: 600 !important;
    font-family: 'Inter', 'Prompt', sans-serif !important;
    color: #334155 !important; /* Slate 700 */
    font-size: 0.95rem !important;
}

.table td strong,
.datatable-table td strong {
    font-family: 'Prompt', sans-serif;
    color: #0f172a !important; /* Deep Slate */
    font-size: 1.025rem !important; /* Prominent bold titles */
    font-weight: 600 !important;
    display: inline-block;
    margin-bottom: 0.2rem;
}

.table td .text-muted,
.datatable-table td .text-muted {
    font-family: 'Prompt', sans-serif;
    color: #64748b !important; /* Slate 500 */
    font-size: 0.85rem !important; /* Readable details */
    font-weight: 500 !important;
    opacity: 0.95;
}

.table td small,
.datatable-table td small {
    font-family: 'Prompt', 'Inter', sans-serif;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
}

/* File Viewer Popup Modal Sizing */
.modal-content.modal-viewer {
    width: 90% !important;
    height: 90% !important;
    max-width: 1200px !important;
    max-height: 90vh !important;
}

/* Drag and Drop Upload Area */
.upload-dropzone {
    border: 2px dashed rgba(30, 58, 138, 0.25) !important;
    background: #f8fafc !important;
    padding: 2.5rem 1.5rem !important;
    border-radius: 16px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.25s ease-in-out !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
}

.upload-dropzone:hover {
    border-color: var(--primary) !important;
    background: rgba(30, 58, 138, 0.02) !important;
}

.upload-dropzone.dragover {
    border-color: var(--secondary) !important;
    background: rgba(13, 148, 136, 0.05) !important;
    transform: scale(1.01) !important;
}

.upload-dropzone input[type="file"] {
    display: none !important;
}

.upload-dropzone .upload-icon {
    font-size: 3rem !important;
    color: var(--primary) !important;
    opacity: 0.7 !important;
    transition: all 0.25s ease !important;
}

.upload-dropzone:hover .upload-icon {
    transform: translateY(-4px) !important;
    opacity: 1 !important;
}

.upload-dropzone .upload-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
    margin: 0 !important;
    font-family: 'Prompt', sans-serif !important;
}

.upload-dropzone .upload-subtitle {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
    margin: 0 !important;
    font-family: 'Prompt', sans-serif !important;
}

/* File Preview inside dropzone */
.file-preview-card {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    background: #ffffff !important;
    border: 1px solid var(--glass-border) !important;
    padding: 0.85rem 1.25rem !important;
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 480px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    animation: fadeIn 0.25s ease-out forwards !important;
    text-align: left !important;
}

.file-preview-card .file-icon {
    font-size: 2rem !important;
    color: var(--primary) !important;
}

.file-preview-card .file-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.file-preview-card .file-name {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    font-family: 'Prompt', sans-serif !important;
}

.file-preview-card .file-size {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
    margin: 0 !important;
    font-family: 'Prompt', sans-serif !important;
}

.file-preview-card .btn-remove {
    background: #fee2e2 !important;
    color: var(--danger) !important;
    border: none !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 0.8rem !important;
    transition: all 0.2s ease !important;
}

.file-preview-card .btn-remove:hover {
    background: #fca5a5 !important;
}