/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    color: white;
    padding: 0.65rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    border-bottom: 3px solid #3498db;
    position: relative;
    width: 100%;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-heading {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(240px, 42vw);
}

.logo.logo-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: none;
    -webkit-text-fill-color: unset;
    -webkit-background-clip: unset;
    background-clip: unset;
    text-shadow: none;
    max-width: 100%;
    transition: opacity 0.2s ease;
}

.logo.logo-brand:hover {
    opacity: 0.92;
}

/* Same mark + wordmark pattern as site/ */
.logo.logo-brand .brand-mark {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.logo.logo-brand .brand-mark-img {
    display: block;
    width: 36px;
    height: auto;
    max-width: none;
    object-fit: cover;
    object-position: top center;
}

.logo.logo-brand .brand-name {
    font-size: 1rem;
    font-weight: 700;
    color: #d8f3dc;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo.logo-brand .brand-subtitle {
    font-weight: 600;
    font-size: 0.85em;
    color: rgba(236, 240, 241, 0.78);
}

.logo-mark {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.logo-mark svg,
.logo-mark .logo-mark-img {
    display: block;
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.logo-nova {
    font-weight: 800;
    color: #e3f2fd;
}

.logo-ecobin {
    font-weight: 800;
    color: #a5d6a7;
}

.logo-wordmark {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.logo-eco {
    color: #e8f5e9;
    font-weight: 800;
}

.logo-bin {
    color: #a5d6a7;
    font-weight: 800;
}

.logo-subtitle {
    font-weight: 600;
    font-size: 0.72em;
    color: rgba(236, 240, 241, 0.88);
    margin-left: 0.12em;
    white-space: nowrap;
}

/* Legacy single-line logo (pages not yet using brand_logo include) */
.logo:not(.logo-brand) {
    font-size: 1.6rem;
    font-weight: bold;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Mobile menu toggle (public / user navbar) */
.navbar-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.navbar-inner .logo-heading {
    flex: 0 1 auto;
    min-width: 0;
}

.navbar-inner .nav-links {
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.navbar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.navbar-toggle:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.navbar-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
}

.navbar.nav-open .navbar-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar.nav-open .navbar-toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.navbar.nav-open .navbar-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

body.nav-menu-open {
    overflow: hidden;
}

.user-info {
    color: #ecf0f1;
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Admin: fixed top navbar */
.navbar.navbar-admin-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
}

.navbar.navbar-admin-fixed .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 52px;
}

.navbar.navbar-admin-fixed .logo-heading {
    max-width: min(280px, 55vw);
}

/* Admin Sidebar Navigation - Vertical Sidebar */
.admin-sidebar {
    background: #2c3e50;
    padding: 0;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    position: fixed;
    left: 0;
    top: 70px;
    width: 240px;
    height: calc(100vh - 70px);
    z-index: 999;
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-sidebar .container {
    padding: 0;
    max-width: 100%;
}

.admin-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    align-items: stretch;
}

.admin-nav-account {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0 0 0.65rem;
    margin: 0 0 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-nav-mobile-user {
    font-size: 0.8rem;
    color: rgba(236, 240, 241, 0.75);
    padding: 0.35rem 0.75rem 0.45rem;
    font-weight: 500;
}

.admin-nav-section-label {
    margin: 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(236, 240, 241, 0.42);
    padding: 0.35rem 0.75rem 0.2rem;
}

.admin-nav-section-label-main {
    display: block;
    padding-top: 0.25rem;
}

@media (min-width: 769px) {
    .admin-nav-account .admin-nav-mobile-user {
        display: none;
    }

    .admin-nav-section-label:first-child {
        padding-top: 0.15rem;
    }
}

.admin-nav-item-account {
    font-weight: 500;
}

.admin-nav-item-danger {
    color: #ffab91;
}

.admin-nav-item-danger:hover {
    color: #fff;
    background: rgba(231, 76, 60, 0.25);
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #ecf0f1;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s ease;
    font-weight: 400;
    font-size: 0.9rem;
    position: relative;
    border: none;
    background: transparent;
    width: 100%;
    justify-content: flex-start;
}

.admin-nav-item:hover {
    background: rgba(52, 152, 219, 0.15);
    color: #ffffff;
}

.admin-nav-item.active {
    background: #3498db;
    color: #ffffff;
    font-weight: 500;
}

.admin-nav-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 50%;
    background: #ffffff;
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    font-size: 1.1rem;
    transition: none;
}

.admin-nav-item:hover .nav-icon {
    transform: none;
}

.admin-nav-item.active .nav-icon {
    transform: none;
    filter: none;
}


/* Admin Dashboard Cards */
.admin-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.admin-card {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    transition: border-color 0.2s;
}

.admin-card:hover {
    border-color: #3498db;
}

.admin-card-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.admin-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.4rem;
}

.admin-card-description {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.admin-card-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.admin-card-link:hover {
    color: #2980b9;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #ecf0f1;
}

.page-header h2 {
    color: #2c3e50;
    margin: 0;
}

/* Admin Main Content Layout */
.admin-main-wrapper {
    display: flex;
    min-height: calc(100vh - 80px);
}

.admin-main-content {
    flex: 1;
    margin-left: 240px;
    margin-top: 70px;
    padding: 1rem 1.5rem;
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - 70px);
    overflow-x: hidden;
    max-width: calc(100vw - 240px);
}

/* Mobile Menu Toggle (admin sidebar) */
.menu-toggle {
    display: none;
    position: fixed;
    top: 0.85rem;
    left: 1rem;
    z-index: 1005;
    background: #2c3e50;
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: background 0.3s ease, transform 0.25s ease;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.menu-toggle:hover {
    background: #34495e;
}

.menu-toggle:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.menu-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.admin-sidebar-backdrop {
    display: none;
}

@media (max-width: 768px) {
    .admin-sidebar-backdrop.is-visible {
        display: block;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 998;
        animation: adminBackdropFade 0.25s ease;
    }
}

@keyframes adminBackdropFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }
    
    .admin-sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
        /* Sit above fixed navbar so first menu items are not covered (navbar was z-index 1002) */
        z-index: 1004;
    }
    
    .admin-main-content {
        margin-left: 0;
        margin-top: 70px;
        padding: 0.75rem;
    }
    
    .admin-sidebar {
        top: 70px;
        height: calc(100vh - 70px);
        width: min(300px, 90vw);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-sizing: border-box;
    }
    
    .admin-nav-menu {
        padding: 0.65rem 0.5rem 1rem;
        gap: 0.2rem;
    }

    .admin-nav-account {
        padding-bottom: 0.85rem;
        margin-bottom: 0.65rem;
        gap: 0.2rem;
    }

    .admin-nav-mobile-user {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem 0.65rem;
        color: #ecf0f1;
        border-radius: 8px;
        background: rgba(0, 0, 0, 0.15);
        margin-bottom: 0.15rem;
    }
    
    .admin-nav-item {
        min-height: 48px;
        padding: 0.65rem 0.85rem;
        font-size: 0.95rem;
        border-radius: 8px;
    }
    
    .admin-nav-item.active::after {
        display: block;
    }
    
    .admin-dashboard {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .navbar.navbar-admin-fixed {
        padding-left: 4rem;
    }
    
    /* Adjust main padding for mobile */
    body > main {
        padding-top: 1.5rem;
    }
    
    .auth-container {
        margin: 1.5rem auto;
        padding: 1.5rem;
    }
    
    /* Ensure navbar doesn't hide content on mobile */
    .navbar {
        height: auto;
        min-height: 70px;
    }
}

@media (max-width: 480px) {
    .admin-nav-item {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .nav-icon {
        font-size: 1.1rem;
    }
    
    /* Extra spacing for very small screens */
    body > main {
        padding-top: 1.5rem;
    }
    
    .auth-container {
        margin: 1rem auto;
        padding: 1.25rem;
    }
    
    .auth-container h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
}

/* Admin Tables with Search */
.admin-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.admin-search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.admin-search-box input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.admin-search-box input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.admin-search-box .search-icon {
    position: relative;
}

.admin-search-box .search-icon::before {
    content: '🔍';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.admin-table-wrapper {
    overflow-x: auto;
    border-radius: 5px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

.admin-table thead {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #2980b9;
}

.admin-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.2s;
}

.admin-table tbody tr:hover {
    background-color: #f8f9fa;
}

.admin-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.admin-table tbody tr:nth-child(even):hover {
    background-color: #f1f3f5;
}

.admin-table td {
    padding: 1rem;
    vertical-align: middle;
}

.admin-table .actions-cell {
    white-space: nowrap;
}

.admin-table .btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    margin: 0 0.25rem;
}

.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.approved {
    background-color: #27ae60;
    color: white;
}

.status-badge.pending {
    background-color: #f39c12;
    color: white;
}

.status-badge.completed {
    background-color: #27ae60;
    color: white;
}

.status-badge.cancelled {
    background-color: #e74c3c;
    color: white;
}

.status-badge.inactive {
    background-color: #95a5a6;
    color: white;
}

.table-empty {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.table-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.table-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #495057;
}

@media (max-width: 768px) {
    .admin-table-wrapper {
        overflow-x: scroll;
    }
    
    .admin-table {
        min-width: 800px;
    }
    
    .admin-search-box {
        flex-direction: column;
    }
    
    .admin-search-box input {
        width: 100%;
        min-width: auto;
    }
    
    .table-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

.text-muted {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-style: italic;
}

/* Schedules */
.schedules-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.schedule-day-group {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.schedule-day-group h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.schedules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.schedule-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.schedule-item.inactive {
    opacity: 0.6;
    border-left-color: #95a5a6;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.schedule-header h5 {
    margin: 0;
    color: #2c3e50;
}

.schedule-actions {
    margin-top: 0.5rem;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Missed pickups */
.missed-schedules-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.request-item.missed {
    background-color: #fff3cd;
    border-left: 4px solid #e74c3c !important;
}

.request-item.high-urgency {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545 !important;
}

.stats-container {
    margin: 1rem 0;
}

.stat-card {
    text-align: center;
}

.stat-card h4 {
    font-weight: bold;
}

.stat-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Map styles */
.custom-marker {
    background: transparent !important;
    border: none !important;
}

.map-header {
    text-align: center;
    margin: 2rem 0;
}

.map-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.map-header p {
    color: #7f8c8d;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: white;
    border-radius: 10px;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.hero p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Auth Container */
.auth-container {
    max-width: 500px;
    margin: 3rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Service Selection */
.services-selection-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.service-selection-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.service-selection-card:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.service-selection-card.selected {
    border-color: #3498db;
    background: #f8f9ff;
}

/* Pricing Tabs */
.pricing-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
}

.pricing-tab {
    padding: 0.75rem 1.5rem;
    background: #f5f5f5;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.pricing-tab:hover {
    background: #e9e9e9;
    color: #2c3e50;
}

.pricing-tab.active {
    background: white;
    color: #3498db;
    border-bottom-color: #3498db;
}

.service-header {
    margin-bottom: 0.5rem;
}

.service-header input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.service-options {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Spacing for main content */
body > main {
    padding-top: 2rem;
    min-height: calc(100vh - 100px);
}

/* Ensure auth pages have proper spacing */
.auth-container {
    margin-top: 2rem;
}

/* Remove padding-top for admin pages (they use admin-main-content) */
.admin-main-content > main {
    padding-top: 0;
}

.auth-container h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group small {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Password + eye: single field shell so the icon sits inside the box on the right */
.password-input-wrap {
    display: flex;
    align-items: stretch;
    flex-direction: row;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: #fff;
    transition: border-color 0.3s;
    overflow: hidden;
}

.password-input-wrap:focus-within {
    border-color: #3498db;
}

.form-group .password-input-wrap input {
    flex: 1;
    min-width: 0;
    width: auto;
    margin: 0;
    border: none !important;
    border-radius: 0;
    box-shadow: none;
    padding: 0.75rem 0.5rem 0.75rem 0.75rem;
    box-sizing: border-box;
}

.form-group .password-input-wrap input:focus {
    outline: none;
    border: none !important;
}

.password-toggle {
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    min-height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    border-left: 1px solid #e8e8e8;
    border-radius: 0;
    background: #fafafa;
    color: #7f8c8d;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle:hover {
    color: #3498db;
    background: #f0f7fc;
}

.password-toggle:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: -2px;
    z-index: 1;
}

.password-toggle svg {
    pointer-events: none;
}

.password-toggle .password-toggle-icon-hide {
    display: none;
}

.password-input-wrap.is-password-visible .password-toggle .password-toggle-icon-show {
    display: none;
}

.password-input-wrap.is-password-visible .password-toggle .password-toggle-icon-hide {
    display: block;
}

.location-status {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 0.9rem;
}

.location-status.success {
    background-color: #d4edda;
    color: #155724;
}

.location-status.error {
    background-color: #f8d7da;
    color: #721c24;
}

.price-display {
    padding: 1rem;
    background-color: #e8f5e9;
    border-radius: 5px;
    font-weight: bold;
    color: #2e7d32;
    text-align: center;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Message */
.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 5px;
    display: none;
}

.message.show {
    display: block;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

/* Requests List */
.requests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.request-item {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.request-item.urgent {
    border-left-color: #e74c3c;
}

.request-item h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.request-item .meta {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
}

.request-item .status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.status.pending {
    background-color: #fff3cd;
    color: #856404;
}

.status.approved {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status.completed {
    background-color: #d4edda;
    color: #155724;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

/* Edit Payment modal: scrollable body, actions and message always visible */
.edit-payment-modal .edit-payment-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    padding: 1.25rem 2rem 1.5rem;
    overflow: hidden;
}
.edit-payment-modal .edit-payment-modal-content h3 {
    flex-shrink: 0;
    margin: 0 2rem 1rem 0;
    padding-right: 2rem;
}
.edit-payment-modal .edit-payment-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
}
.edit-payment-modal .edit-payment-modal-actions {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.edit-payment-modal #editPaymentMessage {
    flex-shrink: 0;
    margin-top: 0.75rem;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #7f8c8d;
}

.close:hover {
    color: #2c3e50;
}

/* Admin Styles */
.admin-header {
    margin: 2rem 0;
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    border-bottom: 2px solid #ddd;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    color: #7f8c8d;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #2c3e50;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    display: none;
    margin: 2rem 0;
}

.tab-content.active {
    display: block;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info-section {
    flex: 1;
}

.user-info-section h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.user-info-section p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 600px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        height: auto;
        min-height: 70px;
        padding: 1rem 0;
    }

    .navbar .container.navbar-inner {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        position: relative;
    }

    .navbar-toggle {
        display: inline-flex;
    }

    /* Only collapse nav-links on pages that use the public mobile menu (.navbar-inner + toggle) */
    .navbar .container.navbar-inner .nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        flex-basis: 100%;
        gap: 0.75rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        padding: 0;
        margin: 0;
        transition:
            max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.28s ease,
            padding 0.28s ease,
            visibility 0.28s;
    }

    .navbar.nav-open .container.navbar-inner .nav-links {
        max-height: min(85vh, 580px);
        opacity: 1;
        visibility: visible;
        padding: 1rem 0 1rem;
        margin-top: 0.35rem;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        gap: 0.5rem;
        box-shadow: inset 0 8px 12px -12px rgba(0, 0, 0, 0.35);
    }

    .navbar.nav-open .container.navbar-inner .nav-links .btn,
    .navbar.nav-open .container.navbar-inner .nav-links .user-info {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        text-align: center;
        justify-content: center;
    }

    .navbar.nav-open .container.navbar-inner .nav-links .user-info {
        margin-right: 0;
        text-align: left;
        border-radius: 10px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        line-height: 1.35;
        border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .navbar.nav-open .container.navbar-inner .nav-links .btn {
        min-height: 48px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        font-weight: 600;
        font-size: 1rem;
        padding: 0.65rem 1.25rem;
    }

    /* Admin: top bar shows only brand + hamburger; account links live in drawer */
    .navbar.navbar-admin-fixed .nav-links-admin-top {
        display: none !important;
    }

    .logo-subtitle {
        display: none !important;
    }

    .logo.logo-brand {
        font-size: 0.95rem;
    }

    .logo-heading {
        max-width: min(200px, 48vw);
    }

    .logo.logo-brand .brand-mark {
        width: 32px;
        height: 32px;
    }

    .logo.logo-brand .brand-mark-img {
        width: 32px;
    }

    .logo.logo-brand .brand-name {
        font-size: 0.9rem;
    }

    .logo-mark svg,
    .logo-mark .logo-mark-img {
        width: 32px;
        height: 32px;
    }

    .navbar .container.navbar-inner {
        align-items: center;
    }
    
    /* Increase padding for auth pages on mobile */
    body > main {
        padding-top: 1.5rem;
    }
    
    .auth-container {
        margin: 1.5rem auto;
        padding: 1.5rem;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .user-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Overdue subscription rows */
.overdue-row {
    background-color: #fff5f5 !important;
    border-left: 4px solid #e74c3c;
}

.overdue-row:hover {
    background-color: #ffe5e5 !important;
}

.overdue-row td.error {
    color: #e74c3c;
    font-weight: 600;
}

/* Admin Subscriptions Table Improvements */
.data-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.5rem;
    margin-top: 1.5rem;
    overflow: hidden;
}

.data-table-wrapper {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 8px;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.data-table-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.data-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.data-table-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.data-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    margin: 0;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 100;
}

.data-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 1.25rem 1rem;
    text-align: left;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th:first-child {
    border-top-left-radius: 8px;
}

.data-table th:last-child {
    border-top-right-radius: 8px;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e8ecf0;
    vertical-align: middle;
    font-size: 0.9rem;
}

.data-table tbody tr {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
    border-left-color: #667eea;
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.data-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.data-table tbody tr:nth-child(even):hover {
    background-color: #f1f3f5;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Column-specific styling */
.user-name-cell {
    min-width: 150px;
}

.user-name-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.email-cell {
    min-width: 180px;
}

.email-cell a:hover {
    text-decoration: underline;
}

.phone-cell {
    min-width: 120px;
    color: #555;
}

.volume-cell, .frequency-cell {
    min-width: 80px;
}

.frequency-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.price-cell {
    min-width: 100px;
}

.status-cell {
    min-width: 120px;
}

.recurring-cell {
    min-width: 110px;
}

.recurring-badge {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.recurring-badge.active {
    background: #e8f5e9;
    color: #27ae60;
    border: 1px solid #c8e6c9;
}

.recurring-badge.inactive {
    color: #95a5a6;
}

.date-cell {
    min-width: 120px;
    color: #555;
    font-size: 0.9rem;
    white-space: nowrap;
}

.date-cell.overdue-date {
    color: #e74c3c;
    font-weight: 600;
}

.overdue-cell {
    min-width: 100px;
    white-space: nowrap;
}

.period-status-cell {
    min-width: 110px;
    white-space: nowrap;
}

.actions-cell {
    white-space: nowrap;
    min-width: 100px;
}

.actions-cell .btn {
    margin: 0;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.actions-cell .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Status badges */
.status {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Overdue row styling */
.overdue-row {
    background-color: #fff5f5 !important;
    border-left: 4px solid #e74c3c !important;
}

.overdue-row:hover {
    background-color: #ffe5e5 !important;
    border-left-color: #c0392b !important;
}

.overdue-row td.error {
    color: #e74c3c;
    font-weight: 600;
}

/* Table controls styling */
.table-controls {
    margin-bottom: 1.5rem;
}

.table-controls .search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.table-controls select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Empty state */
.data-table tbody tr td[colspan] {
    text-align: center;
    padding: 3rem 1rem;
    color: #7f8c8d;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .data-table-wrapper {
        max-height: 60vh;
    }
}

/* Payment-specific styling */
.reference-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #555;
}

.method-cell {
    text-transform: capitalize;
}

.description-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .admin-main-content {
        max-width: 100vw;
        margin-left: 0;
    }
    
    .data-table-wrapper {
        max-height: 50vh;
    }
    
    .data-table {
        min-width: 1000px;
    }
    
    .table-controls {
        flex-direction: column;
    }
    
    .table-controls > div {
        width: 100%;
    }
}
