/* SMARTEEK Research Solutions - Brand Colors (blue, purple, green) */
:root {
    --smarteek-primary: #1e3a5f;
    --smarteek-blue: #2563eb;
    --smarteek-purple: #7c3aed;
    --smarteek-green: #059669;
    --smarteek-accent: #059669;
    --smarteek-secondary: #6b7280;
    --smarteek-dark: #0f172a;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Mobile responsiveness */
@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    .hero-section h1 {
        font-size: 1.75rem;
    }
    .hero-section .btn {
        width: 100%;
    }
    .hero-section .d-flex.gap-3 {
        flex-direction: column;
    }
}

@media (max-width: 767px) {
    .input-group-status {
        flex-direction: column;
    }
    .input-group-status .form-control,
    .input-group-status .btn {
        width: 100%;
        border-radius: 0.375rem !important;
    }
    .input-group-status .form-control {
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }
    .input-group-status .btn {
        margin-top: -1px;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
    }
}

/* Table scroll on small screens */
@media (max-width: 767px) {
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

/* Admin layout: fixed viewport shell — sidebar stable, main scrolls (desktop) */
.admin-body {
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-workspace {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}

.admin-sidebar {
    flex: 0 0 16.66666667%;
    width: 16.66666667%;
    max-width: 16.66666667%;
    background: #212529;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-main {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Admin mobile: whole workspace scrolls; sidebar full width on top */
@media (max-width: 767px) {
    .admin-body {
        height: auto;
        max-height: none;
        overflow: auto;
    }
    .admin-workspace {
        flex-direction: column;
        overflow: visible;
        min-height: 0;
    }
    .admin-sidebar {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        min-height: auto;
    }
    .admin-main {
        overflow: visible;
    }
}

main {
    flex: 1;
}

.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

.hero-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 40%, #7c3aed 100%);
    color: white;
    padding: 4rem 0;
    border-radius: 0 0 2rem 2rem;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-section--compact {
    padding: 2rem 0 1.5rem;
    margin-bottom: 0;
    border-radius: 0 0 1.25rem 1.25rem;
}

.customer-home-dashboard-card .table-warning {
    --bs-table-bg: rgba(255, 193, 7, 0.12);
}

.customer-home-requests-table code {
    font-size: 0.85em;
}

.service-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.service-category {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.btn-smarteek {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border: none;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    color: white;
}

.btn-smarteek:hover {
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    color: white;
}

/* Full-width strip directly under the main navbar (see includes/contact-bar.php) */
.site-contact-bar {
    background: linear-gradient(90deg, #0d5c4a, #047857);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.site-contact-bar a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.request-status-badge {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
}

#guestFields, #paymentEvidence {
    transition: all 0.3s ease;
}

.card {
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-control:focus, .form-select:focus {
    border-color: var(--smarteek-blue);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* writer-apply.php: clear borders on selects & fields (avoids white-on-white) */
.page-writer-apply .form-control,
.page-writer-apply .form-select,
.page-writer-apply select {
    border: 1px solid #94a3b8;
    background-color: #fff;
}

.page-writer-apply .form-control:focus,
.page-writer-apply .form-select:focus,
.page-writer-apply select:focus {
    border-color: var(--smarteek-blue);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    border-radius: 8px;
    margin: 2px 0;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

/* Admin — Add/Edit request modal: vertical scroll inside form (flex child must shrink: flex 1 1 0%) */
#requestCrudModal .modal-dialog.modal-dialog-scrollable {
    max-height: calc(100vh - 1.5rem);
    margin: 0.75rem auto;
}

#requestCrudModal .modal-content {
    max-height: calc(100vh - 1.5rem);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#requestCrudModal #requestCrudForm {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

/* This block must shrink (not grow with content) or no scrollbar appears */
#requestCrudModal .modal-body {
    flex: 1 1 0%;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

#requestCrudModal .modal-header,
#requestCrudModal .modal-footer {
    flex-shrink: 0;
}

.stat-card {
    border-left: 4px solid var(--smarteek-blue);
}

.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--smarteek-blue);
    background: rgba(37, 99, 235, 0.05);
}

/* WhatsApp sticky CTA - mobile friendly */
.whatsapp-sticky {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
@media (min-width: 768px) {
    .whatsapp-sticky { bottom: 32px; right: 32px; width: 60px; height: 60px; }
}

.request-steps .step { color: inherit; }
.request-steps .step.active { font-weight: 600; color: var(--smarteek-primary); }

/* Institution autocomplete dropdown */
.institution-autocomplete-wrap .list-group { top: 100%; left: 0; right: 0; margin-top: -1px; border-radius: 0 0 0.375rem 0.375rem; }
.institution-autocomplete-wrap .list-group-item { cursor: pointer; }
.institution-autocomplete-wrap .list-group-item:hover { background-color: rgba(30, 58, 95, 0.08); }

/* Compact footer - ~50% less height */
.site-footer {
    padding: 0.75rem 0 0.5rem;
    margin-top: 2rem;
    font-size: 0.8125rem;
}
.site-footer .footer-row {
    padding-bottom: 0.5rem;
}
.site-footer .footer-col {
    padding: 0.25rem 0.5rem 0.25rem 0;
}
.site-footer .footer-heading {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.25rem;
    opacity: 0.95;
}
.site-footer .footer-text {
    font-size: 0.8125rem;
    line-height: 1.35;
    margin-bottom: 0.15rem;
}
.site-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
}
.site-footer .footer-links a {
    opacity: 0.9;
    text-decoration: none;
}
.site-footer .footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}
.site-footer .footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.75rem;
}
.site-footer .footer-social a {
    opacity: 0.9;
}
.site-footer .footer-social a:hover {
    opacity: 1;
}
@media (max-width: 767px) {
    .site-footer .footer-col { padding-right: 0; margin-bottom: 0.5rem; }
    .site-footer .footer-bottom { justify-content: center; text-align: center; }
}

/* Customer payment panel (request status, my requests) */
.customer-payment-panel-header {
    background: linear-gradient(135deg, var(--smarteek-primary) 0%, var(--smarteek-blue) 55%, #4f46e5 100%);
}
.customer-payment-steps {
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.12);
}
.payment-gateway-grid .payment-gateway-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(30, 58, 95, 0.12);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
}
.payment-gateway-grid .payment-gateway-tile:hover {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.08);
}
.payment-gateway-grid .payment-gateway-tile:focus-visible {
    outline: 2px solid var(--smarteek-blue);
    outline-offset: 2px;
}
.payment-gateway-grid .payment-gateway-tile.is-active {
    border-color: var(--smarteek-blue);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
    background: rgba(37, 99, 235, 0.06);
}
.payment-gateway-tile-icon {
    font-size: 1.35rem;
    color: var(--smarteek-blue);
    line-height: 1;
    margin-bottom: 0.15rem;
}
.payment-gateway-tile-title {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--smarteek-dark);
}
.payment-gateway-tile-sub {
    font-size: 0.7rem;
    color: var(--smarteek-secondary);
    line-height: 1.25;
}
.payment-bank-details-card {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.customer-payment-evidence-form .upload-zone {
    border: 2px dashed rgba(37, 99, 235, 0.25);
    border-radius: 0.5rem;
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    background: rgba(37, 99, 235, 0.03);
    transition: background 0.15s ease, border-color 0.15s ease;
}
.customer-payment-evidence-form .upload-zone:hover {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.4);
}

/* Request form — service badge picker */
.service-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.service-picker-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(30, 58, 95, 0.18);
    border-radius: 0.5rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.service-picker-badge:hover {
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.08);
}
.service-picker-name {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.3;
    color: var(--smarteek-dark);
}
.service-picker-price {
    font-size: 0.7rem;
    font-weight: 600;
}
.btn-check:checked + .service-picker-badge {
    border-color: var(--smarteek-blue);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
    background: rgba(37, 99, 235, 0.06);
}
.btn-check:focus-visible + .service-picker-badge {
    outline: 2px solid var(--smarteek-blue);
    outline-offset: 2px;
}
