/* ACS - Actual Count System Custom Styles */
/* Industrial-grade styling for Grasberg Block Cave Rail */

:root {
    --accent: #F59E0B;
    --primary-dark: #1E3A8A;
    --success-custom: #10B981;
    --warning-custom: #F59E0B;
    --error-custom: #EF4444;
    --neutral-light: #F1F5F9;
    --neutral-medium: #E2E8F0;
    --neutral-dark: #94A3B8;
}

/* Global Styles */
body {
    font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--neutral-light);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #3B82F6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
}

.loading-content {
    text-align: center;
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #3B82F6 100%);
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.demo-accounts {
    background-color: var(--neutral-light);
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid var(--neutral-medium);
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 56px; /* Height of navbar */
    left: 0;
    width: 280px;
    height: calc(100vh - 56px);
    background: #fff;
    border-right: 1px solid #dee2e6;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem 1rem 1rem;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

.sidebar-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

.sidebar-body {
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin: 0 0 0.5rem 1rem;
    padding: 0;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #495057;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
    padding-left: 1.5rem;
}

.sidebar .nav-link.active {
    background-color: #e7f1ff;
    color: #0d6efd;
    border-right: 3px solid #0d6efd;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* Main Content Adjustment */
.main-content {
    margin-left: 280px;
    padding: 1.5rem;
    padding-top: calc(56px + 1.5rem); /* Navbar height + padding */
    min-height: 100vh;
    background: #f8f9fa;
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding-top: calc(56px + 1rem);
    }
}

/* Offcanvas Mobile Sidebar Styles */
.offcanvas .nav-section {
    margin-bottom: 1.5rem;
}

.offcanvas .nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin: 0 0 0.5rem 0;
    padding: 0 1rem;
}

.offcanvas .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #495057;
    text-decoration: none;
    border-radius: 0.375rem;
    margin: 0 1rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.offcanvas .nav-link:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.offcanvas .nav-link.active {
    background-color: #e7f1ff;
    color: #0d6efd;
}

.offcanvas .nav-link i {
    width: 20px;
    text-align: center;
}

/* Main Content */
#app {
    min-height: 100vh;
}

/* Cards and Components */
.card {
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-kpi {
    min-height: 110px;
    transition: transform 0.2s ease-in-out;
}

.card-kpi:hover {
    transform: translateY(-2px);
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--neutral-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status Badges */
.status-badge {
    min-width: 110px;
    font-weight: 500;
}

.badge-available {
    background-color: var(--success-custom);
}

.badge-not-available {
    background-color: var(--error-custom);
}

.badge-pending {
    background-color: var(--warning-custom);
}

.badge-approved {
    background-color: var(--success-custom);
}

.badge-rejected {
    background-color: var(--error-custom);
}

.badge-role {
    text-transform: capitalize;
}

/* Tables */
.table thead th {
    white-space: nowrap;
    background-color: var(--primary-dark);
    color: white;
    border: none;
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: rgba(30, 58, 138, 0.05);
}

/* List Groups - Remove all borders and shadows for cleaner look */
.list-group {
    box-shadow: none !important;
}

.list-group-flush .list-group-item {
    border: none !important;
    border-radius: 0;
}

.list-group-item {
    background-color: transparent;
    border: none !important;
}

.list-group-item:first-child {
    border-top: none !important;
}

.list-group-item:last-child {
    border-bottom: none !important;
}

/* Add subtle hover effect for list items */
.list-group-item:hover {
    background-color: rgba(30, 58, 138, 0.03);
}

/* Active state for list group items */
.list-group-item-action.active {
    background-color: #0d6efd !important;
    color: white !important;
    border-color: #0d6efd !important;
}

.list-group-item-action.active:hover {
    background-color: #0b5ed7 !important;
    color: white !important;
}

/* Material Code Styling */
.material-code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-dark);
}

/* Search and Filters */
.search-container {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

/* Action Buttons */
.btn-action {
    min-width: 100px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 767px) {
    .table-responsive-stack {
        display: block;
    }
    
    .table-responsive-stack thead {
        display: none;
    }
    
    .table-responsive-stack tbody,
    .table-responsive-stack tr,
    .table-responsive-stack td {
        display: block;
        width: 100%;
    }
    
    .table-responsive-stack tr {
        border: 1px solid var(--neutral-medium);
        border-radius: 0.5rem;
        margin-bottom: 1rem;
        padding: 1rem;
        background-color: white;
    }
    
    .table-responsive-stack td {
        border: none;
        padding: 0.25rem 0;
        text-align: left !important;
    }
    
    .table-responsive-stack td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        width: 40%;
        display: inline-block;
    }
    
    .table-responsive-stack td[data-label] {
        font-weight: 600;
        width: 40%;
    }
    
    .kpi-value {
        font-size: 1.5rem;
    }
    
    .card-kpi {
        min-height: 90px;
        margin-bottom: 1rem;
    }
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Form Enhancements */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-dark);
}

/* Request Form Steps */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--neutral-medium);
    color: var(--neutral-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin: 0 0.5rem;
    position: relative;
}

.step.active {
    background-color: var(--primary-dark);
    color: white;
}

.step.completed {
    background-color: var(--success-custom);
    color: white;
}

.step:not(:last-child):after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 1rem;
    height: 2px;
    background-color: var(--neutral-medium);
    transform: translateY(-50%);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Utility Classes */
.text-monospace {
    font-family: 'Courier New', monospace;
}

.cursor-pointer {
    cursor: pointer;
}

.border-start-accent {
    border-left: 4px solid var(--accent) !important;
}

/* Material Cards */
.material-card {
    transition: all 0.2s ease;
    border: 1px solid var(--bs-border-color);
}

.material-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-dark);
}

.material-card.border-primary {
    border-color: var(--primary-dark) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-dark), 0.25);
}

/* Chart Containers */
.chart-container {
    min-height: 200px;
}

.category-chart .progress {
    height: 6px;
}

/* Alert Sizes */
.alert-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Badge Sizes */
.badge-sm {
    font-size: 0.75em;
}

/* Print Styles */
@media print {
    .navbar, .btn, .toast-container {
        display: none !important;
    }

    .container-fluid {
        padding: 0 !important;
    }
}
