:root {
    /* Colors */
    --primary: #009060;
    /* Green from screenshot */
    --primary-dark: #007a50;
    --primary-light: #e6f4ef;

    --secondary: #1f2937;

    /* Neutrals */
    --bg: #eff2f6;
    /* Light gray background */
    --bg-card: #ffffff;
    --text: #333333;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --border: #e5e7eb;

    /* Status colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-sans: 'Montserrat', system-ui, -apple-system, sans-serif;
}

/* ============ Reset & Base ============ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ============ Dashboard Grid Layout ============ */

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.dashboard-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.profile-card {
    text-align: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    background: var(--bg);
    border-radius: 50%;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-light);
}

.profile-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-role {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.profile-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: var(--bg);
    color: var(--text);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.dashboard-content {
    min-width: 0;
    /* Prevents overflow in grid */
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ Navigation ============ */

.navbar {
    background-color: #ffffff;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
    /* Subtle border instead of heavy shadow */
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--secondary);
    text-transform: uppercase;
}

.logo-green {
    color: var(--primary);
    background: rgba(0, 144, 96, 0.1);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
    /* Wider spacing */
    font-weight: 500;
    color: #666;
    /* Softer gray */
    font-size: 0.9rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* User Profile in Header */
.user-profile-header {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
}

.notification-bell:hover {
    color: var(--primary);
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
    border: 1px solid white;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    cursor: pointer;
    color: var(--text-secondary);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    padding: 0.5rem 0;
    min-width: 80px;
    z-index: 1000;
    border: 1px solid var(--border);
}

.lang-dropdown.show {
    display: block;
}

.lang-dropdown div {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    text-align: center;
    color: var(--text);
}

.lang-dropdown div:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.nav-icon {
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--border);
    display: flex;
    /* Assuming icon inside */
    align-items: center;
    justify-content: center;
}

/* ============ Buttons ============ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary-light);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* ============ Dashboard Grid ============ */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

/* ============ Intro Card ============ */

.intro-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.intro-content {
    flex: 1;
    z-index: 10;
}

.intro-title {
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.intro-desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 400px;
    font-size: 0.95rem;
}

.intro-image {
    flex: 0.8;
    display: flex;
    justify-content: center;
}

.intro-image img {
    max-width: 100%;
    height: auto;
}

/* ============ Stats Card ============ */

.stats-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.stats-title {
    font-weight: 700;
    color: var(--secondary);
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.stat-item {
    display: grid;
    grid-template-columns: 20px 180px 1fr;
    /* Icon Name Bar */
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: var(--secondary);
}

.stat-icon {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.stat-bar-container {
    height: 24px;
    background: transparent;
    display: flex;
    gap: 2px;
}

.stat-bar-segment {
    width: 6px;
    height: 100%;
    background: #e5e7eb;
    border-radius: 2px;
}

.stat-bar-segment.filled {
    background: #3b82f6;
    /* Blue load */
}

.stat-bar-segment.filled-dark {
    background: #1d4ed8;
}

/* ============ Steps Section ============ */

.steps-section {
    margin-top: var(--space-2xl);
    text-align: center;
}

.section-label {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: var(--space-xl);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 steps + final action */
    gap: var(--space-lg);
    text-align: left;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.step-item {
    position: relative;
    padding-right: var(--space-md);
}

.step-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: #e5e7eb;
    /* Light gray number */
    margin-bottom: var(--space-xs);
}

.step-number.active {
    color: var(--info);
}

.step-text {
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 600;
    line-height: 1.3;
}

/* ============ Info Cards Grid ============ */

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.info-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 180px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s;
}

.info-card:hover {
    transform: translateY(-4px);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    color: var(--primary);
    /* Variable based on content */
}

.info-text {
    font-weight: 600;
    color: var(--secondary);
}

/* Utility Colors for specific elements */
.color-red {
    background-color: #ef4444;
}

.color-orange {
    background-color: #f97316;
}

.color-green {
    background-color: #10b981;
}

/* ============ Listings (Restored & Adapted) ============ */

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin: var(--space-2xl) 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.tab-btn {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
}

.listing-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.listing-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.listing-card-image {
    width: 100%;
    height: 160px;
    background: #f3f4f6;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.listing-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.listing-card:hover .listing-card-image img {
    transform: scale(1.05);
}

.listing-card-image .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 2.5rem;
    color: var(--text-light);
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.listing-type {
    padding: 0.25rem 0.75rem;
    background: var(--bg);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.listing-price {
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.listing-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--secondary);
}

.listing-route {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    font-size: 0.95rem;
    color: var(--text);
}

.route-from,
.route-to {
    display: flex;
    align-items: center;
    gap: 4px;
}

.route-arrow {
    color: var(--text-light);
    font-size: 0.8rem;
}

.listing-details {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.listing-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.owner-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--warning);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.status-available {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.status-busy {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.loading,
.no-data {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

/* ============ Auth Pages ============ */

.auth-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    max-width: 900px;
    width: 100%;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-header h1 {
    margin-bottom: var(--space-sm);
    color: var(--secondary);
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

.auth-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-info h2 {
    margin-bottom: var(--space-lg);
    color: var(--secondary);
}

.benefits-list {
    list-style: none;
}

.benefits-list li {
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
}

/* Code inputs */
.code-inputs {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    margin-bottom: var(--space-md);
}

.code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    transition: all 0.2s;
}

.code-input:focus {
    outline: none;
    border-color: var(--primary);
}

.code-hint {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* User type selection */
.type-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.type-card {
    padding: var(--space-lg);
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.type-card:hover {
    border-color: var(--text-secondary);
}

.type-card.selected {
    border-color: var(--primary);
    background: rgba(0, 144, 96, 0.05);
}

.type-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.type-card h3 {
    margin-bottom: var(--space-xs);
    font-size: 1rem;
    color: var(--secondary);
}

.type-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============ Form Elements ============ */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    transition: all 0.2s;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 144, 96, 0.1);
}

.phone-input {
    display: flex;
    gap: var(--space-sm);
}

.phone-code {
    width: 100px;
    flex-shrink: 0;
    padding: 0.875rem 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

/* ============ Form Pages (Add New/Edit) ============ */

.form-page {
    min-height: calc(100vh - 80px);
    padding: var(--space-2xl) var(--space-md);
    background: var(--bg);
}

.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    border: 1px solid var(--border);
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
}

.form-header {
    margin-bottom: var(--space-xl);
    text-align: center;
}

.form-header h1 {
    font-size: 1.75rem;
    margin-bottom: var(--space-xs);
    color: var(--secondary);
}

.form-header p {
    color: var(--text-secondary);
}

.back-link {
    display: inline-block;
    margin-bottom: var(--space-md);
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-section {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.1rem;
    margin-bottom: var(--space-lg);
    color: var(--secondary);
    font-weight: 600;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

/* ============ Dashboard ============ */

.dashboard {
    padding: var(--space-xl) 0;
}

.dashboard-header {
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.user-info h1 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: var(--space-xs);
}

.user-type {
    color: var(--primary);
    font-weight: 600;
}

.user-stats {
    display: flex;
    gap: var(--space-lg);
}

.stat-badge {
    text-align: center;
    background: var(--bg);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--secondary);
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.action-card {
    background: var(--bg-card);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.action-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.action-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.action-card h3 {
    margin-bottom: var(--space-xs);
    color: var(--secondary);
}

.action-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.section-header h2 {
    font-size: 1.25rem;
    color: var(--secondary);
}

.recommended-badge {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
}

/* ============ Modal ============ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.match-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.match-score {
    color: var(--success);
    font-weight: 700;
}



/* ============ Footer ============ */
.footer {
    background: #1a1a1a;
    color: #e5e5e5;
    padding: var(--space-2xl) 0;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.footer-col h4 {
    color: white;
    margin-bottom: var(--space-md);
    font-size: 1.1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links a {
    color: #9ca3af;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: var(--space-lg);
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

/* ============ Responsive ============ */
/* ============ Mobile Bottom Navigation ============ */
.mobile-bottom-nav {
    display: none;
    /* Hidden by default on Desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid var(--border);
    padding: 12px 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 1000;
    justify-content: space-around;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.08);
}

.m-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    flex: 1;
}

.m-nav-item svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-light);
    transition: all 0.2s;
}

.m-nav-item.active {
    color: var(--primary);
}

.m-nav-item.active svg {
    stroke: var(--primary);
    transform: translateY(-2px);
}

/* ============ Responsive Adjustments ============ */
@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
        margin-bottom: var(--space-lg);
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: var(--space-sm);
        gap: 8px;
    }

    .nav-item {
        white-space: nowrap;
        padding: 10px 16px;
        background: white;
        border: 1px solid var(--border);
    }

    .logo img {
        height: 32px;
    }
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    .footer {
        margin-bottom: 70px;
        /* Space for fixed bottom nav */
    }

    .nav-links {
        display: none;
    }

    .listing-row,
    .match-row {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .listing-actions,
    .match-actions {
        display: flex;
        justify-content: flex-end;
        gap: var(--space-sm);
    }

    .auth-container {
        grid-template-columns: 1fr;
    }
}

/* ============ Dashboard Widgets ============ */
.action-card-mini {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    padding: 16px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.action-card-mini:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.a-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.a-text {
    display: flex;
    flex-direction: column;
}

.a-text strong {
    color: var(--secondary);
    font-size: 1rem;
}

.a-text span {
    color: var(--text-light);
    font-size: 0.75rem;
}

.premium-card {
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.intro-image {
    margin-bottom: var(--space-lg);
}

/* ============ Match Row & Chat Styles (Premium) ============ */
.match-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: var(--space-xl) 0 var(--space-md);
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-row {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    margin-bottom: var(--space-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.match-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--border);
    transition: width 0.3s;
}

.match-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

.match-row:hover .match-thumb {
    transform: scale(1.05);
}

.match-row.status-pending::before {
    background: var(--warning);
}

.match-row.status-accepted::before {
    background: var(--success);
}

.match-row.status-completed::before {
    background: var(--primary);
}

.match-row.status-rejected::before {
    background: var(--error);
}

.match-row:hover::before {
    width: 6px;
}

.match-thumb {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.match-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-info {
    flex: 1;
}

.match-info h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--secondary);
    font-weight: 700;
}

.match-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

.match-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.match-item-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.match-item-link:hover {
    text-decoration: underline;
}

.match-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.match-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.match-badge.incoming {
    background: #fff4e6;
    color: #d9480f;
}

.match-badge.outgoing {
    background: #e7f5ff;
    color: #1971c2;
}

.match-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.match-actions {
    display: flex;
    gap: 8px;
}

/* Chat UI Improvements */
.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: var(--space-md);
    background: #f8fafc;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    padding: 10px 15px;
    border-radius: 15px;
    position: relative;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

.message.me {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
    border-bottom-left-radius: 15px;
}

.message.other {
    align-self: flex-start;
    background: #f1f5f9;
    color: var(--text);
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 2px;
    border-bottom-right-radius: 15px;
}

.message-time {
    display: block;
    font-size: 0.7rem;
    margin-top: 4px;
    opacity: 0.8;
}

.message.me .message-time {
    text-align: right;
    color: rgba(255, 255, 255, 0.9);
}

.message.other .message-time {
    text-align: left;
    color: var(--text-light);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ Listing Row (Dashboard List) ============ */
.listing-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: white;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: var(--space-md);
    transition: all 0.2s;
}

.listing-row:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.listing-row-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.listing-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-info {
    flex: 1;
}

.listing-info h3 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.listing-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.listing-actions {
    display: flex;
    gap: 8px;
}

/* ============ Premium Listing Detail ============ */
.detail-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: var(--space-xl);
}

.detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 144, 96, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badges {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.badge {
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(0, 144, 96, 0.1);
    color: var(--primary);
}

.badge-secondary {
    background: white;
    box-shadow: var(--shadow-sm);
    color: var(--text-secondary);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--border);
    padding-left: var(--space-lg);
}

.hero-stat:first-child {
    border-left: none;
    padding-left: 0;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.hero-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

.hero-stat-value.highlight {
    color: var(--primary);
    font-size: 1.5rem;
}

.route-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-xl);
}

.route-visual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    position: relative;
    padding: 0 var(--space-lg);
}

.route-point {
    text-align: center;
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 var(--space-md);
}

.point-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin: 0 auto var(--space-sm);
}

.point-dot.start {
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.point-dot.end {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.point-city {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
    display: block;
}

.point-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.route-line {
    position: absolute;
    top: 8px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: var(--border);
    z-index: 1;
}

.route-line::after {
    content: '✈';
    /* Or truck emoji if preferred */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 0 10px;
    color: var(--text-light);
}

.map-box {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 4px solid white;
}

.owner-card-premium {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: var(--space-xl);
    text-align: center;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow-lg);
}

.owner-avatar-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
    color: white;
    font-size: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -50px auto var(--space-md) auto;
    /* Pull up */
    border: 4px solid white;
    box-shadow: var(--shadow-sm);
}

.action-buttons {
    display: grid;
    gap: var(--space-md);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
}

.btn-whatsapp:hover {
    background: #1faf54;
    opacity: 1;
    color: white;
}

/* ============ Animations & Polish ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dashMove {
    to {
        background-position: -20px 0;
    }
}

@keyframes pulse-soft {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.animate-enter {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Enhanced Hero */
.detail-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    box-shadow: 0 10px 30px -10px rgba(0, 144, 96, 0.15);
    border: 1px solid rgba(0, 144, 96, 0.1);
}

.hero-stat {
    transition: transform 0.3s ease, background 0.3s ease;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    /* Add padding for hover effect */
    border-left: none;
    /* Remove old border */
    background: #f8fafc;
}

.hero-stat:hover {
    transform: translateY(-5px);
    background: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Moving Route Line */
.route-line {
    height: 3px;
    background: repeating-linear-gradient(90deg, var(--border) 0, var(--border) 10px, transparent 10px, transparent 20px);
    background-size: 20px 100%;
    animation: dashMove 1s linear infinite;
}

.route-line::after {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    /* Make it look like a moving puck/icon */
    padding: 5px;
    font-size: 1.2rem;
    transition: left 2s ease-in-out;
}

/* Glass & Depth Sidebar */
.owner-card-premium {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
}

.owner-avatar-large {
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.8);
}

.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
    transform: scale(0.96);
}

/* Map Polish */
.map-box {
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.map-box:hover {
    transform: translateY(-2px);
}