/* Custom font for a professional look */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    /* Strict Light Mode Defaults */
    background-color: #f9fafb !important;
    /* gray-50 */
    color: #111827 !important;
    /* gray-900 */
}

/* =========================================
   PRILAGO DESIGN SYSTEM (Professional Grade)
   ========================================= */

/* 1. CONTAINERS */
.page-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

.card {
    background-color: #ffffff !important;
    border: 1px solid #d1d5db;
    /* gray-300 - stronger border */
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.1) !important;
    /* Much stronger shadow - forcing with !important */
    transition: all 0.2s ease-in-out;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.15) !important;
    /* Very prominent hover shadow */
    transform: translateY(-2px);
    /* Slight lift on hover */
}

/* Shadow Utilities */
.shadow-sm {
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.08) !important;
}

.shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.1) !important;
}

.shadow-md {
    box-shadow: 0 6px 10px -2px rgba(0, 0, 0, 0.15), 0 3px 6px -2px rgba(0, 0, 0, 0.12) !important;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -4px rgba(0, 0, 0, 0.15) !important;
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.15) !important;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3) !important;
}

.shadow-none {
    box-shadow: none !important;
}

/* Hover Shadow Utilities */
.hover\:shadow:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.1) !important;
}

.hover\:shadow-md:hover {
    box-shadow: 0 6px 10px -2px rgba(0, 0, 0, 0.15), 0 3px 6px -2px rgba(0, 0, 0, 0.12) !important;
}

.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -4px rgba(0, 0, 0, 0.15) !important;
}


/* 2. DATA TABLES */
.data-table-container {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.data-table {
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    background-color: #f9fafb;
    /* gray-50 */
    color: #6b7280;
    /* gray-500 */
    font-size: 0.75rem;
    /* text-xs */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 24px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    /* gray-200 */
    white-space: nowrap;
}

.data-table td {
    padding: 16px 24px;
    white-space: nowrap;
    border-bottom: 1px solid #f3f4f6;
    /* gray-100 */
    color: #111827;
    /* gray-900 */
    font-size: 0.875rem;
    /* text-sm */
    transition: background-color 0.1s;
}

.data-table tr:hover td {
    background-color: #f9fafb;
    /* gray-50 */
}

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

/* 2b. SCROLL TABLE WRAPPER & PAGINATION */
.scroll-table-wrapper {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.scroll-table-wrapper .scroll-inner {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

/* Custom Scrollbar */
.scroll-table-wrapper .scroll-inner::-webkit-scrollbar {
    height: 12px;
}

.scroll-table-wrapper .scroll-inner::-webkit-scrollbar-track {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.scroll-table-wrapper .scroll-inner::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 6px;
    border: 3px solid #f8fafc;
}

.scroll-table-wrapper .scroll-inner::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* Intelligent Scroll Indication: Right Gradient Overlay */
.scroll-table-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 56px; /* Height of pagination bar */
    width: 48px;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

/* Hide gradient when scrolled to end */
.scroll-table-wrapper.scrolled-end::after {
    opacity: 0;
}

/* Pagination Bar - Professional Single-Line Layout */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
    flex-wrap: nowrap;
    min-height: 56px;
    box-sizing: border-box;
    width: 100%;
}

.pagination-bar .pagination-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.pagination-bar .pagination-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.pagination-bar select {
    padding: 4px 24px 4px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    background-color: white;
    color: #1e293b;
    cursor: pointer;
    height: 32px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.pagination-bar select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

.pagination-bar .pagination-info {
    color: #64748b;
    font-size: 13px;
    margin-left: 8px;
}

/* Page Buttons */
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-btn:hover:not(:disabled):not(.active) {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8fafc;
    border-color: #e2e8f0;
}

.page-btn.active {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3);
}

.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #94a3b8;
    font-size: 14px;
}


/* 3. FORMS & INPUTS */
.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    /* gray-700 */
    margin-bottom: 6px;
}

.input-field {
    display: block;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    /* gray-300 */
    padding: 10px 14px;
    font-size: 0.875rem;
    color: #111827;
    /* gray-900 */
    background-color: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.input-field:focus {
    outline: none;
    border-color: #3b82f6;
    /* blue-500 */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    /* blue-500 ring */
}

.input-field:disabled {
    background-color: #f3f4f6;
    /* gray-100 */
    color: #6b7280;
    /* gray-500 */
    cursor: not-allowed;
}

/* Checkboxes & Radios */
.checkbox-input {
    height: 16px;
    width: 16px;
    color: #3b82f6;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    cursor: pointer;
}

.checkbox-input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 4. BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

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

.btn-primary {
    background-color: #2563eb;
    /* blue-600 */
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    /* blue-700 */
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background-color: #ffffff;
    color: #374151;
    /* gray-700 */
    border-color: #d1d5db;
    /* gray-300 */
}

.btn-secondary:hover {
    background-color: #f9fafb;
    /* gray-50 */
    border-color: #9ca3af;
    /* gray-400 */
}

.btn-danger {
    background-color: #ef4444;
    /* red-500 */
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    /* red-600 */
}

/* 5. BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    /* text-xs */
    font-weight: 500;
}

