/* ============================================
   VIKESERVE APP STYLES - ORGANIZED VERSION
   ============================================ */

/* ========== 1. GLOBAL VARIABLES & RESETS ========== */
:root {
    --primary: #2E86DE;
    --primary-dark: #1A56B0;
    --secondary: #341f97;
    --emergency: #FF5E5E;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --dark: #2c3e50;
    --light: #f9f9f9;
    --grey: #ecf0f1;
    --grey-dark: #bdc3c7;
    --card-shadow: 0 5px 15px rgba(128, 92, 92, 0.08);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary: #3b8df1;
    --primary-dark: #2a6ac8;
    --secondary: #4a33c5;
    --emergency: #ff7676;
    --success: #32c971;
    --warning: #f5b342;
    --danger: #f66555;
    --dark: #e0e6ed;
    --light: #2a2e35;
    --grey: #3a3f47;
    --grey-dark: #5c626a;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f5f8fa;
    color: var(--dark);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

[data-theme="dark"] body {
    background-color: #1e2126;
}

/* ========== 2. CONTAINER & MAIN LAYOUT ========== */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 85px;
    background: white;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    overflow-x: hidden;
}

[data-theme="dark"] .container {
    background: #24282f;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.app-content {
    padding: 20px 20px 90px 20px;
    position: relative;
}

/* ========== 3. HEADER & NAVIGATION ========== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    font-size: 1.8rem;
    margin-right: 12px;
    background: white;
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-weight: 700;
    font-size: 1.4rem;
}

.location-selector {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.location-selector:hover {
    background: rgba(255, 255, 255, 0.3);
}

.location-selector i {
    margin-right: 8px;
    font-size: 0.9rem;
}

.location-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.user-profile {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========== 4. BOTTOM NAVIGATION (4 TABS) ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    display: flex;
    background: white;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
    z-index: 100;
    border-top: 1px solid var(--grey);
    padding: 8px 0 12px 0;  /* Increased bottom padding */
}

[data-theme="dark"] .bottom-nav {
    background: #2d333b;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.3);
    border-top: 1px solid #3a3f47;
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 8px 2px;
    color: var(--dark);
    font-size: 0.65rem;
    opacity: 0.6;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nav-item.active {
    opacity: 1;
    color: var(--primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 3px 3px;
}

.nav-icon {
    font-size: 1.2rem;
    margin-bottom: 3px;
    transition: var(--transition);
}

.nav-item.active .nav-icon {
    transform: translateY(-2px);
}

.nav-item:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* ========== 5. TAB CONTENT ========== */
.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ========== 6. SEARCH BAR ========== */
.search-bar {
    display: flex;
    align-items: center;
    background: var(--grey);
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 20px;
    position: relative;
}

.search-icon {
    margin-right: 10px;
    color: var(--grey-dark);
    flex-shrink: 0;
}

.search-input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 1rem;
    color: var(--dark);
}

.search-input:focus {
    outline: none;
}

/* ========== 7. SECTION TITLES & MODULE CARDS ========== */
.section-title {
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

[data-theme="dark"] .module-card {
    background: #2d333b;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.see-all {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
}

/* ========== 8. QUICK ACTIONS ========== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.quick-action {
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 10px 5px;
    border-radius: 10px;
    background: white;
    box-shadow: var(--card-shadow);
}

[data-theme="dark"] .quick-action {
    background: #2d333b;
}

.quick-action:hover {
    transform: translateY(-5px);
    background: var(--light);
}

[data-theme="dark"] .quick-action:hover {
    background: #353b44;
}

.action-icon {
    width: 50px;
    height: 50px;
    background: var(--light);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.2rem;
    color: var(--primary);
    transition: var(--transition);
}

.quick-action:hover .action-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.action-name {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
}

/* ========== 9. JOB & SERVICE CARDS ========== */
.job-card {
    background: var(--light);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: var(--transition);
    cursor: pointer;
}

[data-theme="dark"] .job-card {
    background: #353b44;
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow);
}

.job-title {
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.job-poster {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.job-poster-img {
    width: 30px;
    height: 30px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.job-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.job-tag {
    background: var(--grey);
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 500;
}

.job-tag.urgent {
    background: var(--emergency);
    color: white;
}

.service-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: var(--transition);
}

[data-theme="dark"] .service-card {
    background: #2d333b;
}

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

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.service-title {
    font-weight: 600;
    flex: 1;
    margin-right: 10px;
}

.service-price {
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.service-provider {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.provider-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
    font-size: 0.8rem;
}

.provider-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.provider-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--grey-dark);
}

.provider-rating i {
    color: var(--warning);
    font-size: 0.7rem;
}

/* ========== 10. MARKETPLACE & HOUSING ========== */
.market-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.market-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .market-item {
    background: #2d333b;
}

.market-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.market-item-img {
    height: 120px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
    overflow: hidden;
}

.market-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.market-item-info {
    padding: 12px;
}

.market-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

.market-item-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.market-item-location {
    font-size: 0.7rem;
    color: var(--grey-dark);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.property-listing {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    margin-bottom: 15px;
}

[data-theme="dark"] .property-listing {
    background: #2d333b;
}

.property-listing:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.property-image {
    height: 180px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
}

.property-info {
    padding: 15px;
}

.property-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.property-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.property-meta {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--grey-dark);
    margin-bottom: 12px;
}

.property-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== 11. MARKET FILTERS ========== */
.market-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 16px;  /* Increased from 8px 16px */
    min-height: 38px;
    background: var(--light);
    border: 1px solid var(--grey);
    border-radius: 25px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    user-select: none;
}

.filter-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

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

/* ========== 12. SERVICE CATEGORIES ========== */
.service-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.service-category {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: transform 0.2s;
}

[data-theme="dark"] .service-category {
    background: #2d333b;
}

.service-category:hover {
    transform: translateY(-3px);
}

.service-category-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.service-category-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 3px;
}

