/**
 * Loan System - Main Stylesheet
 * Modern shopping cart style interface for equipments loan system
 */

/* ============================================
   Global Styles
   ============================================ */
:root {
    --sidebar-width: 250px;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #52c234 0%, #2dd4bf 100%);
    --staff-gradient: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    --primary-color: #667eea;
    --danger-color: #ff4757;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    padding-top: 120px;
}

/* ============================================
   Header Styles
   ============================================ */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    gap: 0;
    background: white;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.lang-btn {
    padding: 8px 20px;
    border: none;
    background: white;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.lang-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    @page {
        size: A4;
        margin: 5mm;
    }
    
    .no-print,
    .language-switcher {
        display: none !important;
    }
    
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        padding-top: 0;
        background: white;
        margin: 0;
        font-size: 11pt;
    }
    
    .success-container {
        box-shadow: none !important;
        margin: 0;
        padding: 5px;
        max-width: 100%;
        border: none;
    }
    
    .success-header {
        border-bottom: 2px solid #333;
        padding-bottom: 8px;
        margin-bottom: 12px;
        box-shadow: none !important;
    }
    
    .success-header h2 {
        font-size: 20pt;
        margin-bottom: 5px;
    }
    
    .success-header p {
        font-size: 11pt;
    }
    
    .success-icon {
        font-size: 40px;
        margin-bottom: 8px;
    }
    
    .success-body {
        padding: 0;
    }
    
    .form-number {
        page-break-inside: avoid;
        margin-bottom: 12px;
        box-shadow: none !important;
        border: 1px solid #ddd;
        padding: 10px;
    }
    
    .form-number-label {
        font-size: 10pt;
        margin-bottom: 5px;
    }
    
    .form-number-value {
        font-size: 18pt;
        margin-bottom: 8px;
    }
    
    #qrcode {
        margin: 8px auto !important;
    }
    
    #qrcode canvas,
    #qrcode img {
        max-width: 150px !important;
        max-height: 150px !important;
        width: 150px !important;
        height: 150px !important;
    }
    
    .alert-info-custom {
        padding: 8px;
        margin-top: 8px;
        font-size: 10pt;
        page-break-inside: avoid;
        box-shadow: none !important;
    }
    
    .info-list {
        margin-top: 12px;
        page-break-inside: avoid;
    }
    
    .info-list ul {
        margin-bottom: 8px;
    }
    
    .info-list li {
        font-size: 10pt;
        margin-bottom: 6px;
        page-break-inside: avoid;
    }
    
    .text-center.mt-4 {
        margin-top: 12px !important;
        font-size: 9pt;
        page-break-inside: avoid;
    }
    
    .action-buttons {
        display: none !important;
    }
}

.top-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.hold-header {
    background: var(--staff-gradient);
}

.outage-header {
    background: var(--staff-gradient);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 8px;
    padding: 4px;
}

/* ============================================
   Staff Info Display
   ============================================ */
.staff-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 500;
}

.staff-info i {
    font-size: 1.2rem;
}

.staff-name {
    font-size: 0.95rem;
}

/* ============================================
   Cart Button in Header
   ============================================ */
.cart-btn {
    position: relative;
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cart-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.cart-btn-highlight {
    background: white !important;
    color: var(--primary-color) !important;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

.cart-btn-highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.date-btn-highlight {
    border: 2px solid rgb(102, 126, 234) !important;
    animation: blue_pulse 2s infinite;
}

.date-btn-highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

@keyframes yellow_pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 196, 0, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 196, 0, 0);
    }
}

@keyframes blue_pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.back-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.back-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ============================================
   Sidebar Styles
   ============================================ */
.sidebar {
    position: fixed;
    top: 88px;
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - 88px);
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    padding: 1.5rem 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar h5 {
    padding: 0 1.5rem;
    color: #495057;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.category-group {
    margin-bottom: 0.5rem;
}

.category-item {
    padding: 0.75rem 1.5rem;
    color: #495057;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.category-label {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.category-tc {
    font-weight: 500;
}

.category-en {
    font-size: 0.85em;
    opacity: 0.8;
}

.category-item:hover, 
.category-item.active {
    background: #d4d6d7;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.category-main {
    font-weight: 600;
    background: #f8f9fa;
}

.category-sub-items {
    display: block;
}