.badge-blue {
    background-color: #eff6ff;
    color: #1e40af;
}

/* blue-50/blue-800 */
.badge-green {
    background-color: #f0fdf4;
    color: #166534;
}

/* green-50/green-800 */
.badge-gray {
    background-color: #f3f4f6;
    color: #374151;
}

/* gray-100/gray-700 */
.badge-red {
    background-color: #fef2f2;
    color: #991b1b;
}

/* red-50/red-800 */
.badge-yellow {
    background-color: #fefce8;
    color: #854d0e;
}

/* yellow-50/yellow-800 */

/* 6. TYPOGRAPHY */
.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.5rem;
    /* 24px */
    font-weight: 700;
    color: #111827;
    /* gray-900 */
    letter-spacing: -0.025em;
}

.section-title {
    font-size: 1.125rem;
    /* 18px */
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

/* 7. UTILITIES */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Kanban Board Styles */
.kanban-column {
    min-width: 280px;
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    height: fit-content;
}

.kanban-card {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    cursor: grab;
}

.kanban-card:active {
    cursor: grabbing;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease-in-out;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

/* Loading Spinner */
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =========================================
   ADMIN LAYOUT
   ========================================= */
.sidebar {
    width: 260px;
    background-color: #111827;
    /* gray-900 */
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    border-right: 1px solid #1f2937;
}

.brand {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    border-bottom: 1px solid #1f2937;
}

.brand-icon {
    margin-right: 10px;
    color: #3b82f6;
    /* blue-500 */
}

.nav-section {
    padding: 24px 16px;
    border-bottom: 1px solid #1f2937;
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #9ca3af;
    /* gray-400 */
    margin-bottom: 12px;
    padding-left: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #d1d5db;
    /* gray-300 */
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
    margin-bottom: 4px;
}

.nav-item:hover {
    background-color: #374151;
    /* gray-700 */
    color: white;
}

.nav-item.active {
    background-color: #2563eb;
    /* blue-600 */
    color: white;
}

.nav-item i {
    width: 24px;
    text-align: center;
    margin-right: 8px;
}

/* Admin Main Content Wrapper */
.admin-main {
    margin-left: 260px;
    padding: 24px 32px;
    min-height: 100vh;
    background-color: #f9fafb;
    /* gray-50 */
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

/* 8. AVATAR & UTILITIES */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    background-color: #3b82f6;
    /* blue-500 */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.avatar:hover {
    box-shadow: 0 0 0 3px #93c5fd;
    /* ring-blue-300 */
}

/* Semantic Text Colors */
.text-success {
    color: #166534 !important;
}

/* green-800 */
.text-danger {
    color: #dc2626 !important;
}

/* red-600 */
.text-warning {
    color: #b45309 !important;
}

/* yellow-700 */
.text-muted {
    color: #6b7280 !important;
}

/* gray-500 */
.text-primary {
    color: #2563eb !important;
}

/* blue-600 */

.bg-muted {
    background-color: #f9fafb !important;
}

/* gray-50 */
/* 9. PROGRESS BARS */
.progress-container {
    width: 100%;
    background-color: #f3f4f6;
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease-in-out;
}

.progress-bar-primary {
    background-color: #3b82f6;
}

.progress-bar-success {
    background-color: #166534;
}

/* 10. UTILITY CLASSES */

/* Text Alignment */
.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.text-left {
    text-align: left !important;
}

/* Font Utilities */
.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

.font-semibold {
    font-weight: 600 !important;
}

.font-medium {
    font-weight: 500 !important;
}

.font-bold {
    font-weight: 700 !important;
}

/* Text Colors - Slate/Gray Palette */
.text-slate-400 {
    color: #94a3b8 !important;
}

.text-slate-500 {
    color: #64748b !important;
}

.text-slate-600 {
    color: #475569 !important;
}

.text-gray-900 {
    color: #1e293b !important;
}

/* Text Overflow */
.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 11. NAVIGATION */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: #111827;
    background-color: #f9fafb;
}

.nav-link-active {
    background-color: #eff6ff;
    color: #1d4ed8;
    border-color: #dbeafe;
}

/* 12. KANBAN COLUMNS */
.kanban-column {
    flex: 1;
    min-width: 250px;
    background-color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #f3f4f6;
}

/* 13. LOADING STATES */
.loading-row {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

.error-row {
    text-align: center;
    padding: 1.25rem;
    color: #ef4444;
}