.service-category-desc {
    font-size: 0.7rem;
    color: var(--grey-dark);
}

/* ========== 13. WARNING & ALERT ITEMS ========== */
.warning-item {
    background: rgba(243, 156, 18, 0.1);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    border-left: 4px solid var(--warning);
}

.warning-item.danger {
    background: rgba(231, 76, 60, 0.1);
    border-left-color: var(--danger);
}

.warning-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.warning-icon {
    color: var(--warning);
    margin-right: 10px;
    font-size: 1rem;
}

.warning-item.danger .warning-icon {
    color: var(--danger);
}

.warning-title {
    font-weight: 600;
    font-size: 0.85rem;
}

.warning-content {
    font-size: 0.8rem;
}

.alert-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--warning);
}

[data-theme="dark"] .alert-item {
    background: #2d333b;
}

.alert-item.emergency {
    border-left-color: var(--emergency);
}

.alert-item.info {
    border-left-color: var(--primary);
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.alert-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-time {
    font-size: 0.7rem;
    color: var(--grey-dark);
}

.alert-content {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* ========== 14. BUTTONS ========== */
.btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(46, 134, 222, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-outline:hover {
    background: var(--light);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.75rem;
}

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

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

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

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-promote {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

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

/* ========== 15. FORMS & INPUTS ========== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--grey);
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--dark);
}

[data-theme="dark"] .form-input {
    background: #353b44;
    border-color: #454c56;
    color: #e0e6ed;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 134, 222, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bdc3c7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
    padding-right: 40px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-hint {
    font-size: 0.7rem;
    color: var(--grey-dark);
    margin-top: 5px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ========== 16. MODALS ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 20000;
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

[data-theme="dark"] .modal-content {
    background: #2d333b;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--grey);
}

.modal-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

.close-modal-btn:hover {
    color: var(--danger);
    transform: scale(1.1);
}

/* ========== 17. AUTHENTICATION MODAL ========== */
#auth-modal {
    z-index: 10000 !important;
}

#auth-modal .modal-content {
    z-index: 10001 !important;
}

.auth-providers {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-provider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--grey);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

[data-theme="dark"] .auth-provider-btn {
    background: #353b44;
}

.auth-provider-btn:hover {
    background: var(--light);
}

.google-btn {
    color: #DB4437;
}

.facebook-btn {
    color: #4267B2;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--grey-dark);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--grey);
}

.auth-divider span {
    padding: 0 15px;
    font-size: 0.8rem;
}

.auth-footer {
    margin-top: 15px;
    text-align: center;
    font-size: 0.8rem;
}

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

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--grey-dark);
}