.category-sub {
    padding-left: 3rem;
    font-size: 0.9rem;
}

/* ============================================
   Main Content Area
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

/* ============================================
   Date Picker Section
   ============================================ */
.date-picker-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.date-input-group {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.date-input-group .form-group {
    flex: 1;
}

/* ============================================
   Equipment Card Styles
   ============================================ */
.equipments-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.equipments-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.equipments-img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    background: white;
}

.equipments-body {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.equipments-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.equipments-meta {
    margin-bottom: 0.5rem;
}

.equipments-meta .badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.7rem;
}

.equipments-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.equipments-categories .badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.35rem 0.65rem;
}

.equipments-description {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.equipments-description:hover {
    color: #495057;
}

.equipments-description.expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

.equipments-id {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.equipments-actions {
    margin-top: auto;
}

.btn-add {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.625rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-add:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-add:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.btn-remove {
    width: 100%;
    background: var(--danger-color);
    border: none;
    color: white;
    padding: 0.625rem;
    border-radius: 8px;
    font-weight: 500;
}

.btn-remove:hover {
    background: #ff3838;
}

/* ============================================
   Cart Page Styles
   ============================================ */
.cart-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.cart-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f3f5;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: #e9ecef;
}

.item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1rem;
    background: var(--primary-gradient);
}

.item-details {
    flex-grow: 1;
}

.item-title {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 0.25rem;
}

.item-id {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.item-description {
    font-size: 0.85rem;
    color: #868e96;
    line-height: 1.5;
}

.btn-remove-item {
    background: var(--danger-color);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-remove-item:hover {
    background: #ff3838;
    transform: scale(1.05);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #495057;
}

.info-value {
    color: #6c757d;
}

.form-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.submit-section {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.btn-submit {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.875rem 2.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-cancel {
    background: #e9ecef;
    border: none;
    color: #495057;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
}

.btn-cancel:hover {
    background: #dee2e6;
}

/* ============================================
   Success Page Styles
   ============================================ */
body.success-page {
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.success-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 100%;
    margin-top: 80px;
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

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

.success-header {
    background: var(--success-gradient);
    color: white;
    padding: 2rem 2rem;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: scaleIn 0.5s ease 0.3s both;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-icon i {
    font-size: 3rem;
    color: #52c234;
}

.success-body {
    padding: 2.5rem 2rem;
}

.form-number {
    background: #f8f9fa;
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-number-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-number-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.info-list {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

.info-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary-custom {
    flex: 1;
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary-custom {
    flex: 1;
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background: #f8f9fa;
}

.btn-success-custom {
    flex: 1;
    background: linear-gradient(135deg, #52c234 0%, #2dd4bf 100%);
    border: none;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-success-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(82, 194, 52, 0.4);
}

.alert-info-custom {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.alert-info-custom i {
    color: #2196f3;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* ============================================
   Empty States
   ============================================ */
.empty-state,
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    color: #ffffff;
}

.empty-state i,
.empty-cart i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.empty-cart i {
    font-size: 5rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

.cart-container .spinner-overlay {
    background: rgba(0,0,0,0.7);
    flex-direction: column;
    color: white;
}

.cart-container .spinner-overlay .spinner-border {
    margin-bottom: 1rem;
}

/* ============================================
   Outage Management System Styles
   ============================================ */
.outage-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 0;
}

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.stat-card i {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-success i { color: #28a745; }
.stat-danger i { color: #dc3545; }
.stat-info i { color: #17a2b8; }
.stat-purple i { color: #6f42c1; }
.stat-warning i { color: #ffc107; }

/* Tabs */
.outage-tabs {
    border: none;
    border-radius: 12px 12px 0 0;
    padding: 0.5rem 0.5rem 0;
    gap: 0.25rem;
}

.outage-tabs .nav-link {
    border: none;
    border-radius: 8px 8px 0 0;
    color: #6c757d;
    background: #f8f9fa;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: none;
}

.outage-tabs .nav-link:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.outage-tabs .nav-link.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: inset 0 -4px 0 #ffffff;
}

.outage-tabs .nav-link .badge {
    margin-left: 0.5rem;
}

.outage-tabs .nav-link.active .badge {
    background: rgba(255,255,255,0.3) !important;
}

/* Tab Content */
.outage-tab-content {
    background: white;
    border-radius: 0 0 12px 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-height: 400px;
}

.tab-header {
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #f1f3f5;
}

.tab-header h5 {
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.tab-header p {
    color: #ffffff !important;
}

.past-record-header h5 {
    color: #414141 !important;
}

.past-record-header p {
    color: #414141 !important;
}

/* Form Cards */
.outage-form-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.outage-form-header {
    background: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e9ecef;
}

.outage-form-header .badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

.user-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin: 0 1rem;
}

.user-link:hover {
    text-decoration: underline;
}

.outage-form-body {
    background-color: #ffffff;
    padding: 1rem;
}

/* Item Cards */
.outage-item-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.outage-item-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transform: translateX(4px);
}

.outage-item-card .form-check {
    flex-shrink: 0;
}

.outage-item-card .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.outage-item-img {
    width: 120px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
}

.outage-item-details {
    flex-grow: 1;
}

.outage-item-title {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 0.25rem;
}

.outage-item-meta {
    color: #6c757d;
    font-size: 0.875rem;
}

.outage-item-card .badge {
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
}

/* Action Panel */
.action-panel {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    padding: 1.5rem;
    min-width: 300px;
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

.action-panel-content h5 {
    color: var(--primary-color);
}

/* Badge Colors */
.bg-purple {
    background-color: #6f42c1 !important;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    /* Reset body padding for mobile */
    body {
        padding-top: 70px;
    }

    /* Outage page needs more padding due to taller header */
    body:has(.outage-header) {
        padding-top: 120px;
    }

    /* Header adjustments */
    .top-header {
        padding: 0.75rem 0;
    }

    .top-header .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .logo-section {
        gap: 0.5rem;
    }

    .logo-section h4 {
        font-size: 0.6rem;
        line-height: 1.2;
    }

    .logo-section small {
        font-size: 0.7rem;
    }

    /* Hide second small tag in logo section */
    .logo-section small:nth-of-type(2) {
        display: none;
    }

    .logo-img {
        width: 36px;
        height: 36px;
    }

    /* Hide desktop buttons, show mobile menu */
    .top-header .btn-group {
        display: flex !important;
        gap: 0;
    }
    
    .top-header .btn-group .btn {
        font-size: 0.75rem;
        padding: 0.1rem 0.2rem;
        
    }
    
    /* Hide active language button on mobile to save space */
    .top-header .btn-group .btn.active {
        display: none !important;
    }

    .top-header .btn-group .btn.inactive {
        border-radius: 4px;
    }

    .mobile-menu-btn {
        display: block !important;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .mobile-upper-right-btns {
        gap: 1rem !important;
    }

    /* Hide logo image on mobile */
    .logo-img {
        display: none !important;
    }

    .logo-section {
        gap: 0 !important;
    }

    .cart-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .cart-badge {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
        top: -6px;
        right: -6px;
    }

    .back-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0 !important;
        min-width: auto;
    }

    .back-btn i {
        font-size: 1.2rem !important;
        margin: 0;
    }

    .back-btn br {
        display: none;
    }

    /* Sidebar mobile behavior */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
        top: 70px;
        height: calc(100vh - 70px);
        z-index: 1001;
        box-shadow: 4px 0 15px rgba(0,0,0,0.2);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    /* Sidebar overlay */
    .sidebar.show::before {
        content: '';
        position: fixed;
        top: 70px;
        left: 280px;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: -1;
    }

    /* Main content full width on mobile */
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    /* Date picker section */
    .date-picker-section {
        padding: 1rem;
        margin-bottom: 1rem;
        transition: all 0.3s ease;
    }

    .date-picker-section.collapsed {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }

    /* Hide toggle button by default */
    .date-picker-toggle.collapsed-btn {
        display: none !important;
    }

    .date-picker-section.collapsed .date-picker-toggle.collapsed-btn {
        display: block !important;
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    /* Hide close button on desktop */
    /* Hide close button on desktop */
    .date-picker-hide-btn {
        display: none;
    }

    @media (max-width: 768px) {
        /* On mobile, allow JavaScript to control visibility */
        .date-picker-hide-btn {
            padding: 0.4rem 0.8rem;
            font-size: 0.85rem;
        }
        
        .date-picker-section.collapsed .date-picker-hide-btn {
            display: none !important;
        }
    }

    .date-picker-form {
        display: block;
    }

    .date-picker-section.collapsed .date-picker-form {
        display: none !important;
    }

    .date-picker-section h5 {
        font-size: 1rem;
        margin-bottom: 1rem !important;
    }

    .date-picker-section > .row {
        gap: 0;
        row-gap: 0.75rem;
    }

    .date-picker-section .col-md-5 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        margin-bottom: 0;
    }

    .date-picker-section .col-md-2 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        margin-top: 0.5rem;
    }

    .date-picker-section .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
        font-weight: 600;
    }

    .date-picker-section .col-md-5 > .row {
        display: flex;
        gap: 0.5rem;
        margin: 0;
    }

    .date-picker-section .col-md-5 > .row > .col-6 {
        flex: 1;
        padding: 0;
    }

    .date-picker-section .form-control {
        font-size: 0.875rem;
        padding: 0.5rem;
    }

    .date-picker-section button {
        margin-top: 0;
    }

    /* Search section */
    #searchSection {
        padding: 0 0.5rem;
    }

    #searchSection h5 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    #searchSection > div {
        flex-direction: column;
        align-items: stretch !important;
    }

    #searchSection input[type="text"] {
        width: 100% !important;
    }

    /* Equipment grid */
    #equipmentGrid {
        padding: 0;
    }

    #equipmentGrid .row {
        margin: 0;
    }

    #equipmentGrid .col-md-4,
    #equipmentGrid .col-lg-3 {
        padding: 0.5rem;
    }

    /* Equipment cards */
    .equipments-card {
        margin-bottom: 0.5rem;
    }

    .equipments-img {
        height: 150px;
    }

    .equipments-body {
        padding: 0.5rem;
    }

    .equipments-title {
        font-size: 0.7rem;
    }

    .equipments-description {
        font-size: 0.6rem;
        margin-bottom: 0;
    }

    .equipments-meta .badge {
        font-size: 0.5rem;
        padding: 0.3rem 0.5rem;
    }

    .btn-add {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .equipments-categories {
        gap: 0.1rem;
        margin-bottom: 0.5rem;
    }

    .equipments-categories .badge {
        font-size: 0.4rem;
        padding: 0.4rem 0.4rem;
    }

    /* Cart page */
    .cart-container {
        padding: 0 0.5rem;
        margin: 0.5rem auto;
    }

    .cart-section {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        border-radius: 8px;
    }

    .section-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .section-title .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .section-title i {
        font-size: 1rem;
    }

    /* Alert compact on mobile */
    .alert {
        padding: 0.5rem;
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .alert i {
        display: none;
    }

    .alert strong {
        display: block;
        margin-bottom: 0.25rem;
    }

    /* Cart items compact */
    .cart-item {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
        flex-direction: row;
        gap: 0.5rem;
    }

    .item-img {
        width: 50px;
        height: 50px;
        margin-right: 0;
        flex-shrink: 0;
    }

    .item-details {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .item-title {
        font-size: 0.9rem;
        margin-bottom: 0.15rem;
    }

    .item-id {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .item-description {
        font-size: 0.75rem;
    }

    .item-details .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    /* Staff info alert */
    .alert-info.d-flex {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .alert-info i.fs-4 {
        font-size: 1.2rem !important;
    }

    .alert-info strong {
        font-size: 0.85rem;
        display: inline;
    }

    /* Submit section compact */
    .submit-section {
        display: flex;
        gap: 0.5rem;
        flex-direction: column;
    }

    .submit-section .btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .submit-section .btn i {
        font-size: 1rem;
    }

    .item-details{
        margin: 0 1rem;
    }
    
    .btn-remove-item {
        padding: 0.6rem 0;
        font-size: 0;
        width: auto;
        min-width: 40px;
    }
    
    .btn-remove-item i {
        font-size: 1.3rem;
    }

    .item-img {
        width: 60px;
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .item-details {
        width: 100%;
        margin-bottom: 1rem;
    }

    .cart-item {
        padding-bottom: 0;
    }

    .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .submit-section {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
        padding: 0.75rem;
    }

    .alert-warning {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .submit-section .btn-cancel {
        display: none;
    }

    /* Success page - Highly compressed for one screen display */
    .success-container {
        margin-top: 40px;
        padding: 0;
    }

    .success-header {
        padding: 0.5rem 0.5rem;
    }
    
    .success-header h2 {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }
    
    .success-header p {
        font-size: 0.7rem;
        margin-bottom: 0.2rem;
    }

    .success-icon {
        width: 35px;
        height: 35px;
        margin-bottom: 0.3rem;
    }

    .success-icon i {
        font-size: 1.2rem;
    }

    .success-body {
        padding: 0.5rem 0.5rem;
    }
    
    .form-number {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .form-number-label {
        font-size: 0.65rem;
        margin-bottom: 0.2rem;
    }
    
    .form-number-value {
        font-size: 1.3rem;
    }
    
    #qrcode {
        margin: 0.3rem auto !important;
    }
    
    #qrcode canvas,
    #qrcode img {
        max-width: 100px !important;
        max-height: 100px !important;
        width: 100px !important;
        height: 100px !important;
    }
    
    .info-list {
        padding: 0.4rem 0.5rem;
        margin: 0.5rem 0;
    }
    
    .info-list li {
        padding: 0.3rem 0;
        font-size: 0.7rem;
    }
    
    .alert-info-custom {
        padding: 0.4rem;
        margin-top: 0.5rem;
        font-size: 0.7rem;
    }
    
    .action-buttons {
        margin-top: 0.5rem;
        gap: 0.4rem;
    }
    
    .btn-primary-custom,
    .btn-secondary-custom,
    .btn-success-custom {
        padding: 0.5rem;
        font-size: 0;
        min-width: 50px;
    }
    
    .btn-primary-custom i,
    .btn-secondary-custom i,
    .btn-success-custom i {
        font-size: 1.2rem;
    }

    /* Outage page adjustments */
    .outage-container {
        padding: 0 0.5rem;
    }

    .outage-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .outage-tabs .nav {
        flex-wrap: nowrap;
        min-width: max-content;
    }

    .outage-tabs .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }
    .stat-card {
        padding: 1rem;
    }

    .stat-card i {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .tab-header {
        padding-top: 0.5rem;
    }

    .action-panel {
        position: fixed;
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        min-width: auto;
        max-width: none;
    }

    .outage-item-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .outage-item-img {
        width: 100%;
        height: 150px;
    }

    .outage-form-card {
        margin-bottom: 0.75rem;
    }

    /* Compact form card on mobile */
    .outage-form-header {
        padding: 0.5rem 0.75rem;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .outage-form-header > div:first-child {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        align-items: center;
    }


    /* Force date info to new line on mobile */
    .outage-form-header .text-muted {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 0.25rem;
        display: block;
    }

    .outage-form-header h5 {
        font-size: 0.9rem;
        margin: 0;
    }

    .outage-form-header .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    /* Hide item count badge on mobile */
    .outage-form-header .badge.bg-light {
        display: none;
    }

    .user-link {
        font-size: 0.85rem;
        margin: 0 0.5rem;
    }

    .outage-form-body {
        padding: 0.5rem;
    }

    /* Ultra compact item cards */
    .outage-item-card {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
        gap: 0.5rem;
        flex-direction: row;
        align-items: flex-start;
    }

    .outage-item-card .form-check {
        margin-top: 0.25rem;
    }

    .outage-item-card .form-check-input {
        width: 1rem;
        height: 1rem;
    }

    /* Much smaller images */
    .outage-item-img {
        width: 60px;
        height: 45px;
        flex-shrink: 0;
    }

    .outage-item-details {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .outage-item-title {
        font-size: 0.85rem;
        margin-bottom: 0.15rem;
        line-height: 1.2;
    }

    .outage-item-meta {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .outage-item-card .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        white-space: nowrap;
    }

    /* Compact date display */
    .outage-form-header small,
    .outage-item-meta small {
        font-size: 0.7rem;
    }

    .main-section-container .tab-content {
        padding: 0 0.5rem !important;
    }

    /* Hide text on small buttons */
    .cart-btn span:not(.cart-badge) {
        display: none;
    }

    .mobile-menu-btn span {
        display: none;
    }

    /* Show only icons on mobile for header buttons */
    .cart-btn i,
    .mobile-menu-btn i {
        margin: 0;
    }

    .cart-btn {
        border-radius: 8px;
    }

    .cart-btn:hover {
        color: white;
        background: rgba(255,255,255,0.2);
        border: 2px solid white;
        
    }

    /* Outage page mobile optimizations */
    .outage-header .logo-section h4 {
        font-size: 0.85rem;
    }

    .outage-header .logo-section small {
        font-size: 0.65rem;
    }

    .outage-header .staff-info {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .outage-header .staff-info i {
        font-size: 1rem;
    }

    .outage-header .back-btn {
        padding: 0.3rem 1.7rem;
        font-size: 0;
        min-width: auto;
        white-space: nowrap;
    }

    .outage-header .back-btn i {
        font-size: 1.2rem;
        margin: 0;
    }

    .outage-header .back-btn br {
        display: none;
    }

    .outage-header .d-flex.gap-2 {
        gap: 0.5rem !important;
    }

    /* Compact header layout */
    .outage-header .container-fluid > .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }

    .outage-header .d-flex.align-items-center.gap-3 {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem !important;
    }

    /* Stats cards mobile - ultra compact */
    .stat-card {
        padding: 0.4rem 0.3rem;
        min-height: auto;
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
        justify-content: center;
    }

    /* Keep icons on mobile - centered */
    .stat-card i {
        font-size: 1.3rem;
        display: block;
        margin: 0 auto;
    }

    .stat-card > div {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.1rem;
        width: 100%;
    }

    .stat-number {
        font-size: 1rem;
        font-weight: 700;
        line-height: 1;
    }

    /* Hide text labels on mobile */
    .stat-label {
        display: none;
    }

    /* Stats overview layout - 5 columns in one row, search bar separate */
    .row.g-3.mb-4 > .col-md {
        flex: 0 0 auto;
        width: 20%; /* 5 items = 20% each */
    }

    /* Search bar takes full width on separate row */
    .row.g-3.mb-4 > .col-md:last-child {
        width: 100%;
        margin-top: 0.4rem;
    }

    .row.g-3.mb-4 > .col-md:last-child .stat-card {
        flex-direction: row;
        padding: 0.5rem 0.75rem;
        justify-content: flex-start;
        text-align: left;
    }

    .row.g-3.mb-4 > .col-md:last-child .stat-card i {
        margin: 0;
    }

    /* Search box in stat card */
    .stat-card .searchBox {
        width: 100% !important;
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }

    /* Main tabs mobile - icon only with badge */
    .main-section-container {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }

    #mainTabs {
        justify-content: flex-start;
        gap: 0.25rem;
        padding: 0 0.25rem !important;
    }

    #mainTabs .nav-item {
        flex: 1;
    }

    #mainTabs .nav-link {
        font-size: 0 !important;
        padding: 0.6rem 0.8rem !important;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
        min-width: auto;
        line-height: 0;
        width: 100%;
    }

    #mainTabs .nav-link i {
        font-size: 1.3rem !important;
        margin: 0;
    }

    #mainTabs .badge {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.4rem;
        margin: 0 !important;
    }

    /* Outage tabs - same design as main tabs */
    .outage-tabs {
        gap: 0.25rem;
        padding: 0.5rem 0.5rem 0 0.5rem;
    }

    .outage-tabs .nav-item {
        flex: 1;
    }

    .outage-tabs .nav-link {
        font-size: 0 !important;
        padding: 0.5rem 0.4rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
        min-width: auto;
        line-height: 0;
        width: 100%;
    }

    .outage-tabs .nav-link i {
        font-size: 1.2rem !important;
        margin: 0;
    }

    .outage-tabs .badge {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.35rem;
        margin: 0 !important;
    }

    /* Container padding */
    .outage-container {
        padding: 0.5rem;
    }

    .container-fluid.py-4 {
        padding-top: 0.5rem !important;
        padding-bottom: 1rem !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Row gaps - minimal spacing for stats */
    .row.g-3 {
        --bs-gutter-x: 0.4rem;
        --bs-gutter-y: 0.4rem;
    }

    .row.g-3.mb-4 {
        margin-bottom: 1rem !important;
    }

    .tab-header h5 {
        font-size: 1rem;
    }

    .text-muted {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    /* Pagination - hide text on mobile */
    .pagination .page-link {
        font-size: 0 !important;
        padding: 0.4rem 0.6rem;
    }

    .pagination .page-link i {
        font-size: 1rem !important;
    }

    /* Show page numbers */
    .pagination .page-item:not(:first-child):not(:last-child) .page-link {
        font-size: 0.85rem !important;
    }

    /* Hold page mobile optimizations */
    .hold-header .logo-section h4 {
        font-size: 0.85rem;
    }

    .hold-header .logo-section small {
        font-size: 0.65rem;
    }

    .hold-header .logo-section small:nth-of-type(2) {
        display: none;
    }

    .hold-header .staff-info {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    /* Hold page - 2 items per row on mobile like index */
    .hold-header + .sidebar + .main-content #equipmentGrid {
        margin: 0 -0.25rem;
    }

    .hold-header + .sidebar + .main-content #equipmentGrid > .col {
        width: 50%;
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0.25rem;
    }

    .hold-header + .sidebar + .main-content .equipments-card {
        height: 100%;
        margin-bottom: 0;
    }

    .hold-header + .sidebar + .main-content .equipments-img {
        height: 120px;
    }

    .hold-header + .sidebar + .main-content .equipments-body {
        padding: 0.4rem;
    }

    .hold-header + .sidebar + .main-content .equipments-title {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
        line-height: 1.2;
    }

    .hold-header + .sidebar + .main-content .equipments-description {
        font-size: 0.65rem;
        margin-bottom: 0.4rem;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hold-header + .sidebar + .main-content .equipments-categories {
        margin-bottom: 0.4rem;
    }

    .hold-header + .sidebar + .main-content .equipments-categories .badge {
        font-size: 0.55rem;
        padding: 0.2rem 0.35rem;
        line-height: 1.2;
    }

    .hold-header + .sidebar + .main-content .equipments-categories .badge span {
        font-size: 0.55rem;
    }

    .hold-header + .sidebar + .main-content .equipments-meta .badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }

    .hold-header + .sidebar + .main-content .equipments-body .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }

    .hold-header + .sidebar + .main-content .equipments-body .btn i {
        font-size: 0.85rem;
    }

    .hold-header + .sidebar + .main-content .held-badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        line-height: 1.2;
    }

    /* Hold page search and title */
    .hold-header + .sidebar + .main-content .equipments-section h5 {
        font-size: 0.9rem;
    }

    .hold-header + .sidebar + .main-content .equipments-section .searchBox {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }

    .hold-header + .sidebar + .main-content .equipments-section > .d-flex {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch !important;
    }

    .hold-header + .sidebar + .main-content .equipments-section > .d-flex > div {
        width: 100%;
    }
    
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
        padding: 1.5rem;
    }

    .mobile-menu-btn {
        display: none;
    }
}

/* Desktop */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
}
/* ============================================
   Find My Loans Page Styles
   ============================================ */
.loan-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.loan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
}

.loan-form-no {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.loan-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.875rem;
}

.status-active {
    background: #28a745;
    color: white;
}

.status-overdue {
    background: #dc3545;
    color: white;
}

.status-completed {
    background: #6c757d;
    color: white;
}

.status-upcoming {
    background: #ffc107;
    color: #000;
}

.loan-dates {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.loan-item {
    padding: 10px;
    border-left: 3px solid #667eea;
    background: #f8f9fa;
    margin-bottom: 10px;
}

.search-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.searchBox {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
}

/* Hold Page - Status Badges */
.equipments-card {
    position: relative;
}

.held-badge {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background: #dc3545 !important;
    color: white !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    font-weight: bold !important;
    z-index: 100 !important;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.status-waiting {
    background: #0dcaf0 !important;
    color: #000 !important;
}

.status-future {
    background: #0d6efd !important;
}

.status-expired {
    background: #dc3545 !important;
}

.status-checkedout {
    background: #6c757d !important;
}

/* ============================================
   Equipment Management Table Styles
   ============================================ */
.equipment-table {
    font-size: 0.9rem;
}

.equipment-table img {
    width: 60px;
    height: 45px;
    object-fit: contain;
}

.action-buttons {
    white-space: nowrap;
}

.badge-onhold {
    background-color: #ffc107;
    color: #000;
}

@media (max-width: 768px) {
    .equipment-table {
        font-size: 0.8rem;
    }
    .equipment-table img {
        width: 40px;
        height: 30px;
    }
}

/* ============================================
   Main Tabs Styling (Outage.php)
   ============================================ */
#mainTabs .nav-link {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 1.5rem;
    color: rgb(82, 82, 82);
    background-color: #ffffff;
    border: 1px solid #dedede;
    border-bottom: none;
    transition: all 0.3s ease;
}

#mainTabs .nav-link:hover {
    background-color: #e9ecef;
    color: #212529;
    transform: translateY(-2px);
}

#mainTabs .nav-link.active {
    background: linear-gradient(135deg, #66eae3 0%, #506a9f 100%);
    color: white;
    border-color: #66e1ea;
    box-shadow: inset 0 -4px 0 #ffffff;
}

#mainTabs .nav-link.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

#mainTabs .nav-link .badge {
    font-size: 0.85rem;
    padding: 0.35em 0.65em;
}

#mainTabs .nav-link.active .badge {
    background-color: rgba(255, 255, 255, 0.3) !important;
    color: white;
}

/* ============================================
   Main Section Container
   ============================================ */
.main-section-container {
    border-radius: 12px;
    overflow: hidden;
    padding: 0 30px 1.5rem 30px;
}

.main-section-container #mainTabs {
    padding-left: 5px;
    border: none;
    gap: 0.25rem;
}

.main-section-container .tab-content {
    border-radius: 8px;
    box-shadow: 0 7px 10px rgba(62, 62, 62, 0.61);
    border-top: 4px solid #ffffff;
    background: linear-gradient(88deg, #66eae3 0%, #4b68a2 100%);
    padding: 1rem;
}

.main-section-container .outage-tab-content {
    background: var(--primary-gradient);
    border-radius: 8px;
    min-height: 400px;
}

/* ============================================
   Pagination Styles
   ============================================ */
.pagination-container {
    margin-top: 2rem;
}

.pagination {
    margin-bottom: 0.5rem;
}

.pagination .page-link {
    color: #667eea;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #f0f0ff;
    border-color: #667eea;
    color: #667eea;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Past records styling */
#pastItems .outage-form-card {
    opacity: 0.95;
}

#pastItems .outage-form-footer {
    background: #f8f9fa;
    text-align: center;
    padding: 0.75rem;
    color: #6c757d;
    font-size: 0.9rem;
}

/* ============================================
   Language Switcher Styles
   ============================================ */
.btn-group .btn-outline-light {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.btn-group .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.btn-group .btn-outline-light.active {
    background-color: white;
    color: #667eea;
    border-color: white;
    font-weight: 600;
}

/* ============================================
   Image Preview Modal Styles
   ============================================ */
.image-preview-container {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.image-preview-img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-preview-caption {
    color: white;
    padding: 15px 20px 10px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.image-preview-detail {
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 20px;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 800px;
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-top: 10px;
    backdrop-filter: blur(10px);
}

.image-preview-detail-title {
    width: 100%;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 8px;
}

/* ============================================
   Highlight Prompt Box
   ============================================ */
.highlight-prompt-box {
    position: relative;
    background: linear-gradient(150deg, #667eea 0%, #764ba2 100%);
    border: 3px solid #4618dd;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 20px rgba(143, 7, 255, 0.3);
    animation: gentle-pulse 2s ease-in-out infinite;
    text-align: center;
}

.highlight-prompt-box i {
    color: #ffffff;
    display: block;
    margin-bottom: 1rem;
}

.highlight-prompt-box p {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.arrow-up {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid #4618dd;
    animation: arrow-bounce 1.5s ease-in-out infinite;
}

.arrow-up::after {
    content: '';
    position: absolute;
    top: 3px;
    left: -27px;
    width: 0;
    height: 0;
    border-left: 27px solid transparent;
    border-right: 27px solid transparent;
    border-bottom: 45px solid #667eea;
}

@keyframes gentle-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(201, 7, 255, 0.3);
    }
    50% {
        box-shadow: 0 6px 30px rgba(205, 7, 255, 0.5);
    }
}

@keyframes arrow-bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@media (max-width: 768px) {
    .highlight-prompt-box {
        padding: 1rem 1.5rem;
        margin-top: 1.5rem;
    }
    
    .highlight-prompt-box p {
        font-size: 0.95rem;
    }
    
    .arrow-up {
        top: -50px;
        border-left: 25px solid transparent;
        border-right: 25px solid transparent;
        border-bottom: 40px solid #764ba2;
    }
    
    .arrow-up::after {
        top: 3px;
        left: -22px;
        border-left: 22px solid transparent;
        border-right: 22px solid transparent;
        border-bottom: 35px solid #667eea;
    }
}
