/* GULF Management System - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --border-color: #e5e7eb;
    --text-color: #111827;
    --text-light: #6b7280;
    --white: #ffffff;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Main Layout - Sidebar + Content */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 70px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.sidebar-logo {
    height: 40px;
    width: auto;
}

.sidebar-brand-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.sidebar-nav {
    padding: 20px 0;
    flex: 1;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 4px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
}

.nav-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-left-color: var(--primary-color);
}

.nav-link.active {
    background: rgba(37, 99, 235, 0.2);
    color: #fff;
    border-left-color: var(--primary-color);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.user-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: capitalize;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 15px;
    background: rgba(239, 68, 68, 0.2);
    color: #fff;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fff;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Top Header */
.top-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.top-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px 10px;
}

.header-title .page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-color);
    cursor: pointer;
    position: relative;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.3s;
}

.btn-icon:hover {
    background: var(--light-color);
}

.btn-icon .badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 0 !important;
    min-height: 100vh;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    width: calc(100% - 260px) !important;
    max-width: none !important;
    min-width: 0;
    transition: margin-left 0.3s ease;
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

.content-wrapper {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 30px 50px !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
}

/* Boxed Container */
.boxed-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 30px 50px !important;
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
    overflow-x: visible !important;
    overflow-y: visible !important;
    min-width: 0;
    max-width: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Card improvements for boxed layout */
.boxed-container .card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.boxed-container .card-header {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 20px;
}

/* Table improvements */
.boxed-container .table {
    margin-bottom: 0;
}

.boxed-container .table thead th {
    background: #f9fafb;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    padding: 12px 15px;
}

.boxed-container .table tbody td {
    padding: 15px;
    vertical-align: middle;
}

/* Button improvements */
.boxed-container .btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.2s;
}

.boxed-container .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Alert improvements */
.boxed-container .alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

/* Form improvements */
.boxed-container .form-control,
.boxed-container .form-select {
    border-radius: 6px;
    border: 1px solid #d1d5db;
    padding: 10px 15px;
    transition: all 0.2s;
}

.boxed-container .form-control:focus,
.boxed-container .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Scrollbar styling for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 600px;
}

@media (max-width: 768px) {
    .table-responsive table {
        font-size: 0.875rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    /* Stack table cells on very small screens */
    .table-responsive table.mobile-stack {
        min-width: 100%;
    }
    
    .table-responsive table.mobile-stack thead {
        display: none;
    }
    
    .table-responsive table.mobile-stack tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
    }
    
    .table-responsive table.mobile-stack td {
        display: block;
        text-align: right;
        padding: 8px 10px;
        border: none;
        border-bottom: 1px solid #eee;
    }
    
    .table-responsive table.mobile-stack td:before {
        content: attr(data-label) ": ";
        font-weight: bold;
        float: left;
        color: #666;
    }
    
    .table-responsive table.mobile-stack td:last-child {
        border-bottom: none;
    }
}

/* Responsive Cards */
@media (max-width: 768px) {
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .card-header {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
}

/* Responsive Forms */
@media (max-width: 768px) {
    .form-section {
        margin-bottom: 20px;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }
    
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group-text {
        font-size: 0.9rem;
        padding: 12px 10px;
    }
    
    .row.g-3 > * {
        margin-bottom: 15px;
    }
    
    /* Stack form buttons on mobile */
    .form-actions .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .form-actions .btn:last-child {
        margin-bottom: 0;
    }
    
    /* File upload improvements */
    .file-upload-modern {
        width: 100%;
    }
    
    .file-label {
        padding: 20px 15px;
        font-size: 0.9rem;
    }
}

/* Responsive Buttons */
@media (max-width: 576px) {
    .btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 5px;
        border-radius: 6px !important;
    }
    
    .btn-group .btn:last-child {
        margin-bottom: 0;
    }
}