/* ========== 18. ROLE SELECTION ========== */
.role-selection {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 5px;
}

.role-option {
    padding: 10px;
    border: 1px solid var(--grey);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.role-option:hover {
    border-color: var(--primary);
    background: rgba(46, 134, 222, 0.05);
}

.role-option.selected {
    border-color: var(--primary);
    background: rgba(46, 134, 222, 0.1);
}

.role-option i {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary);
}

.role-option span {
    font-size: 0.7rem;
}

/* ========== 19. TOAST NOTIFICATIONS ========== */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: white;
    border-radius: 10px;
    padding: 12px 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

.toast-icon {
    font-size: 1.1rem;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error .toast-icon {
    color: var(--danger);
}

/* ========== 20. USER MENU ========== */
.user-menu {
    position: absolute;
    top: 70px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 220px;
    z-index: 1000;
    display: none;
}

[data-theme="dark"] .user-menu {
    background: #2d333b;
}

.user-menu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-menu-header {
    padding: 15px;
    border-bottom: 1px solid var(--grey);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.user-details {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: var(--grey-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.user-menu-item:hover {
    background: var(--grey);
}

.user-menu-item i {
    width: 20px;
    color: var(--primary);
}

/* ========== 21. PROFILE PAGE ========== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.profile-stat {
    background: white;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

[data-theme="dark"] .profile-stat {
    background: #2d333b;
}

.profile-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.profile-stat-label {
    font-size: 0.7rem;
    color: var(--grey-dark);
}

/* ========== 22. MORE SECTION ========== */
.more-section {
    display: none;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: white;
    z-index: 2000;
    overflow-y: auto;
}

.more-section.active {
    display: block;
    animation: slideUp 0.3s ease;
}

[data-theme="dark"] .more-section {
    background: #24282f;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
    }
    to {
        transform: translate(-50%, 0);
    }
}

.more-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.more-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

.more-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.more-tab-nav {
    display: flex;
    background: white;
    border-bottom: 1px solid var(--grey);
    padding: 0 10px;
    position: sticky;
    top: 60px;
    z-index: 10;
    overflow-x: auto;
}

[data-theme="dark"] .more-tab-nav {
    background: #2d333b;
    border-bottom-color: #3a3f47;
}

.more-tab-btn {
    flex: 1;
    text-align: center;
    padding: 12px 5px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    font-size: 0.7rem;
    opacity: 0.6;
    min-width: 70px;
}

.more-tab-btn.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
    opacity: 1;
}

.more-tab-icon {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.more-tab-content {
    display: none;
    padding: 20px;
    padding-bottom: 100px;
}

.more-tab-content.active {
    display: block;
}

.more-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
    z-index: 2001;
    border-top: 1px solid var(--grey);
    padding: 5px 0;
}

[data-theme="dark"] .more-bottom-nav {
    background: #2d333b;
}

.more-section.active ~ .more-bottom-nav {
    display: flex;
}

.more-section.active ~ .bottom-nav {
    display: none;
}

/* ========== 23. EDUCATION SECTION ========== */
.education-subtabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.subtab-btn {
    padding: 10px 15px;
    background: var(--light);
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

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

.subtab-content {
    display: none;
}

.subtab-content.active {
    display: block;
}

.teachers-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.teacher-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

[data-theme="dark"] .teacher-card {
    background: #2d333b;
}

.teacher-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.teacher-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.teacher-info {
    flex: 1;
}

.teacher-name {
    font-weight: 600;
    margin-bottom: 3px;
}

.teacher-rating {
    font-size: 0.8rem;
    color: var(--warning);
}

/* ========== 24. SETTINGS SECTION ========== */
.settings-section {
    margin-bottom: 25px;
    padding: 15px;
    border-radius: 12px;
    background: var(--light);
    border: 1px solid var(--grey);
}

[data-theme="dark"] .settings-section {
    background: #2d333b;
    border-color: #3a3f47;
}

.settings-section-title {
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--grey);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
}

.settings-option {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--grey);
    cursor: pointer;
    transition: var(--transition);
}

.settings-option:last-child {
    border-bottom: none;
}

.settings-option:hover {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
}

[data-theme="dark"] .settings-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.settings-option-icon {
    width: 40px;
    height: 40px;
    background: var(--light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: var(--primary);
    font-size: 1.1rem;
}

[data-theme="dark"] .settings-option-icon {
    background: #353b44;
}

.settings-option-info {
    flex: 1;
}

.settings-option-title {
    font-weight: 600;
    margin-bottom: 3px;
    font-size: 0.9rem;
}

.settings-option-desc {
    font-size: 0.8rem;
    color: var(--grey-dark);
}

.settings-option-arrow {
    color: var(--grey-dark);
    margin-left: 10px;
}

.settings-option-toggle {
    margin-left: 10px;
}

/* ========== 25. SAFETY SECTION ========== */
.safety-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.safety-category {
    padding: 10px 15px;
    background: var(--light);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    min-width: 80px;
    transition: var(--transition);
}

.safety-category.active {
    background: var(--primary);
    color: white;
}

.safety-category-content {
    display: none;
}

.safety-category-content.active {
    display: block;
}

.safety-tips {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.safety-tip {
    display: flex;
    background: white;
    border-radius: 10px;
    padding: 12px;
    border-left: 4px solid var(--success);
}

[data-theme="dark"] .safety-tip {
    background: #2d333b;
}

.safety-tip.positive {
    border-left-color: var(--success);
}

.safety-tip.negative {
    border-left-color: var(--danger);
}

.safety-tip.warning {
    border-left-color: var(--warning);
}

.tip-icon {
    margin-right: 12px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.safety-tip.positive .tip-icon {
    color: var(--success);
}

.safety-tip.negative .tip-icon {
    color: var(--danger);
}

.safety-tip.warning .tip-icon {
    color: var(--warning);
}

.tip-content {
    flex: 1;
}

.tip-content strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.tip-content p {
    font-size: 0.85rem;
    color: var(--grey-dark);
    margin: 0;
}

/* ========== 26. IMAGE UPLOAD & PREVIEW ========== */
.image-upload-area {
    border: 2px dashed var(--grey);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--light);
}

.image-upload-area:hover {
    border-color: var(--primary);
    background: rgba(46, 134, 222, 0.05);
}

.image-upload-area i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    display: inline-block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.image-preview-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: transform 0.2s;
}

.remove-image-btn:hover {
    transform: scale(1.1);
}

/* ========== 27. FEATURES GRID ========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 5px;
}

.feature-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: background 0.2s;
}

.feature-checkbox:hover {
    background: var(--grey);
}

.feature-checkbox input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ========== 28. PROMOTED ADS ========== */
.promoted-badge {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    color: #2c3e50;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
}

.promoted-ad {
    border: 2px solid #f1c40f;
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.05), rgba(230, 126, 34, 0.05));
    position: relative;
    overflow: hidden;
}

