/* General Body Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Login Page Specific Styles */
.login-main-row {
    min-height: 100vh;
}

.login-branding-block {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #0d6efd, #0056b3);
    color: white;
    padding: 3rem;
    text-align: center;
}

.login-branding-content i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.login-branding-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.login-branding-content p {
    font-size: 1.25rem;
    opacity: 0.9;
}

.login-form-block {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background-color: #f8f9fa;
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
}

/* Sidebar Styles */

.login-container {
    width: 100%;
}

.login-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.login-card .card-header {
    background-color: #007bff;
    color: white;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    padding: 1.25rem;
}

/* Sidebar Styles */
.sidebar-container {
    padding-top: 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid #dee2e6;
    background-color: rgba(0, 123, 255, 0.05); /* A slightly more noticeable blue */
}

.sidebar {
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    font-weight: bold;
    margin-bottom: 1rem;
    color: #007bff;
    font-size: 1.5rem; /* Increased font size */
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: #343a40;
    text-decoration: none;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.sidebar-menu li a:hover {
    background-color: #e9ecef;
}

.sidebar-menu li.active a {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.sidebar-menu li a i {
    margin-right: 0.75rem;
}

.user-info-sidebar {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* Main Content Styles */
.main-panel {
    padding: 2rem;
}

/* Summary Cards for Dashboards */
.summary-card-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}

.summary-card-text {
    font-size: 0.9rem;
    color: #6c757d;
}

.summary-card-number {
    font-size: 2rem;
    font-weight: bold;
}

.bg-light-primary { background-color: rgba(0, 123, 255, 0.1); }
.bg-light-warning { background-color: rgba(255, 193, 7, 0.1); }
.bg-light-success { background-color: rgba(40, 167, 69, 0.1); }
.bg-light-danger { background-color: rgba(220, 53, 69, 0.1); }
.bg-light-info { background-color: rgba(23, 162, 184, 0.1); }

/* Print-specific styles */
@media print {
    /* Hide everything by default */
    body * {
        visibility: hidden;
    }

    /* Make the printable area and its children visible */
    .printable-area, .printable-area * {
        visibility: visible;
    }

    /* Position the printable area at the top of the page */
    .printable-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
    }

    /* Ensure table styles are maintained */
    .printable-area .table {
        width: 100%;
        border-collapse: collapse;
    }

    .printable-area .table th, .printable-area .table td {
        border: 1px solid #dee2e6;
        padding: 8px;
    }

    .printable-area .table-dark {
        background-color: #212529 !important;
        color: #fff !important;
    }

    .printable-area .badge {
        border: 1px solid #000;
    }
}

/* Custom style for readonly inputs to make them look disabled */
.form-control[readonly] {
    background-color: #e9ecef; /* Bootstrap's disabled background color */
    opacity: 1;
}

/* Request Card Styles */
.request-card {
    border: 1px solid #dee2e6;
    border-radius: 0.35rem;
    background-color: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    display: flex;
    flex-direction: column;
}

.request-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: rgba(0,0,0,0.03);
    border-bottom: 1px solid #dee2e6;
}

.request-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0;
}

.request-card-body {
    padding: 1rem;
}

.request-card-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.request-card-item:last-child {
    margin-bottom: 0;
}

.request-card-item strong {
    color: #495057;
    margin-right: 1rem;
}

.request-card-footer {
    padding: 0.75rem 1rem;
    background-color: rgba(0,0,0,0.03);
    border-top: 1px solid #dee2e6;
    text-align: right;
}

.request-card-footer .btn {
    margin-left: 0.5rem;
}


/* --- RESPONSIVE STYLES --- */

/* Login Page */
@media (max-width: 767.98px) {
    .login-branding-block {
        display: none;
    }
    .login-form-block {
        padding: 1.5rem;
    }
    .login-main-row {
        min-height: auto;
    }
}

/* Main Application Layout */
.main-header {
    display: none; /* Hidden by default on desktop */
}
.sidebar-close-btn {
    display: none; /* Hidden on desktop */
}

@media (max-width: 767.98px) {
    /* Main Panel */
    .main-panel {
        padding: 0;
    }
    .card-body {
        padding: 1rem;
    }

    /* Mobile Header */
    .main-header {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        background-color: #007bff;
        color: white;
        position: sticky;
        top: 0;
        z-index: 1030;
    }
    .sidebar-toggle-btn {
        background: none; border: none; color: white;
        font-size: 1.25rem; margin-right: 1rem;
    }
    .header-title {
        font-size: 1.2rem; font-weight: 500;
    }

    /* Sidebar */
    .sidebar-container {
        position: fixed;
        top: 0; left: -100%;
        width: 100%; height: 100vh;
        z-index: 1040;
        background-color: #fff;
        transition: left 0.3s ease-in-out;
        padding-top: 0;
        border-right: none;
        overflow-y: auto;
    }
    .sidebar-visible .sidebar-container {
        left: 0;
    }
    .sidebar-close-btn {
        display: block;
        position: absolute;
        top: 1rem; right: 1rem;
        background: none; border: none;
        font-size: 2rem; line-height: 1; color: #6c757d;
    }

    /* Main content */
    .col-md-10 {
        width: 100%; flex: 0 0 100%; max-width: 100%;
    }

    /* Overlay */
    .sidebar-overlay {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1035;
        display: none;
    }
    .sidebar-visible .sidebar-overlay {
        display: block;
    }

    /* Details List on manage_request.php */
    .details-list dt,
    .details-list dd {
        width: 100%;
        display: block;
        padding-left: 0;
        padding-right: 0;
    }
    .details-list dt {
        font-weight: 600; /* Semibold */
        color: #495057;
        margin-top: 1rem;
    }
    .details-list dd {
        margin-left: 0;
        margin-bottom: 0;
    }
    .details-list dt:first-of-type {
        margin-top: 0;
    }
}
