/* Import Inter Font - Local */
@import url('../fonts/inter-font/inter.css');

/* Global Form Field Border Enhancement */
.form-control,
.form-select {
    border-color: #ced4da !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Table Container with Inline Scrolling - Global Styles */
/* Base styles shared by all table containers */
.table-container,
.table-container-sm,
.table-container-md,
.table-container-lg,
.table-container-xl {
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

/* Sticky header for all variants */
.table-container thead th,
.table-container-sm thead th,
.table-container-md thead th,
.table-container-lg thead th,
.table-container-xl thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Custom thin scrollbar for all table variants */
.table-container::-webkit-scrollbar,
.table-container-sm::-webkit-scrollbar,
.table-container-md::-webkit-scrollbar,
.table-container-lg::-webkit-scrollbar,
.table-container-xl::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-container::-webkit-scrollbar-track,
.table-container-sm::-webkit-scrollbar-track,
.table-container-md::-webkit-scrollbar-track,
.table-container-lg::-webkit-scrollbar-track,
.table-container-xl::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb,
.table-container-sm::-webkit-scrollbar-thumb,
.table-container-md::-webkit-scrollbar-thumb,
.table-container-lg::-webkit-scrollbar-thumb,
.table-container-xl::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover,
.table-container-sm::-webkit-scrollbar-thumb:hover,
.table-container-md::-webkit-scrollbar-thumb:hover,
.table-container-lg::-webkit-scrollbar-thumb:hover,
.table-container-xl::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* Height variants */
.table-container-sm {
    max-height: 400px; /* Small tables */
}

.table-container-md {
    max-height: 550px; /* Medium tables (default) */
}

.table-container {
    max-height: 550px; /* Default fallback */
}

.table-container-lg {
    max-height: 700px; /* Large tables */
}

.table-container-xl {
    max-height: calc(100vh - 380px); /* Extra large - adaptive to viewport */
}

/* General Styles */
html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container-fluid {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

/* Dashboard Cards */
.dashboard-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 10px;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.dashboard-card .card-header {
    padding: 1rem;
    font-weight: bold;
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

.dashboard-card .icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.dashboard-card .count {
    font-size: 2rem;
    font-weight: bold;
}

/* Status Badges */
.status-badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    border-radius: 50px;
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
}

/* Global text wrapping for all table cells - prevents overflow */
.table td {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 500px; /* Prevent any column from becoming too wide */
}

/* Allow specific tables to opt-in for compact columns */
.table .compact-col {
    white-space: nowrap;
    width: auto;
    max-width: none;
}

/* Form Styles */
.form-control:focus, .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

label {
    font-weight: 500;
}

.required:after {
    content: " *";
    color: red;
}

/* Item Table in Requisition Form */
.item-table th {
    background-color: #f8f9fa;
}

.item-table .btn-remove {
    color: #dc3545;
    cursor: pointer;
}

/* Notification Styles */
.notification-item {
    border-left: 4px solid #6c757d;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    border-left-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
}

.notification-item .notification-time {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 3rem auto;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 4rem;
    color: #007bff;
}

/* Item Details Modal */
.item-image-container {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.item-image-container img {
    max-height: 180px;
    max-width: 100%;
}

/* Audit History Modal Size */
#auditHistoryModal .modal-dialog {
    max-height: 70vh;
    margin-top: 5vh;
}

#auditHistoryModal .modal-content {
    max-height: 70vh;
}

/* Custom Thin Scrollbar - Global */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* Firefox thin scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* Print Styles */
@media print {
    .no-print, .no-print * {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    body {
        padding: 0;
        margin: 0;
    }
    
    .container-fluid {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
} 