.ad-package {
    border: 2px solid var(--grey);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.ad-package:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.ad-package.selected {
    border-color: var(--primary);
    background: rgba(46, 134, 222, 0.05);
}

.package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.package-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.package-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
}

/* ========== 29. PAYMENT METHODS ========== */
.payment-method-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--light);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--grey);
}

.payment-method-option:hover {
    transform: translateX(5px);
    border-color: var(--primary);
}

.payment-method-option.selected {
    border-color: var(--primary);
    background: rgba(46, 134, 222, 0.1);
}

.method-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
}

.method-info {
    flex: 1;
}

.method-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.method-desc {
    font-size: 0.7rem;
    color: var(--grey-dark);
}

/* ========== 30. LOADING & EMPTY STATES ========== */
.loading-spinner {
    text-align: center;
    padding: 40px 20px;
    color: var(--grey-dark);
}

.loading-spinner:before {
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid var(--grey);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px auto;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--grey-dark);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

/* ========== 31. CHAT STYLES ========== */
.chat-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 300px;
    height: 400px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

[data-theme="dark"] .chat-container {
    background: #2d333b;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: var(--light);
}

[data-theme="dark"] .chat-messages {
    background: #1e2126;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.message.sent {
    justify-content: flex-end;
}

.message.received {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
}

