/* Loan Management System - Professional Panel Design */

:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    --bg-main: #f5f7fa;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
}

/* Typography */
h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

p {
    margin-bottom: 8px;
    font-size: 14px;
}

.text-gray-600 {
    color: var(--text-secondary);
    font-size: 13px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Ensure containers don't prevent horizontal scrolling on mobile */
@media (max-width: 992px) {
    .container {
        padding: 0 12px;
        overflow-x: visible;
    }

    .container-fluid {
        padding: 0 12px;
        overflow-x: visible;
    }
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    min-width: max-content;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 12px 12px 8px;
    width: 100%;
    min-width: max-content;
}

.navbar-brand {
    font-size: 18px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
    z-index: 1001;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-link {
    color: rgba(255,255,255,0.9);
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
    text-align: left;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.nav-user {
    cursor: default;
    font-weight: 500;
}

.nav-user:hover {
    background-color: transparent;
    color: rgba(255,255,255,0.9);
}

/* Mobile Navbar Actions Container */
.mobile-navbar-actions {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    z-index: 1001;
}

/* Mobile Logout Button */
.mobile-logout-btn {
    color: white;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    white-space: nowrap;
}

.mobile-logout-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Don't block touches when invisible */
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto; /* Enable touches only when sidebar is open */
}

/* Cards/Panels */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: visible;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background-color: #fafbfc;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 20px;
    overflow-x: visible;
}

/* Ensure card body doesn't hide overflow on mobile */
@media (max-width: 992px) {
    .card {
        overflow: visible;
    }

    .card-body {
        padding: 12px;
        overflow-x: visible;
    }
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stats-card h3 {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.stats-card p {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.5;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

/* Ensure all clickable elements work on mobile */
a, button, .btn, .nav-link, input[type="submit"], input[type="button"] {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    color: white;
}

.btn-secondary {
    background-color: var(--info);
    color: white;
}

.btn-secondary:hover {
    background-color: #0284c7;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-warning {
    background-color: var(--warning);
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-outline {
    background-color: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--bg-main);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-control.error {
    border-color: var(--danger);
}

.form-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.form-error {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--danger);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 1.25em;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left-color: var(--success);
}

.alert-error, .alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border-left-color: var(--danger);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left-color: var(--warning);
}

.alert-info {
    background-color: #dbeafe;
    color: #1e3a8a;
    border-left-color: var(--primary);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    white-space: nowrap;
}

.badge-primary, .bg-primary { background-color: var(--primary); color: white; }
.badge-success, .bg-success { background-color: var(--success); color: white; }
.badge-warning, .bg-warning { background-color: var(--warning); color: white; }
.badge-danger, .bg-danger { background-color: var(--danger); color: white; }
.badge-info, .bg-info { background-color: var(--info); color: white; }
.badge-secondary, .bg-secondary { background-color: var(--text-muted); color: white; }

/* Tables - Force horizontal scrolling on mobile */
.table-responsive {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 1rem;
    position: relative;
}

.card-body .table-responsive {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
}

/* Apply to all tables inside responsive wrapper */
.table-responsive > table,
.table-responsive table,
.table-responsive > .table,
.table-responsive .table {
    width: 100%;
    margin-bottom: 0;
}

.table-responsive table {
    display: table;
    border-collapse: collapse;
}

/* Ensure horizontal scroll on mobile and tablet */
@media (max-width: 992px) {
    .table-responsive {
        display: block !important;
        width: calc(100% + 24px) !important;
        overflow-x: scroll !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch !important;
        -ms-overflow-style: -ms-autohiding-scrollbar;
        border: 1px solid var(--border-light);
        border-radius: 4px;
        margin-left: -12px;
        margin-right: -12px;
        padding: 0;
        position: relative;
    }

    .card-body .table-responsive {
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 0;
        padding-right: 0;
        width: calc(100% + 24px) !important;
    }

    .table-responsive > table,
    .table-responsive table {
        display: table !important;
        min-width: 900px !important;
        width: 900px !important;
        margin-bottom: 0 !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
    }

    .table-responsive > .table,
    .table-responsive .table {
        display: table !important;
        min-width: 900px !important;
        width: 900px !important;
        margin-bottom: 0 !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
    }

    .card-body .table-responsive > table,
    .card-body .table-responsive table {
        min-width: 900px !important;
        width: 900px !important;
    }

    /* Prevent table cells from wrapping */
    .table-responsive table th,
    .table-responsive table td,
    .table-responsive > table th,
    .table-responsive > table td {
        white-space: nowrap !important;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 12px 16px !important;
    }

    /* Ensure thead and tbody display properly */
    .table-responsive table thead,
    .table-responsive table tbody,
    .table-responsive table tr {
        display: table-row-group;
    }

    .table-responsive table thead {
        display: table-header-group !important;
    }

    .table-responsive table tbody {
        display: table-row-group !important;
    }

    .table-responsive table tr {
        display: table-row !important;
    }

    .table-responsive table th,
    .table-responsive table td {
        display: table-cell !important;
    }

    /* Custom scrollbar for better UX */
    .table-responsive::-webkit-scrollbar {
        height: 10px;
    }

    .table-responsive::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .table-responsive::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
}

/* Extra styles for very small screens */
@media (max-width: 576px) {
    .table-responsive > table,
    .table-responsive table,
    .table-responsive > .table,
    .table-responsive .table {
        min-width: 700px !important;
        width: 700px !important;
    }

    .card-body .table-responsive {
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Force scrollable tables on all screen sizes */
.table-scroll-wrapper {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll-wrapper table {
    min-width: 800px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    font-size: 13px;
}

thead {
    background-color: #fafbfc;
    border-bottom: 2px solid var(--border-color);
}

thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.15s;
}

tbody tr:hover {
    background-color: #fafbfc;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody td {
    padding: 12px 16px;
    color: var(--text-primary);
    vertical-align: middle;
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col {
    flex: 1;
    padding: 0 10px;
}

.col-1 { flex: 0 0 8.333%; max-width: 8.333%; padding: 0 10px; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; padding: 0 10px; }
.col-3 { flex: 0 0 25%; max-width: 25%; padding: 0 10px; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 0 10px; }
.col-6 { flex: 0 0 50%; max-width: 50%; padding: 0 10px; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; padding: 0 10px; }
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0 10px; }

/* Auth Pages - Split Screen Design */
.split-auth-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-y: auto;
}

/* Left Side - Blue Branding */
.auth-brand-side {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    color: white;
}

.brand-content {
    max-width: 450px;
    text-align: center;
}

.brand-logo {
    margin-bottom: 24px;
}

.logo-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.brand-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: white;
}

.brand-tagline {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    line-height: 1.5;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
    max-width: 320px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
}

.feature-icon {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    font-size: 14px;
}

/* Right Side - White Form */
.auth-form-side {
    flex: 1;
    background: white;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 30px;
    overflow-y: auto;
}

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

.form-header {
    margin-bottom: 24px;
}

.form-header h2 {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-form {
    margin-top: 20px;
}

.btn-login {
    width: 100%;
    padding: 11px 20px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 20px;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.form-footer p {
    font-size: 14px;
    color: var(--text-secondary);
}

.link-primary {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.link-primary:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Old Auth Styles - Keep for Register Page */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.auth-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 40px;
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 24px;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Footer - Panel Pages (matching landing page) */
.panel-footer {
    background-color: #1e293b;
    color: white;
    padding: 60px 0 20px;
    margin-top: 40px;
}

.panel-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

footer.panel-footer .footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

footer.panel-footer .footer-logo img {
    height: 50px !important;
    width: auto !important;
    max-height: 50px !important;
}

.panel-footer .footer-desc {
    color: #cbd5e1;
    line-height: 1.6;
    margin-top: 12px;
    font-size: 14px;
}

.panel-footer .footer-col h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.panel-footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.panel-footer .footer-links li {
    margin-bottom: 12px;
}

.panel-footer .footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 4px 0;
}

.panel-footer .footer-links a:hover {
    color: white;
}

.panel-footer .footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.panel-footer .footer-contact li {
    color: #cbd5e1;
    margin-bottom: 12px;
    font-size: 14px;
}

.panel-footer .footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 20px;
    text-align: center;
}

.panel-footer .footer-bottom p {
    color: #cbd5e1;
    margin-bottom: 8px;
    font-size: 14px;
}

.panel-footer .made-with-love {
    font-size: 14px;
    color: #94a3b8;
}

.panel-footer .made-with-love a {
    color: #60a5fa;
    text-decoration: none;
}

.panel-footer .made-with-love a:hover {
    color: #93c5fd;
}

/* Responsive footer */
@media (max-width: 768px) {
    .panel-footer {
        padding: 40px 0 20px;
    }

    .panel-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .panel-footer .footer-logo {
        justify-content: center;
    }

    .panel-footer .footer-col h4 {
        font-size: 16px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 32px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }

.p-3 { padding: 16px; }
.p-4 { padding: 24px; }
.p-5 { padding: 32px; }

/* Main Content Area */
main {
    min-height: calc(100vh - 180px);
    padding: 24px 0;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 20px;
}

.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Profile Info */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.info-row {
    display: flex;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.info-label {
    flex: 0 0 180px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
}

.info-value {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
}

/* 404 Error Page */
.error-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e5e7eb 100%);
    padding: 20px;
}

.error-content {
    text-align: center;
    max-width: 500px;
}

.error-code {
    font-size: 120px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 20px;
    opacity: 0.9;
}

.error-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.error-message {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Search Bar Styling */
.input-group-text {
    background: #f9fafb;
    border: 1px solid #d1d5db;
}

/* Responsive */
@media (max-width: 768px) {
    /* Search bar responsive */
    .card-header .row {
        flex-direction: column;
        gap: 1rem;
    }

    .card-header .col-md-6.d-flex.justify-content-end {
        justify-content: flex-start !important;
    }

    .card-header .input-group {
        max-width: 100% !important;
    }

    /* Mobile Navbar Actions - Show on Mobile */
    .mobile-navbar-actions {
        display: flex;
    }

    /* Mobile Menu Overlay - Enable on Mobile */
    .mobile-menu-overlay {
        display: block;
    }

    /* Mobile Navbar Adjustments */
    .navbar-container {
        padding: 12px 20px;
    }

    /* Mobile Sidebar Menu */
    .navbar-nav {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        padding: 80px 0 100px 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }

    .navbar-nav.active {
        right: 0;
    }

    .navbar-nav li {
        width: 100%;
    }

    .navbar-nav .nav-link {
        display: block;
        width: 100%;
        padding: 16px 24px;
        border-radius: 0;
        border-left: 4px solid transparent;
        font-size: 15px;
        text-align: left;
    }

    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        border-left-color: white;
    }

    /* Grid Columns */
    .col-3, .col-4, .col-6, .col-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .auth-card {
        padding: 24px;
    }

    h1 {
        font-size: 20px;
    }

    .stats-card h3 {
        font-size: 24px;
    }

    /* Split Auth Responsive */
    .split-auth-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .auth-brand-side {
        padding: 40px 20px;
        min-height: auto;
        flex: none;
    }

    .auth-form-side {
        flex: none;
        padding: 40px 20px;
        overflow-y: visible;
    }

    .brand-title {
        font-size: 28px;
    }

    .brand-tagline {
        font-size: 14px;
        margin-bottom: 32px;
    }

    .brand-features {
        gap: 16px;
    }

    .form-header h2 {
        font-size: 24px;
    }
}

/* ==========================================
   MEMBERSHIP CARD STYLES
   ========================================== */

.membership-card-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.membership-card {
    width: 100%;
    max-width: 550px;
    aspect-ratio: 1.6 / 1;
    background: linear-gradient(135deg, #1e3a5f 0%, #0d2137 50%, #1e3a5f 100%);
    border-radius: 16px;
    padding: 24px 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.membership-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.03) 50%, transparent 60%),
        linear-gradient(45deg, transparent 45%, rgba(30, 58, 95, 0.5) 50%, transparent 55%);
    pointer-events: none;
}

.membership-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.membership-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.membership-card-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.membership-card-logo img {
    height: 32px;
    width: auto;
}

.membership-card-logo-text {
    font-size: 24px;
    font-weight: 800;
    color: #1e3a5f;
    letter-spacing: 2px;
}

.membership-card-title {
    color: #c9a227;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.membership-card-body {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    position: relative;
    z-index: 1;
    flex: 1;
}

.membership-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.membership-card-id {
    color: #c9a227;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
}

.membership-card-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    padding-top: 10px;
}

.membership-card-detail-row {
    color: #c9a227;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.membership-card-photo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.membership-card-photo {
    width: 100px;
    height: 120px;
    border: 3px solid #c9a227;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
}

.membership-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.membership-card-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%);
    color: #666;
    font-size: 40px;
}

.membership-card-name {
    color: #c9a227;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    max-width: 140px;
    word-wrap: break-word;
}

/* Responsive membership card */
@media (max-width: 600px) {
    .membership-card {
        padding: 16px 20px;
        max-width: 100%;
    }

    .membership-card-title {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .membership-card-id {
        font-size: 20px;
    }

    .membership-card-detail-row {
        font-size: 12px;
    }

    .membership-card-photo {
        width: 70px;
        height: 85px;
    }

    .membership-card-name {
        font-size: 12px;
        max-width: 100px;
    }

    .membership-card-logo-text {
        font-size: 18px;
    }

    .membership-card-logo img {
        height: 24px;
    }
}
