/* All CSS styles */
:root {
    --lime-green: #32cd32;
    --light-blue: #00bfff;
    --dark-green: #228b22;
    --dark-blue: #1e90ff;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #333;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: var(--dark-gray);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--lime-green) 0%, var(--dark-green) 100%);
    color: white;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: var(--shadow);
    z-index: 100;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo i {
    color: var(--light-blue);
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.nav-link i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    margin-top: auto;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.user-info h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.user-info p {
    font-size: 12px;
    opacity: 0.8;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: var(--light-gray);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--medium-gray);
}

.page-title {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--dark-gray);
}

.welcome-message {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 5px solid var(--lime-green);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-card.blue {
    border-left-color: var(--light-blue);
}

.stat-card h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 5px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #28a745;
}

.stat-trend.negative {
    color: #dc3545;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    touch-action: manipulation;
}

.btn-primary {
    background: linear-gradient(135deg, var(--lime-green) 0%, var(--dark-green) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(50, 205, 50, 0.3);
}

.btn-secondary {
    background-color: var(--light-blue);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--lime-green);
    color: var(--lime-green);
}

.btn-outline:hover {
    background-color: var(--lime-green);
    color: white;
}

/* Form Styles */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-gray);
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    transition: var(--transition);
    -webkit-appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--lime-green);
    box-shadow: 0 0 0 3px rgba(50, 205, 50, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.checkbox-group, .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-label, .radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Modern Errand Type Selector */
.errand-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.errand-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    background: white;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.errand-type-option:hover {
    border-color: var(--lime-green);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.errand-type-option.selected {
    border-color: var(--lime-green);
    background-color: rgba(50, 205, 50, 0.1);
}

.errand-type-option i {
    font-size: 28px;
    color: var(--lime-green);
    margin-bottom: 10px;
}

.errand-type-option span {
    font-weight: 500;
    font-size: 14px;
}

/* Login Page Styles */
.login-container {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--lime-green) 0%, var(--light-blue) 100%);
}

.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: white;
}

.login-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.95);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
}

.google-btn {
    width: 100%;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    padding: 14px;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.google-btn:hover {
    background-color: #f8f8f8;
    box-shadow: var(--shadow);
}

/* Errand List Styles */
.errands-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.errand-card {
    background-color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.errand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.errand-header {
    padding: 20px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.errand-type {
    background-color: var(--lime-green);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.errand-budget {
    font-weight: 700;
    font-size: 20px;
    color: var(--dark-green);
}

.errand-body {
    padding: 20px;
}

.errand-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.errand-desc {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 14px;
}

.errand-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.errand-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.errand-detail i {
    color: var(--lime-green);
}

.errand-footer {
    padding: 15px 20px;
    background-color: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.errand-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-active {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--dark-gray);
}

/* Chat Styles */
.chat-container {
    display: flex;
    height: 600px;
    background-color: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.chat-sidebar {
    width: 300px;
    border-right: 1px solid var(--medium-gray);
    overflow-y: auto;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--medium-gray);
    background-color: #f9f9f9;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.message {
    margin-bottom: 15px;
    max-width: 70%;
}

.message.sent {
    margin-left: auto;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    background-color: #f0f0f0;
    display: inline-block;
}

.message.sent .message-content {
    background-color: var(--lime-green);
    color: white;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    gap: 10px;
}

/* Support Buttons Container */
.support-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.support-btn {
    flex: 1;
    min-width: 140px;
}

/* Payment Modal Styles */
.alert {
    padding: 15px;
    border-radius: var(--radius);
    margin: 15px 0;
    text-align: center;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Payment button states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}
/* Responsive Styles - Optimized for Mobile */
@media (max-width: 1200px) {
    .sidebar {
        width: 220px;
        padding: 20px 15px;
    }
    
    .nav-link {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .page-title {
        font-size: 24px;
    }
}

@media (max-width: 992px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        padding: 15px;
        position: sticky;
        top: 0;
    }
    
    .nav-links {
        display: flex;
        overflow-x: auto;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .nav-item {
        margin-bottom: 0;
        margin-right: 10px;
        flex-shrink: 0;
    }
    
    .user-profile {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .errand-type-selector {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .support-buttons {
        flex-direction: column;
    }
    
    .support-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .errands-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .login-container {
        flex-direction: column;
        padding: 20px;
    }
    
    .login-left, .login-right {
        padding: 20px;
        width: 100%;
    }
    
    .login-card {
        padding: 25px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
    
    .main-content {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .welcome-message {
        font-size: 20px;
    }
    
    .form-container {
        padding: 20px;
        margin: 0;
    }
    
    .errand-type-selector {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    
    .errand-type-option {
        padding: 15px 10px;
    }
    
    .errand-type-option i {
        font-size: 24px;
    }
    
    .chat-container {
        flex-direction: column;
        height: 500px;
    }
    
    .chat-sidebar {
        width: 100%;
        height: 200px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .modal-content {
        width: 95%;
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .login-left h1 {
        font-size: 32px;
    }
    
    .login-left p {
        font-size: 16px;
    }
    
    .errand-type-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-links {
        gap: 5px;
    }
    
    .nav-item {
        margin-right: 5px;
    }
    
    .nav-link {
        padding: 10px;
        gap: 8px;
        font-size: 13px;
    }
    
    .nav-link i {
        font-size: 16px;
    }
    
    .btn-group {
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .btn-group .btn {
        flex-shrink: 0;
    }
    
    .support-buttons {
        gap: 8px;
    }
}

/* Mobile-specific optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn, .nav-link, .errand-type-option {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-control, select, input, textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    .stat-card:hover, .errand-card:hover {
        transform: none;
    }
}

/* Animation for page transitions */
.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: var(--dark-gray);
    color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    max-width: 350px;
    word-wrap: break-word;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background-color: var(--lime-green);
}

.toast.error {
    background-color: #dc3545;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--lime-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: var(--radius);
    margin: 20px 0;
    text-align: center;
}

/* Profile Update Required Modal */
.profile-update-modal .modal-content {
    max-width: 600px;
}

.profile-update-required {
    text-align: center;
    padding: 20px;
}

.profile-update-required i {
    font-size: 64px;
    color: var(--lime-green);
    margin-bottom: 20px;
}

.profile-update-required h2 {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.profile-update-required p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Dashboard Welcome Section */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--lime-green) 0%, var(--light-blue) 100%);
    color: white;
    padding: 25px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.dashboard-welcome h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    margin-bottom: 10px;
}

.dashboard-welcome p {
    opacity: 0.9;
    font-size: 16px;
}

/* Bid Styles */
.bid-card {
    background-color: #f8f9fa;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--medium-gray);
}

.bid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bid-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--lime-green);
}

.bid-runner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bid-runner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.bid-runner-name {
    font-weight: 600;
}

.bid-details {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.bid-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Errand Details Styles */
.errand-details-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--medium-gray);
}

.errand-details-section:last-child {
    border-bottom: none;
}

.detail-row {
    display: flex;
    margin-bottom: 10px;
}

.detail-label {
    font-weight: 600;
    width: 120px;
    color: #666;
}

.detail-value {
    flex: 1;
}

/* Install Prompt (PWA) */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: none;
    z-index: 2000;
    border-left: 4px solid var(--dark-blue);
    animation: slideUp 0.3s ease;
}

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

.install-prompt-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.install-prompt-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--dark-blue), var(--light-blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.install-prompt-icon i {
    color: white;
    font-size: 24px;
}

.install-prompt h4 {
    margin-bottom: 4px;
    font-size: 15px;
}

.install-prompt p {
    font-size: 12px;
    color: #666;
}

.install-prompt-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