.message.sent .message-content {
    background: var(--primary);
    color: white;
}

.message.received .message-content {
    background: var(--grey);
    color: var(--dark);
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 5px;
}

.chat-input-container {
    padding: 15px;
    border-top: 1px solid var(--grey);
    display: flex;
    gap: 10px;
}

.chat-input-container input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--grey);
    border-radius: 20px;
}

/* ========== 32. LOCATION INPUT ========== */
.location-input-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.btn-location-detect {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-location-detect:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.location-status {
    font-size: 0.8rem;
    margin-top: 5px;
    min-height: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ========== 33. SWITCH TOGGLE ========== */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* ========== 34. AD CONTAINER ========== */
.ad-container {
    background: var(--light);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    position: relative;
}

.ad-label {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--grey);
    color: var(--dark);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.ad-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.ad-description {
    font-size: 0.8rem;
    margin-bottom: 10px;
    color: var(--grey-dark);
}

.ad-cta {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.8rem;
    cursor: pointer;
}

/* ========== 35. BOOKING STYLES ========== */
.booking-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--card-shadow);
}

[data-theme="dark"] .booking-item {
    background: #2d333b;
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.booking-title {
    font-weight: 600;
}

.booking-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.booking-status.pending {
    background: #fff3cd;
    color: #856404;
}

.booking-status.confirmed {
    background: #d4edda;
    color: #155724;
}

.booking-status.completed {
    background: #d1ecf1;
    color: #0c5460;
}

.booking-status.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.booking-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.booking-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* ========== 36. REVIEWS & RATINGS ========== */
.review-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--card-shadow);
}

[data-theme="dark"] .review-item {
    background: #2d333b;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-author {
    font-weight: 600;
}

.review-rating {
    color: var(--warning);
}

.star-rating {
    display: flex;
    gap: 3px;
    cursor: pointer;
}

.star-rating i {
    font-size: 1.2rem;
    color: var(--warning);
    transition: var(--transition);
}

.star-rating i:hover {
    transform: scale(1.1);
}