/* Responsive Navigation */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .content-wrapper {
        padding: 20px 15px;
    }
    
    .top-header-content {
        padding: 12px 15px;
    }
    
    .header-title .page-title {
        font-size: 18px;
    }
    
    .boxed-container {
        padding: 20px;
        border-radius: 8px;
    }
    
    /* Sidebar navigation improvements */
    .nav-link {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .nav-link i {
        font-size: 1.1rem;
    }
    
    /* Submenu improvements */
    .submenu {
        padding-left: 15px;
    }
    
    .submenu .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .boxed-container {
        padding: 15px;
        margin: 0;
    }
    
    .content-wrapper {
        padding: 15px 10px;
    }
    
    .top-header-content {
        padding: 10px 15px;
    }
    
    .header-title .page-title {
        font-size: 16px;
    }
    
    .mobile-menu-btn {
        font-size: 20px;
        padding: 8px;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .btn-icon {
        font-size: 18px;
        padding: 6px;
    }
    
    /* Sidebar improvements */
    .sidebar {
        width: 100%;
        max-width: 320px;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .sidebar-brand-text {
        font-size: 18px;
    }
    
    .sidebar-logo {
        height: 35px;
    }
}

@media (max-width: 576px) {
    .content-wrapper {
        padding: 10px 8px;
    }
    
    .boxed-container {
        padding: 12px;
    }
    
    .top-header-content {
        padding: 10px 12px;
    }
    
    .header-title .page-title {
        font-size: 14px;
    }
    
    /* Stack action buttons */
    .d-flex.gap-2,
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 8px !important;
    }
    
    .d-flex.gap-2 .btn,
    .d-flex.gap-3 .btn {
        width: 100%;
    }
}

/* Responsive Grid Improvements */
@media (max-width: 768px) {
    .row.g-3,
    .row.g-4 {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    .row.g-3 > *,
    .row.g-4 > * {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    /* Make columns full width on mobile */
    .col-md-6,
    .col-md-4,
    .col-md-3,
    .col-lg-4,
    .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Responsive Modals */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 12px 15px;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* Responsive Charts */
@media (max-width: 768px) {
    .chart-container {
        position: relative;
        height: 250px !important;
        width: 100%;
    }
    
    canvas {
        max-width: 100%;
        height: auto !important;
    }
}

/* Responsive Dashboard Cards */
@media (max-width: 768px) {
    .stats-card {
        margin-bottom: 15px;
    }
    
    .stats-card .card-body {
        padding: 15px;
    }
    
    .stats-card h2 {
        font-size: 1.75rem;
    }
    
    .stats-card h6 {
        font-size: 0.8rem;
    }
}

/* Responsive Search and Filters */
@media (max-width: 768px) {
    .search-filter-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-filter-container .form-control,
    .search-filter-container .form-select {
        width: 100%;
    }
    
    .filter-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-buttons .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Responsive Data Tables */
@media (max-width: 768px) {
    .data-table-wrapper {
        overflow-x: auto;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 8px 6px;
    }
    
    /* Hide less important columns on mobile */
    .table .d-none-mobile {
        display: none !important;
    }
    
    /* Action buttons stack */
    .table .btn-group {
        flex-direction: column;
        gap: 5px;
    }
    
    .table .btn-sm {
        width: 100%;
        padding: 6px 10px;
    }
}

/* Responsive Print Styles */
@media print {
    .sidebar,
    .top-header,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .content-wrapper {
        padding: 0 !important;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .btn-icon {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    .table tbody tr {
        min-height: 44px;
    }
}

/* Landscape phone optimizations */
@media (max-width: 991.98px) and (orientation: landscape) {
    .sidebar {
        width: 240px;
    }
    
    .content-wrapper {
        padding: 15px;
    }
}

/* Very small devices */
@media (max-width: 375px) {
    .sidebar {
        width: 100%;
    }
    
    .boxed-container {
        padding: 10px;
    }
    
    .content-wrapper {
        padding: 8px 5px;
    }
    
    h1, h2, h3, h4, h5, h6 {
        font-size: 1.1em;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--text-light);
}

.login-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
}

.btn-warning {
    background-color: var(--warning-color);
    color: var(--white);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Header */
.main-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo h2 {
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.main-nav a:hover {
    background-color: var(--light-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: var(--text-light);
}

.btn-logout {
    padding: 8px 16px;
    background-color: var(--danger-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
}

.btn-logout:hover {
    background-color: #dc2626;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    color: var(--text-color);
}

.role-badge {
    padding: 6px 12px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Stats Grid - Using Bootstrap cards instead */
/* Custom stat styles if needed */
.stat-number {
    font-size: 32px;
    font-weight: bold;
}

/* Quick Actions */
.quick-actions {
    margin-top: 40px;
}

.quick-actions h2 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.action-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none !important;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* Tables - Bootstrap handles most table styling */
/* Custom table enhancements */
.table-responsive {
    border-radius: 8px;
}

.card {
    border: none;
    box-shadow: var(--shadow);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid var(--border-color);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Professional Form Styling */
.form-page-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.professional-form {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

.section-header h5 {
    color: #1f2937;
    font-weight: 600;
    font-size: 1.1rem;
}

.section-header hr {
    border-color: #dee2e6;
    opacity: 0.5;
}

/* Input Group Styling */
.input-group-text {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
    min-width: 45px;
    justify-content: center;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.form-label {
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Modern File Upload */
.file-upload-modern {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-label {
    display: block;
    padding: 20px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.file-label:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.file-label .file-text {
    display: block;
    color: #374151;
    font-weight: 500;
    margin-top: 8px;
}

.file-input:focus + .file-label {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.file-input:valid + .file-label {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.file-input:valid + .file-label .file-text::after {
    content: " ✓";
    color: var(--success-color);
}

/* Form Actions */
.form-actions {
    background: #f8f9fa;
    margin: 0 -30px -30px -30px;
    padding: 20px 30px;
    border-radius: 0 0 12px 12px;
}

/* Forms - Legacy Support */
.form-container {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Badges - Bootstrap handles badges, keeping custom colors if needed */

/* Lead Colors */
.lead-interested {
    background-color: #dbeafe !important;
}

.lead-not-interested {
    background-color: #fee2e2 !important;
}

.lead-new {
    background-color: var(--white) !important;
}

/* Notifications */
.notifications-section {
    margin-bottom: 30px;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-item {
    background: var(--white);
    padding: 16px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.notification-item h4 {
    margin-bottom: 8px;
    color: var(--text-color);
}

.notification-item p {
    color: var(--text-light);
    margin-bottom: 8px;
}

.notification-item small {
    color: var(--text-light);
    font-size: 12px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    color: var(--text-light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--text-color);
}

/* Footer - Positioned at bottom of page, outside container */
.main-footer {
    background-color: var(--white);
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    width: 100%;
    margin-left: 0;
    position: relative;
    z-index: 10;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* Ensure footer is outside content wrapper */
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    flex: 1;
    padding-bottom: 0;
    max-width: none !important;
    width: 100% !important;
}

/* Bootstrap Integration - Custom Overrides */
/* Bootstrap handles responsive design, these are custom enhancements */

/* Bootstrap Custom Enhancements */
.navbar-brand img {
    max-height: 40px;
}

/* Stats Grid - Bootstrap compatible */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Actions Grid - Bootstrap compatible */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Bootstrap responsive utilities handle most responsive needs */
/* Custom responsive overrides for specific components */

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr !important;
    }
    
    .btn-group-sm {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group-sm .btn {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .main-footer,
    .btn,
    .actions-grid,
    .quick-actions {
        display: none;
    }
    
    .container {
        padding: 0;
    }
    
    .table-container {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-upload:hover {
    border-color: var(--primary-color);
}

.file-upload input[type="file"] {
    display: none;
}

/* Checkboxes Grid */
.checkboxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
}

/* Dropdown Menu Fixes for Tables */
.table-responsive {
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

/* Allow dropdowns to overflow table container */
.table-responsive:has(.dropdown.show) {
    overflow: visible;
}

/* Prevent horizontal scroll on main content */
.content-wrapper {
    overflow-x: visible !important;
    position: relative;
    max-width: none !important;
    width: 100% !important;
}

.boxed-container {
    overflow: visible !important;
    position: relative;
    max-width: none !important;
    width: 100% !important;
}

.dropdown {
    position: relative;
}

/* Professional Dropdown Styling */
.dropdown-menu {
    position: absolute !important;
    z-index: 9999 !important;
    min-width: 160px;
    max-width: 220px;
    padding: 0.375rem 0;
    margin: 0.125rem 0 0;
    font-size: 0.875rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    animation: dropdownFadeIn 0.15s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure dropdown items are clickable */
.dropdown-item {
    cursor: pointer;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    width: 100%;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    transition: all 0.15s ease;
}

.dropdown-item i {
    width: 18px;
    text-align: center;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #1e2125;
    background-color: #f8f9fa;
}

.dropdown-item.text-danger {
    color: #dc3545;
}

.dropdown-item.text-danger:hover,
.dropdown-item.text-danger:focus {
    color: #fff !important;
    background-color: #dc3545;
}

.dropdown-item.text-success:hover,
.dropdown-item.text-success:focus {
    color: #fff !important;
    background-color: #198754;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Fix for dropdown in table cells */
table td .dropdown {
    position: static;
}

table td .dropdown-menu {
    position: absolute !important;
    z-index: 1050 !important;
    right: auto;
    left: auto;
    margin-top: 0.25rem;
    pointer-events: auto !important;
}

/* Ensure dropdown buttons are always clickable */
table td .dropdown-toggle {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 1000 !important;
    user-select: none !important;
}

table td .dropdown {
    position: static !important;
}

table td {
    overflow: visible !important;
}

/* Ensure dropdown menu is above everything */
table td .dropdown-menu {
    position: absolute !important;
    z-index: 1050 !important;
    pointer-events: auto !important;
}

/* Prevent any overlay from blocking clicks */
.table-responsive,
.card-body,
.boxed-container {
    pointer-events: auto !important;
}

/* Ensure all interactive elements in tables are clickable */
.table-responsive *,
table td *,
table td .btn,
table td .dropdown,
table td .dropdown-toggle {
    pointer-events: auto !important;
}

table td .btn,
table td .dropdown-toggle {
    cursor: pointer !important;
    position: relative !important;
    z-index: 99999 !important;
}

/* Make sure table rows don't block clicks to buttons */
table tbody tr {
    position: relative;
}

table tbody tr td:last-child {
    position: relative;
    z-index: 1;
}

/* Ensure dropdown container doesn't block */
table td .dropdown {
    position: static !important;
    z-index: 99999 !important;
}

/* Make absolutely sure buttons are clickable */
table td .btn[data-bs-toggle="dropdown"] {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 99999 !important;
    position: relative !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Prevent table rows from blocking button clicks */
table tbody tr {
    position: relative;
}

table tbody tr td:last-child {
    position: relative !important;
    z-index: 100 !important;
}

/* Ensure table cells don't block clicks to buttons */
table td .dropdown,
table td .dropdown * {
    position: relative !important;
    z-index: 1000 !important;
}

/* Ensure the ::after pseudo-element (dropdown arrow) doesn't block clicks */
table td .btn[data-bs-toggle="dropdown"]::after,
table td .dropdown-toggle::after {
    pointer-events: none !important;
    z-index: -1 !important;
}

/* Make sure the icon inside is also clickable */
table td .btn[data-bs-toggle="dropdown"] i,
table td .dropdown-toggle i {
    pointer-events: none !important;
    position: relative;
    z-index: 1;
}

/* Ensure table cells don't clip dropdowns */
table td {
    overflow: visible;
    position: relative;
}

/* Card body should allow dropdown overflow when dropdown is open */
.card-body:has(.dropdown.show) {
    overflow: visible !important;
}

.card:has(.dropdown.show) {
    overflow: visible !important;
}

/* Ensure dropdown parent containers don't clip */
.boxed-container:has(.dropdown.show) {
    overflow: visible !important;
}

/* Dropdown positioning fix - use higher z-index */
.dropdown.show .dropdown-menu {
    display: block !important;
    position: absolute !important;
    z-index: 9999 !important;
    will-change: transform;
}

/* Alternative approach for browsers that don't support :has() */
.dropdown.show {
    position: static;
}

.dropdown.show .dropdown-menu {
    position: fixed !important;
    z-index: 9999 !important;
}

/* Prevent dropdown from causing scroll */
.dropdown-menu.show {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for dropdown */
.dropdown-menu.show::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu.show::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.dropdown-menu.show::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.dropdown-menu.show::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Action button styling */
.btn-outline-secondary {
    border-color: #dee2e6;
    color: #6c757d;
    padding: 0.25rem 0.5rem;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

/* Table cell actions column */
table td:last-child {
    width: 80px;
    text-align: center;
    white-space: nowrap;
}

/* Custom Checkbox Styling - Override Bootstrap */
input[type="checkbox"].custom-checkbox,
.form-check-input.custom-checkbox {
    width: 20px !important;
    height: 20px !important;
    cursor: pointer !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 4px !important;
    position: relative !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: var(--white) !important;
    background-image: none !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    float: none !important;
    pointer-events: auto !important;
    z-index: 999 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

input[type="checkbox"].custom-checkbox:hover,
.form-check-input.custom-checkbox:hover {
    border-color: var(--primary-color) !important;
    background-color: #eff6ff !important;
    transform: scale(1.05) !important;
}

input[type="checkbox"].custom-checkbox:checked,
.form-check-input.custom-checkbox:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M10 3L4.5 8.5L2 6' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 12px !important;
}

input[type="checkbox"].custom-checkbox:focus,
.form-check-input.custom-checkbox:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
    border-color: var(--primary-color) !important;
}

input[type="checkbox"].custom-checkbox:active,
.form-check-input.custom-checkbox:active {
    transform: scale(0.95) !important;
}

/* Student Row Styling */
.student-row,
.employee-row {
    transition: background-color 0.2s ease;
}

.student-row:hover,
.employee-row:hover {
    background-color: #f8fafc !important;
}

.student-row:hover input[type="checkbox"].custom-checkbox:not(:checked),
.student-row:hover .form-check-input.custom-checkbox:not(:checked),
.employee-row:hover input[type="checkbox"].custom-checkbox:not(:checked),
.employee-row:hover .form-check-input.custom-checkbox:not(:checked) {
    border-color: var(--primary-color) !important;
    background-color: #eff6ff !important;
}

/* Quick Actions Button Styling */
.quick-action-btn {
    transition: all 0.2s ease !important;
    border: none !important;
    min-width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    font-size: 14px !important;
}

.quick-action-btn:not(:disabled):hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.quick-action-btn:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(0.5) !important;
}

.quick-action-btn:not(:disabled) {
    opacity: 1 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    filter: none !important;
}

/* Quick Actions Group */
.quick-actions-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Form Check Wrapper */
.form-check {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 20px;
}

/* Remove Bootstrap default checkbox styling */
table .form-check-input {
    margin-top: 0 !important;
    margin-left: 0 !important;
    float: none !important;
}

/* Table Header Checkbox */
thead th:first-child {
    position: sticky;
    left: 0;
    background-color: var(--white);
    z-index: 10;
}

thead th:first-child,
thead th:first-child *,
thead th:first-child input[type="checkbox"] {
    pointer-events: auto !important;
    cursor: pointer !important;
}

thead th:first-child .form-check {
    pointer-events: none !important;
}

thead th:first-child .form-check input[type="checkbox"] {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Table Body Checkbox Column */
tbody td:first-child {
    position: sticky;
    left: 0;
    background-color: var(--white);
    z-index: 5;
    padding: 12px 8px !important;
}

tbody td:first-child,
tbody td:first-child *,
tbody td:first-child input[type="checkbox"] {
    pointer-events: auto !important;
    cursor: pointer !important;
}

tbody td:first-child .form-check {
    pointer-events: none !important;
}

tbody td:first-child .form-check input[type="checkbox"] {
    pointer-events: auto !important;
    cursor: pointer !important;
}

.student-row:hover td:first-child {
    background-color: #f8fafc;
}

/* Table Header Checkbox Column */
thead th:first-child {
    padding: 12px 8px !important;
}

/* Selected Row Highlight */
.student-row[style*="background-color: rgb(239, 246, 255)"],
.employee-row[style*="background-color: rgb(239, 246, 255)"] {
    background-color: #eff6ff !important;
}

.student-row[style*="border-left"],
.employee-row[style*="border-left"] {
    transition: all 0.2s ease;
}

.student-row:hover td:first-child,
.employee-row:hover td:first-child {
    background-color: #f8fafc;
}

/* Modal Actions Styling */
.modal .list-group-item-action {
    cursor: pointer !important;
    pointer-events: auto !important;
    user-select: none;
    transition: background-color 0.2s ease;
}

.modal .list-group-item-action:hover {
    background-color: #f8f9fa !important;
}

.modal .list-group-item-action button {
    cursor: pointer !important;
    pointer-events: auto !important;
    width: 100% !important;
    text-align: left !important;
    border: none !important;
    background: none !important;
    padding: 0.5rem 1rem !important;
}

.modal .list-group-item-action button:hover {
    background-color: #f8f9fa !important;
}

/* Action Buttons Styling */
.action-btn {
    min-width: 36px;
    height: 36px;
    padding: 0.375rem 0.5rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.action-btn i {
    font-size: 14px;
    line-height: 1;
}

/* Ensure buttons stay inline */
table td .d-inline-flex {
    display: inline-flex !important;
    flex-wrap: nowrap;
    gap: 4px;
}

table td form.d-inline {
    display: inline-block !important;
    margin: 0;
    padding: 0;
}

/* Student View Professional Styling */
.info-item {
    margin-bottom: 1.5rem;
}

.info-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1rem;
    color: #111827;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.info-value:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.info-value a {
    color: inherit;
    font-weight: 500;
}

.card-header.bg-light {
    background-color: #f9fafb !important;
    border-bottom: 2px solid #e5e7eb;
}

.card-header h5 {
    color: #374151;
    font-weight: 600;
}

.card-header h5 i {
    color: var(--primary-color);
}

/* Custom Orange Badge for Referred in Interview */
.badge.bg-orange {
    background-color: #fd7e14 !important;
    color: #fff !important;
}

/* Ensure red color for Referred in IG1 & IG2 */
.badge.bg-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
}

/* ============================================
   COMPREHENSIVE RESPONSIVE STYLES
   ============================================ */

/* Additional Responsive Utilities */
@media (max-width: 991.98px) {
    /* Hide less important elements on tablet/mobile */
    .d-desktop-only {
        display: none !important;
    }
    
    /* Show mobile-only elements */
    .d-mobile-only {
        display: block !important;
    }
    
    /* Stack flex containers */
    .d-flex.d-md-row {
        flex-direction: column;
    }
    
    /* Full width buttons on mobile */
    .btn-group-mobile-stack {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group-mobile-stack .btn {
        width: 100%;
        margin-bottom: 8px;
        border-radius: 6px !important;
    }
}

@media (min-width: 992px) {
    .d-mobile-only {
        display: none !important;
    }
    
    .d-desktop-only {
        display: block !important;
    }
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }
    
    .display-1 { font-size: 2.5rem; }
    .display-2 { font-size: 2rem; }
    .display-3 { font-size: 1.75rem; }
    .display-4 { font-size: 1.5rem; }
}

/* Responsive Spacing */
@media (max-width: 768px) {
    .mb-md-4 {
        margin-bottom: 1rem !important;
    }
    
    .mt-md-4 {
        margin-top: 1rem !important;
    }
    
    .p-md-3 {
        padding: 0.75rem !important;
    }
    
    .px-md-3 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive Video/Embed */
iframe,
embed,
video {
    max-width: 100%;
    height: auto;
}

/* Responsive Lists */
@media (max-width: 768px) {
    .list-group-item {
        padding: 12px 15px;
    }
    
    .list-group-item-action {
        padding: 12px 15px;
    }
}

/* Responsive Badges */
@media (max-width: 576px) {
    .badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

/* Responsive Alerts */
@media (max-width: 768px) {
    .alert {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .alert-dismissible .btn-close {
        padding: 0.5rem 0.5rem;
    }
}

/* Responsive Pagination */
@media (max-width: 576px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Responsive Tabs */
@media (max-width: 768px) {
    .nav-tabs {
        flex-wrap: wrap;
        border-bottom: 2px solid #dee2e6;
    }
    
    .nav-tabs .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .nav-tabs .nav-item {
        flex: 1;
        min-width: 0;
    }
}

/* Responsive Progress Bars */
@media (max-width: 768px) {
    .progress {
        height: 20px;
    }
    
    .progress-bar {
        font-size: 0.75rem;
        padding: 2px 8px;
    }
}

/* Responsive Dropdowns */
@media (max-width: 768px) {
    .dropdown-menu {
        max-width: calc(100vw - 20px);
        font-size: 0.9rem;
    }
    
    .dropdown-item {
        padding: 12px 15px;
        white-space: normal;
    }
}

/* Responsive Input Groups */
@media (max-width: 576px) {
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group > .form-control,
    .input-group > .form-select {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .input-group > .input-group-text {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }
}

/* Responsive Card Groups */
@media (max-width: 768px) {
    .card-group,
    .card-deck {
        flex-direction: column;
    }
    
    .card-group .card,
    .card-deck .card {
        margin-bottom: 15px;
    }
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Responsive Container */
.container,
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 576px) {
    .container,
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Responsive Sidebar Footer */
@media (max-width: 768px) {
    .sidebar-footer {
        padding: 15px;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .user-details {
        text-align: center;
    }
    
    .btn-logout {
        width: 100%;
        justify-content: center;
    }
}

/* Responsive Section Headers */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    
    .section-header h5 {
        font-size: 1rem;
        margin-bottom: 5px;
    }
}

/* Responsive File Upload */
@media (max-width: 768px) {
    .file-upload-modern {
        width: 100%;
    }
    
    .file-label {
        padding: 20px 15px;
        text-align: center;
    }
    
    .file-text {
        font-size: 0.9rem;
    }
}

/* Responsive Candidate Type Cards */
@media (max-width: 768px) {
    .candidate-type-card .card-type-content {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .candidate-type-card .card-type-icon {
        margin-bottom: 10px;
    }
}

/* Responsive NEBOSH Section */
@media (max-width: 768px) {
    .nebosh-section,
    .resit-section {
        padding: 15px;
    }
    
    .nebosh-icon-wrapper,
    .resit-icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Responsive Stats Cards */
@media (max-width: 768px) {
    .stats-card {
        margin-bottom: 15px;
    }
    
    .stats-card .card-body {
        padding: 20px 15px;
    }
    
    .stats-card h2 {
        font-size: 1.5rem;
    }
    
    .stats-card h6 {
        font-size: 0.75rem;
    }
}

/* Responsive Action Buttons in Tables */
@media (max-width: 768px) {
    .table .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .table .btn-sm {
        width: 100%;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* Responsive Filter Sections */
@media (max-width: 768px) {
    .filter-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-section .form-select,
    .filter-section .form-control {
        width: 100%;
    }
}

/* Responsive Dashboard Charts */
@media (max-width: 768px) {
    .chart-wrapper {
        margin-bottom: 20px;
    }
    
    .chart-container {
        height: 250px !important;
    }
}

/* Responsive Utility Classes */
.mobile-text-center {
    text-align: center;
}

@media (min-width: 769px) {
    .mobile-text-center {
        text-align: inherit;
    }
}

.mobile-full-width {
    width: 100% !important;
}

@media (min-width: 769px) {
    .mobile-full-width {
        width: auto !important;
    }
}

/* Smooth Transitions for Responsive Changes */
* {
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Prevent Text Selection on Mobile (for better UX) */
@media (max-width: 768px) {
    .btn,
    .nav-link,
    .dropdown-toggle {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        -webkit-touch-callout: none;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .btn-icon {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    .table tbody tr {
        min-height: 44px;
    }
}

/* Landscape phone optimizations */
@media (max-width: 991.98px) and (orientation: landscape) {
    .sidebar {
        width: 240px;
    }
    
    .content-wrapper {
        padding: 15px;
    }
}

/* Very small devices */
@media (max-width: 375px) {
    .sidebar {
        width: 100%;
    }
    
    .boxed-container {
        padding: 10px;
    }
    
    .content-wrapper {
        padding: 8px 5px;
    }
    
    h1, h2, h3, h4, h5, h6 {
        font-size: 1.1em;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

