/* css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-purple: #a855f7;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;
    --font-family: 'Outfit', 'Sarabun', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
}

/* Glassmorphism sidebar & cards */
.sidebar {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    min-height: 100vh;
    position: fixed;
    width: 260px;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.main-content {
    margin-left: 260px;
    padding: 2.5rem;
    min-height: 100vh;
    transition: var(--transition-smooth);
}

@media (max-width: 992px) {
    .sidebar {
        margin-left: -260px;
    }
    .sidebar.active {
        margin-left: 0;
    }
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
}

/* Navigation Menu */
.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.nav-link-custom i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    transition: var(--transition-smooth);
}

.nav-link-custom:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.nav-link-custom.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

/* Premium Card Design */
.premium-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.premium-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #ffffff 30%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-blue {
    background: linear-gradient(135deg, #60a5fa 30%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Stat Card specific */
.stat-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.icon-purple {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.icon-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.icon-rose {
    background: rgba(244, 63, 94, 0.15);
    color: var(--accent-rose);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.icon-amber {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Custom Table style */
.table-responsive {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.table-custom {
    background: var(--bg-card);
    color: var(--text-primary);
    margin-bottom: 0;
}

.table-custom th {
    background: rgba(15, 23, 42, 0.6) !important;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.table-custom td {
    background: transparent !important;
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

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

.table-custom tbody tr:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Badge styling */
.badge-custom {
    padding: 0.5em 0.85em;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-returned {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-fixed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Form inputs styling */
.form-control-custom {
    background: rgba(15, 23, 42, 0.5) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 12px !important;
    padding: 0.75rem 1rem !important;
    transition: var(--transition-smooth) !important;
}

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

.form-control-custom::placeholder {
    color: var(--text-secondary);
}

.form-label-custom {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Custom buttons */
.btn-premium {
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    color: white;
}

.btn-premium:active {
    transform: translateY(1px);
}

.btn-premium-outline {
    background: transparent;
    border: 1px solid var(--accent-indigo);
    color: var(--accent-indigo);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-premium-outline:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
    color: var(--accent-indigo);
}

/* Page animation */
.fade-in-page {
    animation: fadeIn 0.5s ease-out;
}

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

/* ==========================================
   DataTables Premium Dark Glassmorphism Override
   ========================================== */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-secondary) !important;
}

.dataTables_wrapper .dataTables_length select {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    padding: 0.25rem 1.5rem 0.25rem 0.5rem !important;
    outline: none !important;
}

/* Adjust layout alignment for Bootstrap 5 DataTables integration */
div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_info {
    color: var(--text-secondary) !important;
    font-size: 0.85rem;
}

div.dataTables_wrapper div.dataTables_info {
    padding-top: 1.25rem !important;
}

div.dataTables_wrapper div.dataTables_paginate {
    padding-top: 0.75rem !important;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple)) !important;
    border-color: transparent !important;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3) !important;
    color: #ffffff !important;
}

.page-link {
    background-color: rgba(15, 23, 42, 0.4) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    transition: var(--transition-smooth);
    padding: 0.4rem 0.85rem !important;
    margin: 0 2px !important;
    border-radius: 8px !important;
}

.page-link:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.page-item.disabled .page-link {
    background-color: rgba(15, 23, 42, 0.2) !important;
    border-color: var(--border-color) !important;
    color: rgba(148, 163, 184, 0.3) !important;
}

/* Override native table classes with our transparent theme */
table.dataTable {
    border-collapse: collapse !important;
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

table.dataTable.no-footer {
    border-bottom: 1px solid var(--border-color) !important;
}