/* ========== 37. RESPONSIVE DESIGN ========== */
@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .market-items {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .service-categories {
        grid-template-columns: 1fr;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .nav-item {
        font-size: 0.6rem;
        padding: 6px 1px;
    }
    
    .nav-icon {
        font-size: 1.1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .more-tab-btn {
        font-size: 0.65rem;
        padding: 10px 3px;
    }
    
    .emergency-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-item {
        font-size: 0.55rem;
    }
    
    .nav-icon {
        font-size: 1rem;
    }
    
    .market-item-title {
        font-size: 0.8rem;
    }
}

/* ========== 38. UTILITIES & ANIMATIONS ========== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

/* ========== 39. DARK MODE TOGGLE ========== */
.dark-mode-toggle {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 99;
    transition: var(--transition);
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ========== 40. APP INFO FOOTER ========== */
.app-info-footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    border-top: 1px solid var(--grey);
    color: var(--grey-dark);
    font-size: 0.8rem;
}

.app-version {
    font-weight: 600;
    margin-bottom: 5px;
}

.app-copyright {
    font-size: 0.7rem;
}

        /* Fix for more tab navigation - keep it sticky */
        .more-tab-nav {
            position: sticky !important;
            top: 0 !important;
            background: var(--background-color, white);
            z-index: 100 !important;
            overflow-x: auto !important;
            white-space: nowrap !important;
            display: flex !important;
            flex-wrap: nowrap !important;
        }
        
        [data-theme="dark"] .more-tab-nav {
            background: #24282f !important;
        }
        
        /* Ensure content scrolls properly */
        .more-section {
            display: none;
            position: fixed;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: 480px;
            height: 100%;
            background: white;
            z-index: 2000;
            overflow-y: auto;
        }
        
        .more-section.active {
            display: block;
        }
        
        /* Fix tab buttons container */
        .more-tab-btn {
            flex: 0 0 auto !important;
            min-width: 70px !important;
        }
        
        /* Fix tab content scrolling */
        .more-tab-content {
            overflow-y: auto;
            padding-bottom: 100px;
        }

        /* ========== ACCESSIBILITY: REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========== TOUCH TARGET IMPROVEMENTS ========== */
/* Ensure all interactive elements are at least 44x44px */
button,
.btn,
.btn-sm,
.nav-item,
.quick-action,
.filter-btn,
.market-item-actions button,
.property-actions button,
.action-option,
.payment-method,
.package-card {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* For small text links that might be too small */
.see-all,
.close-modal-btn,
.more-close {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========== SKELETON LOADING ========== */
.skeleton {
    background: linear-gradient(90deg, var(--grey) 25%, var(--grey-dark) 50%, var(--grey) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Skeleton variants */
.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-image {
    height: 150px;
    width: 100%;
    border-radius: 8px;
}

.skeleton-button {
    height: 40px;
    width: 100px;
    border-radius: 20px;
}

/* ========== MISSING COMPONENT STYLES ========== */

/* Property Listings */
.property-listing {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}
[data-theme="dark"] .property-listing {
    background: #2d333b;
}
.property-listing:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.property-image {
    height: 180px;
    background: var(--light);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.property-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}
.property-badge.urgent {
    background: var(--emergency);
}
.property-badge.rented {
    background: #95a5a6;
}
.property-info {
    padding: 15px;
}
.property-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1rem;
}
.property-location {
    font-size: 0.75rem;
    color: var(--grey-dark);
    margin-bottom: 8px;
}
.property-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 8px;
}
.property-meta {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--grey-dark);
    margin-bottom: 12px;
}
.property-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.property-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* Education Subtabs */
.education-subtabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}
.subtab-btn {
    padding: 10px 15px;
    background: var(--light);
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    min-height: 40px;
}
.subtab-btn.active {
    background: var(--primary);
    color: white;
}
.subtab-content {
    display: none;
}
.subtab-content.active {
    display: block;
}

/* Teachers Grid */
.teachers-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.teacher-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}
[data-theme="dark"] .teacher-card {
    background: #2d333b;
}
.teacher-card:hover {
    transform: translateY(-2px);
}
.teacher-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}
.teacher-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}
.teacher-info {
    flex: 1;
}
.teacher-name {
    font-weight: 600;
    margin-bottom: 3px;
}
.teacher-rating {
    font-size: 0.8rem;
    color: var(--warning);
}

/* Safety Categories */
.safety-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}
.safety-category {
    padding: 10px 15px;
    background: var(--light);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    min-width: 80px;
    transition: var(--transition);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.safety-category.active {
    background: var(--primary);
    color: white;
}
.safety-category-content {
    display: none;
}
.safety-category-content.active {
    display: block;
}

/* Safety Tips */
.safety-tips {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.safety-tip {
    display: flex;
    background: white;
    border-radius: 10px;
    padding: 12px;
    border-left: 4px solid var(--success);
}
[data-theme="dark"] .safety-tip {
    background: #2d333b;
}
.safety-tip.positive {
    border-left-color: var(--success);
}
.safety-tip.negative {
    border-left-color: var(--danger);
}
.safety-tip.warning {
    border-left-color: var(--warning);
}
.tip-icon {
    margin-right: 12px;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.safety-tip.positive .tip-icon {
    color: var(--success);
}
.safety-tip.negative .tip-icon {
    color: var(--danger);
}
.safety-tip.warning .tip-icon {
    color: var(--warning);
}
.tip-content {
    flex: 1;
}
.tip-content strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}
.tip-content p {
    font-size: 0.85rem;
    color: var(--grey-dark);
    margin: 0;
}

/* Alert Items */
.alert-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--warning);
}
[data-theme="dark"] .alert-item {
    background: #2d333b;
}
.alert-item.emergency {
    border-left-color: var(--emergency);
}
.alert-item.info {
    border-left-color: var(--primary);
}
.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.alert-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-time {
    font-size: 0.7rem;
    color: var(--grey-dark);
}
.alert-content {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* Booking Items */
.booking-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--card-shadow);
}
[data-theme="dark"] .booking-item {
    background: #2d333b;
}
.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.booking-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.booking-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
}
.booking-status.pending {
    background: #fff3cd;
    color: #856404;
}
.booking-status.confirmed {
    background: #d4edda;
    color: #155724;
}
.booking-status.completed {
    background: #d1ecf1;
    color: #0c5460;
}
.booking-status.cancelled {
    background: #f8d7da;
    color: #721c24;
}
.booking-status.in_progress {
    background: #d4edda;
    color: #155724;
}
.booking-status.rejected {
    background: #f8d7da;
    color: #721c24;
}
.booking-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.8rem;
}
.booking-with {
    font-size: 0.8rem;
    margin-bottom: 10px;
    padding: 8px;
    background: var(--grey);
    border-radius: 8px;
}
.booking-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.booking-actions .btn-sm {
    flex: 1;
    min-width: 80px;
}

/* Chat Styles */
.chat-messages {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: var(--light);
    border-radius: 10px;
}
.chat-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}
.chat-message.own-message {
    align-items: flex-end;
}
.chat-message.other-message {
    align-items: flex-start;
}
.chat-message.system-message {
    align-items: center;
}
.message-sender {
    font-size: 0.7rem;
    color: var(--grey-dark);
    margin-bottom: 4px;
}
.message-content {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    background: var(--primary);
    color: white;
}
.other-message .message-content {
    background: var(--grey);
    color: var(--dark);
}
.system-message .message-content {
    background: var(--warning);
    color: var(--dark);
    font-size: 0.8rem;
    padding: 6px 12px;
}
.message-text {
    word-wrap: break-word;
}
.message-time {
    font-size: 0.6rem;
    color: var(--grey-dark);
    margin-top: 4px;
}
.message-attachment {
    margin-bottom: 8px;
}
.message-attachment img {
    max-width: 200px;
    border-radius: 8px;
    cursor: pointer;
}
.message-attachment.file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 8px;
}
.attachment-info {
    flex: 1;
}
.attachment-name {
    font-size: 0.8rem;
    font-weight: 500;
}
.attachment-size {
    font-size: 0.6rem;
    opacity: 0.7;
}
.download-btn {
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    gap: 5px;
    margin: 10px 0;
}
.star-rating-input i {
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}
.star-rating-input i:hover {
    transform: scale(1.1);
}

/* Rating Stars Display */
.rating-stars {
    display: flex;
    gap: 3px;
}
.rating-stars i {
    font-size: 1rem;
    color: var(--warning);
}

/* Promoted Ad Styles */
.promoted-ad {
    border: 2px solid #f1c40f;
    position: relative;
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.05), rgba(230, 126, 34, 0.05));
}
.promoted-badge {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    color: #2c3e50;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
}

/* Sold Badge */
.sold-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Upload Progress Modal */
.upload-progress-modal {
    padding: 20px;
}
.upload-progress-list {
    max-height: 300px;
    overflow-y: auto;
}
.upload-item {
    padding: 10px;
    border-bottom: 1px solid var(--grey);
}
.upload-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.8rem;
}
.upload-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}
.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--grey);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s;
}
.progress-text {
    font-size: 0.7rem;
    min-width: 45px;
}
.upload-status {
    margin-left: 10px;
}
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.image-preview-item {
    position: relative;
    display: inline-block;
}
.image-preview-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}
.remove-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Search Results Container */
.search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

[data-theme="dark"] .search-results-container {
    background: #2d333b;
}

.search-result-item {
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--grey);
}

/* Quarter and three-quarter stars (Font Awesome 6) */
.fa-star-quarter-alt:before {
    content: "\f089";
}
.fa-star-three-quarters-alt:before {
    content: "\f088";
}

/* Ensure modals created by showModalWithContent are on top */
.modal[style*="display: flex"],
.modal[style*="display: block"] {
    z-index: 20001 !important;
}

/* More menu modals need to be above the more menu */
#more-section .modal {
    z-index: 20002 !important;
}

/* ========== CHAT STYLES ========== */

/* Chat Container */
.chat-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 80vh;
    background: var(--background-color);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.2);
    z-index: 20000;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

[data-theme="dark"] .chat-container {
    background: #1e2126;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100%);
    }
    to {
        transform: translateX(-50%) translateY(0);
    }
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.chat-header-details h3 {
    margin: 0;
    font-size: 1rem;
}

.chat-header-details p {
    margin: 0;
    font-size: 0.7rem;
    opacity: 0.8;
}

.chat-header-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chat Messages Area */
.chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Message Bubbles */
.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.chat-message-sent {
    align-self: flex-end;
}

.chat-message-received {
    align-self: flex-start;
}

.chat-message-system {
    align-self: center;
    max-width: 90%;
}

.message-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    word-wrap: break-word;
}

.sent .message-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.received .message-bubble {
    background: var(--light);
    color: var(--dark);
    border-bottom-left-radius: 4px;
}

[data-theme="dark"] .received .message-bubble {
    background: #2d333b;
    color: #e0e6ed;
}

.system .message-bubble {
    background: var(--warning);
    color: var(--dark);
    font-size: 0.8rem;
    text-align: center;
}

.message-time {
    font-size: 0.6rem;
    color: var(--grey-dark);
    margin-top: 4px;
    padding: 0 4px;
}

.sent .message-time {
    text-align: right;
}

.message-status {
    font-size: 0.6rem;
    margin-left: 5px;
}

.message-status .delivered {
    color: var(--success);
}

.message-status .read {
    color: var(--primary);
}

/* Message Attachments */
.message-attachment {
    margin-top: 8px;
    cursor: pointer;
}

.message-attachment img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 12px;
}

.message-attachment.file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.attachment-icon {
    font-size: 1.2rem;
}

.attachment-info {
    flex: 1;
}

.attachment-name {
    font-size: 0.8rem;
    font-weight: 500;
}

.attachment-size {
    font-size: 0.6rem;
    opacity: 0.7;
}

/* Chat Input Area */
.chat-input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--light);
    border-top: 1px solid var(--grey);
    border-radius: 0 0 20px 20px;
}

[data-theme="dark"] .chat-input-area {
    background: #2d333b;
}

.chat-input-area textarea {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--grey);
    border-radius: 25px;
    font-size: 0.9rem;
    resize: none;
    background: white;
    color: var(--dark);
    font-family: inherit;
    max-height: 100px;
}

[data-theme="dark"] .chat-input-area textarea {
    background: #353b44;
    border-color: #454c56;
    color: #e0e6ed;
}

.chat-input-area textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-attach-btn,
.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.chat-attach-btn:hover,
.chat-send-btn:hover {
    transform: scale(1.05);
}

.chat-attach-btn:disabled,
.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--light);
    border-radius: 18px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--grey-dark);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Scrollbar */
.chat-messages-area::-webkit-scrollbar {
    width: 5px;
}

.chat-messages-area::-webkit-scrollbar-track {
    background: var(--grey);
    border-radius: 10px;
}

.chat-messages-area::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* ========== PAYMENT STYLES (Add at the end of your CSS) ========== */

/* Package Cards */
.package-card {
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.package-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Payment Methods Grid */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.payment-method {
    transition: all 0.2s ease;
    cursor: pointer;
}

.payment-method:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Verification Tabs */
.verification-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--grey);
}

.verification-tab {
    padding: 10px 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.verification-tab.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.verification-tab-content {
    padding: 15px 0;
}

/* Payment Loader */
.payment-loader {
    border: 4px solid var(--grey);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* Status Message */
#status-message {
    font-size: 0.85rem;
    color: var(--grey-dark);
    text-align: center;
}

/* Payment Success Display */
#payment-success-display {
    text-align: center;
    padding: 20px;
}

#payment-success-display i {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 15px;
}

/* Card Details Form */
#card-details .form-row {
    display: flex;
    gap: 10px;
}

#card-details .form-group {
    flex: 1;
}

/* Credit Card Input Formatting */
#card-number {
    letter-spacing: 1px;
}

#card-expiry {
    text-transform: uppercase;
}

/* Manual Verification Form */
#manual-verify-tab .warning-item {
    margin: 15px 0;
    padding: 12px;
    background: rgba(243, 156, 18, 0.1);
    border-radius: 8px;
}

/* Disabled Button State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Responsive for Payment Methods */
@media (max-width: 480px) {
    .payment-methods-grid {
        grid-template-columns: 1fr;
    }
    
    #card-details .form-row {
        flex-direction: column;
        gap: 12px;
    }
}