:root {
    /* Neutral Colors */
    --neutral-50: #FAFAFA;
    --neutral-100: #F5F5F5;
    --neutral-200: #E5E5E5;
    --neutral-300: #D4D4D4;
    --neutral-400: #A3A3A3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    
    /* Accent */
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --accent-dark: #1D4ED8;
    --accent-light: #DBEAFE;
    --accent-light-hover: #BFDBFE;
    
    /* Semantic */
    --success: #059669;
    --success-dark: #048653;
    --success-darker: #065F46;
    --success-light: #D1FAE5;
    --success-light-alt: #BBF7D0;
    
    --warning: #D97706;
    --warning-dark: #92400E;
    --warning-light: #FEF3C7;
    --warning-orange: #FED7AA;
    
    --error: #DC2626;
    --error-dark: #B91C1C;
    --error-darker: #991B1B;
    --error-light: #FEE2E2;
    --error-light-alt: #FECACA;
    
    --info: #0891B2;
    --info-dark: #2563B0;
    --info-light: #D1E8FF;
    
    --secondary: #8B5CF6;
    --secondary-light: #EDE9FE;
    
    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.08);
    
    /* Z-Index Scale */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-notification: 800;
    --z-fullscreen: 900;
    --z-max: 9999;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--neutral-100);
    min-height: 100vh;
    padding: var(--space-5);
    font-size: 16px;
    line-height: 1.5;
    color: var(--neutral-800);
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--neutral-200);
    overflow: hidden;
}

@media (min-width: 480px) {
    .container {
        max-width: 600px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 800px;
    }
}

.header {
    background: white;
    color: var(--neutral-900);
    padding: var(--space-6) var(--space-6);
    text-align: center;
    border-bottom: 1px solid var(--neutral-200);
}

.header h1 {
    font-size: 28px;
    margin-bottom: var(--space-2);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--neutral-900);
}

.header .user-info {
    font-size: 14px;
    color: var(--neutral-600);
    font-weight: 400;
}

.content {
    /* Padding moved to .tab-content to ensure consistent spacing */
}

/* Horizontal tabs removed - using drawer navigation on all screen sizes */

/* Admin subtabs - Segmented Control */
.admin-subtabs {
    display: inline-flex;
    background: var(--neutral-100);
    border-radius: var(--radius-md);
    padding: 2px;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.admin-subtabs::-webkit-scrollbar {
    display: none;
}

.admin-subtab-button {
    padding: 10px var(--space-4);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--neutral-600);
    transition: all 0.15s ease;
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.admin-subtab-button:hover {
    color: var(--neutral-900);
}

.admin-subtab-button.active {
    background: white;
    color: var(--neutral-900);
    box-shadow: var(--shadow-sm);
}

/* Admin subtabs dropdown - hidden on desktop, shown on mobile */
.admin-subtabs-dropdown {
    display: none;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: white;
    color: var(--neutral-900);
    min-height: 44px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: var(--space-10);
    margin-bottom: var(--space-6);
}

.admin-subtabs-dropdown:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* Mobile responsive: Show dropdown, hide segmented control */
@media (max-width: 767px) {
    .admin-subtabs {
        display: none;
    }

    .admin-subtabs-dropdown {
        display: block;
    }
}

.tab-content {
    display: none;
    padding: var(--space-6) var(--space-5);
}

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

@media (min-width: 640px) {
    .tab-content {
        padding: var(--space-8) var(--space-6);
    }
}

@media (min-width: 769px) {
    .tab-content {
        padding: var(--space-8) var(--space-6) !important;
    }
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--neutral-700);
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all 0.15s ease;
    box-sizing: border-box;
    background: white;
    min-height: 44px;
    color: var(--neutral-900);
}

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input[type="number"] {
    font-size: 18px;
    font-weight: 600;
}

.form-group input[type="checkbox"] {
    width: auto;
    min-height: auto;
    padding: 0;
    margin: 0;
    height: 24px;
    width: 24px;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--neutral-700);
    user-select: none;
}

.checkbox-label span {
    line-height: 1.5;
}

.checkbox-label:hover {
    color: var(--neutral-900);
}

.btn {
    width: 100%;
    padding: var(--space-3) var(--space-6);
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 44px;
}

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

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

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

.btn-small {
    width: auto;
    min-width: 110px;
    padding: var(--space-3) var(--space-5);
    font-size: 15px;
    min-height: 44px;
}

.service-card,
.user-card,
.order-card,
.task-card {
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.task-streak {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 13px;
    color: var(--neutral-600);
    margin-top: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--warning-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--warning);
}

.streak-icon {
    font-size: 16px;
}

.service-card:hover,
.user-card:hover,
.order-card:hover,
.task-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--neutral-300);
}

.service-card h3,
.user-card h3,
.order-card h3 {
    font-size: 18px;
    color: var(--neutral-900);
    margin-bottom: var(--space-3);
    line-height: 1.4;
    font-weight: 600;
}

.service-card p,
.user-card p,
.order-card p {
    font-size: 14px;
    color: var(--neutral-600);
    margin-bottom: var(--space-3);
    line-height: 1.5;
}

.service-card .points {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--space-4);
}

.checkbox-container input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    min-width: 24px;
    min-height: 24px;
}

.checkbox-container label {
    font-size: 16px;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: var(--space-5);
    flex-wrap: wrap;
}

.actions button {
    flex: 1;
    min-width: 120px;
}

/* Task answer buttons - consistent grid layout */
.task-answers {
    margin-top: var(--space-3);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* Single column for 1-2 buttons, keeps 2-col for 3+ */
.task-answers.single-col {
    grid-template-columns: 1fr;
}

.task-answers .btn {
    width: 100%;
    min-height: 44px;
    padding: var(--space-3) var(--space-4);
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

/* Free text answer container */
.task-input {
    margin-top: var(--space-3);
}

.task-input textarea {
    width: 100%;
    padding: var(--space-3) var(--space-3);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: var(--space-2);
}

.task-input .btn {
    width: 100%;
    min-height: 44px;
}

.badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--neutral-100);
    color: var(--neutral-700);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    margin: 2px;
    border: none;
}

.badge.admin {
    background: var(--accent-light);
    color: var(--accent);
}

.badge.promoted {
    background: var(--warning-light);
    color: var(--warning);
    font-weight: 500;
}

.promoted-section {
    margin: var(--space-4) 0 var(--space-6);
    padding: var(--space-4);
    background: var(--warning-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--warning);
}

.promoted-section h2 {
    margin: 0 0 var(--space-3);
    font-size: 18px;
    color: var(--neutral-900);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
}

.promoted-task-card {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
}

.promoted-task-card:last-child {
    margin-bottom: 0;
}

.promotion-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--warning);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.countdown-timer {
    display: inline-block;
    padding: var(--space-1) 10px;
    background: var(--neutral-100);
    color: var(--neutral-700);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    margin-top: var(--space-2);
}

.promoted-points {
    font-size: 20px;
    font-weight: 600;
    color: var(--warning);
    margin: var(--space-2) 0;
}

.promoted-points .bonus {
    color: var(--accent);
    font-size: 14px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal h2 {
    margin: 0 0 var(--space-5);
    font-size: 20px;
    color: var(--neutral-900);
    font-weight: 600;
}

.modal .form-group {
    margin-bottom: var(--space-4);
}

.modal .form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--neutral-700);
}

.modal .form-group input {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-md);
    font-size: 14px;
    box-sizing: border-box;
}

.modal .form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.modal .modal-actions {
    display: flex;
    gap: 12px;
    margin-top: var(--space-6);
}

.modal .modal-actions button {
    flex: 1;
}

.notification-bell {
    position: relative;
    display: inline-block;
    cursor: pointer;
    font-size: 18px;
    padding: var(--space-2);
    background: var(--neutral-100);
    border: none;
    border-radius: var(--radius-md);
    vertical-align: middle;
    transition: all 0.15s ease;
    min-width: 44px;
    min-height: 44px;
    text-align: center;
}

.notification-bell:hover {
    background: var(--neutral-200);
}

.settings-button {
    position: relative;
    display: inline-block;
    cursor: pointer;
    font-size: 18px;
    padding: var(--space-2);
    background: var(--neutral-100);
    border: none;
    border-radius: var(--radius-md);
    vertical-align: middle;
    transition: all 0.15s ease;
    min-width: 44px;
    min-height: 44px;
    text-align: center;
}

.settings-button:hover {
    background: var(--neutral-200);
}

.password-requirements {
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: var(--neutral-100);
    border-radius: var(--radius-md);
}

.password-requirements h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--neutral-900);
}

.requirement-item {
    font-size: 13px;
    padding: var(--space-2) 0;
    color: var(--neutral-600);
}

.requirement-item.met {
    color: var(--success);
}

.requirement-item::before {
    content: "✗ ";
    margin-right: var(--space-2);
}

.requirement-item.met::before {
    content: "✓ ";
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: white;
    border-radius: var(--radius-md);
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.notification-dropdown {
    position: fixed;
    top: 70px;
    right: 20px;
    width: calc(100% - 40px);
    max-width: 420px;
    max-height: 540px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    z-index: var(--z-modal);
    display: none;
    border: 1px solid var(--neutral-200);
}

.notification-dropdown.show {
    display: block;
}

.notification-header {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--neutral-200);
    font-weight: 600;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--neutral-900);
}

.notification-item {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--neutral-100);
    cursor: pointer;
    transition: background 0.15s ease;
}

.notification-item:hover {
    background: var(--neutral-50);
}

.notification-item.unread {
    background: var(--accent-light);
}

.notification-item.unread:hover {
    background: var(--accent-light-hover);
}

.notification-message {
    font-size: 14px;
    color: var(--neutral-900);
    margin-bottom: var(--space-1);
    line-height: 1.5;
}

.notification-time {
    font-size: 12px;
    color: var(--neutral-500);
}

.notification-empty {
    padding: var(--space-10) var(--space-5);
    text-align: center;
    color: var(--neutral-500);
    font-size: 14px;
}

.login-form {
    max-width: 440px;
    margin: 60px auto;
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--neutral-200);
}

.login-form h2 {
    text-align: center;
    margin-bottom: var(--space-8);
    color: var(--neutral-900);
    font-size: 24px;
    font-weight: 600;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: var(--z-notification);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
    max-width: 400px;
}

@media (max-width: 768px) {
    .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

.toast {
    pointer-events: auto;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid;
}

@media (max-width: 768px) {
    .toast {
        min-width: 0;
    }
}

.toast.toast-success {
    border-left-color: var(--success);
    background: var(--success-light);
}

.toast.toast-error {
    border-left-color: var(--error);
    background: var(--error-light);
}

.toast.toast-warning {
    border-left-color: var(--warning);
    background: var(--warning-light);
}

.toast.toast-info {
    border-left-color: var(--info);
    background: var(--info-light);
}

.toast-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: var(--neutral-900);
    word-wrap: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: var(--neutral-600);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.toast.toast-exit {
    animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.order-services {
    margin-top: var(--space-3);
    padding-left: var(--space-6);
}

.order-services li {
    font-size: 14px;
    color: var(--neutral-600);
    margin-bottom: var(--space-2);
    line-height: 1.5;
}

.empty-state {
    text-align: center;
    padding: var(--space-10) var(--space-6);
    color: var(--neutral-500);
    font-size: 14px;
}

/* Mobile-first: These styles are the defaults above */
/* Desktop enhancements */
@media (min-width: 640px) {
    body {
        padding: var(--space-10);
    }

    .header {
        padding: 36px 32px;
    }

    .header h1 {
        font-size: 40px;
    }

    /* Padding moved to .tab-content */

    .service-card,
    .user-card,
    .order-card,
    .task-card {
        padding: var(--space-8);
        margin-bottom: var(--space-6);
    }

    .service-card h3,
    .user-card h3,
    .order-card h3 {
        font-size: 28px;
    }

    .actions {
        flex-direction: row;
    }

    /* Expand task answer grid on larger screens */
    .task-answers {
        grid-template-columns: repeat(3, 1fr);
    }

    .task-answers.single-col {
        grid-template-columns: repeat(2, 1fr);
    }

    .task-input .btn {
        width: auto;
        min-width: 200px;
    }

    .login-form {
        margin: 80px auto;
        padding: 56px;
    }

    .login-form h2 {
        font-size: 40px;
    }
}

/* Very small screens */
@media (max-width: 374px) {
    .container {
        border-radius: 0;
    }

    body {
        padding: 0;
    }

    .header h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 18px;
    }

    h3 {
        font-size: 16px;
    }
}

/* Mobile-specific improvements for touch targets and form elements */
@media (max-width: 767px) {
    /* Ensure all interactive elements have minimum touch target size (44px) */
    .btn,
    .form-group select,
    .form-group input,
    .form-group textarea {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-group select {
        background-size: 24px;
        background-position: right 10px center;
    }

    /* Improve readability on small screens */
    .form-group label {
        font-size: 16px;
    }

    /* Modal adjustments for mobile */
    .modal-overlay {
        padding: var(--space-3);
        align-items: flex-start;
        padding-top: 20px;
    }

    .modal {
        max-width: 100%;
        padding: var(--space-4);
        max-height: calc(100vh - 40px);
    }

    .modal h2 {
        font-size: 18px;
        margin-bottom: var(--space-4);
    }

    .modal .form-group {
        margin-bottom: var(--space-3);
    }

    .modal .form-group label {
        font-size: 15px;
        margin-bottom: var(--space-1);
    }

    .modal .form-group input[type="checkbox"] {
        height: 24px;
        width: 24px;
    }

    .checkbox-label {
        gap: 12px;
        font-size: 15px;
    }

    .modal-actions {
        display: flex;
        flex-direction: column;
        gap: var(--space-2);
    }

    .modal-actions .btn {
        width: 100%;
    }

    /* Better spacing for mobile */
    .form-group {
        margin-bottom: var(--space-4);
    }

    /* Ensure dropdown options are readable */
    select option {
        font-size: 16px;
        padding: var(--space-3);
    }
}

/* Specific fixes for very small devices */
@media (max-width: 360px) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
    }
}

/* Task Completions Table Styles */
.completion-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.completion-table thead {
    background: var(--neutral-100);
    color: var(--neutral-900);
    border-bottom: 1px solid var(--neutral-300);
}

.completion-table th {
    padding: var(--space-4) 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.completion-table td {
    padding: 14px;
    border-bottom: 1px solid var(--neutral-200);
    font-size: 15px;
    color: var(--neutral-900);
}

.completion-table tbody tr:hover {
    background: var(--neutral-100);
}

.completion-table tbody tr:last-child td {
    border-bottom: none;
}

.completion-table .answer-cell {
    max-width: 300px;
    word-wrap: break-word;
    white-space: normal;
}

@media (max-width: 768px) {
    .completion-table {
        font-size: 14px;
    }

    .completion-table th,
    .completion-table td {
        padding: var(--space-2);
    }

    .completion-table .answer-cell {
        max-width: 200px;
    }
}

/* Table scroll affordance - gradient fade on right edge */
.table-scroll-wrapper {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
}

.table-scroll-hint {
    text-align: center;
    font-size: 13px;
    color: var(--neutral-500);
    padding: var(--space-2) 0;
    font-style: italic;
}

/* Mobile card layout for completions tables */
.completion-cards {
    display: none; /* Hidden by default, shown on mobile */
}

.completion-card {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-200);
}

.completion-card-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--neutral-100);
}

.completion-card-row:last-child {
    border-bottom: none;
}

.completion-card-label {
    font-weight: 600;
    color: var(--neutral-600);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    margin-right: var(--space-3);
}

.completion-card-value {
    color: var(--neutral-900);
    font-size: 14px;
    text-align: right;
    word-break: break-word;
}

@media (max-width: 768px) {
    /* Hide tables on mobile - cards are shown instead */
    .table-scroll-wrapper {
        display: none;
    }

    .table-scroll-hint {
        display: none;
    }

    /* Show mobile cards on mobile */
    .completion-cards {
        display: block;
    }
}

@media (min-width: 769px) {
    /* Hide cards on desktop - tables are shown instead */
    .completion-cards {
        display: none;
    }

    /* Show tables on desktop */
    .table-scroll-wrapper {
        display: block;
    }
}

/* ================================================== */
/* Mobile Navigation Components */
/* ================================================== */

/* Hamburger Menu Button - All Screen Sizes */
.hamburger-menu {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: var(--space-2);
    color: var(--neutral-700);
    transition: all 0.15s ease;
}

.hamburger-menu:hover {
    background: var(--neutral-100);
    border-radius: var(--radius-sm);
}

/* User Drawer - All Screen Sizes */
.drawer-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drawer-backdrop.show {
    display: block;
    opacity: 1;
}

.user-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: white;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-modal);
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: var(--space-6);
}

.user-drawer.open {
    left: 0;
}

@media (max-width: 768px) {
    .user-drawer {
        width: 280px;
        left: -280px;
    }
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--neutral-200);
}

.drawer-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--neutral-900);
}

.drawer-close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: var(--space-2);
    color: var(--neutral-600);
    line-height: 1;
}

.drawer-item {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--neutral-100);
}

.drawer-item:last-child {
    border-bottom: none;
}

.drawer-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.drawer-value {
    font-size: 16px;
    color: var(--neutral-900);
    font-weight: 500;
}

.drawer-nav {
    margin: var(--space-6) 0;
}

.drawer-nav-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
    padding: 0 var(--space-2);
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    width: 100%;
    background: transparent;
    border: none;
    padding: var(--space-3) var(--space-2);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: var(--neutral-700);
    text-align: left;
    transition: all 0.15s ease;
    border-radius: var(--radius-md);
    min-height: 48px;
}

.drawer-nav-item:hover {
    background: var(--neutral-100);
    color: var(--neutral-900);
}

.drawer-nav-item.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.drawer-nav-item.disabled {
    color: var(--neutral-400);
    opacity: 0.6;
    cursor: not-allowed;
}

.drawer-nav-item.disabled:hover {
    background: transparent;
}

.drawer-nav-icon {
    font-size: 20px;
    margin-right: var(--space-3);
    width: 28px;
    text-align: center;
}

.drawer-nav-badge {
    margin-left: auto;
    background: var(--error);
    color: white;
    border-radius: var(--radius-md);
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.drawer-divider {
    height: 1px;
    background: var(--neutral-200);
    margin: var(--space-4) 0;
}

.drawer-button {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    margin-top: var(--space-4);
    transition: all 0.15s ease;
}

.drawer-button:hover {
    background: var(--accent-hover);
}

/* Bottom Navigation - Mobile Only */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--neutral-200);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    z-index: var(--z-fixed);
    height: 64px;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }

    /* Add bottom padding to content when bottom nav is visible */
    .content {
        padding-bottom: 80px;
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    color: var(--neutral-600);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
    min-height: 48px;
    position: relative;
}

.bottom-nav-item:hover {
    background: var(--neutral-50);
}

.bottom-nav-item.active {
    color: var(--accent);
}

.bottom-nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.bottom-nav-badge {
    position: absolute;
    top: 6px;
    right: 50%;
    transform: translateX(12px);
    background: var(--error);
    color: white;
    border-radius: var(--radius-md);
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

/* More Menu Modal - Mobile Only */
.more-menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.more-menu-backdrop.show {
    display: block;
    opacity: 1;
}

.more-menu {
    position: fixed;
    bottom: -400px;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: var(--z-modal);
    transition: bottom 0.3s ease;
    max-height: 70vh;
    overflow-y: auto;
}

.more-menu.open {
    bottom: 0;
}

.more-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--neutral-200);
}

.more-menu-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--neutral-900);
}

.more-menu-close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: var(--space-2);
    color: var(--neutral-600);
    line-height: 1;
}

.more-menu-list {
    padding: var(--space-3) 0;
}

.more-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    background: transparent;
    border: none;
    padding: var(--space-4) var(--space-6);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: var(--neutral-800);
    text-align: left;
    transition: all 0.15s ease;
    min-height: 56px;
}

.more-menu-item:hover {
    background: var(--neutral-50);
}

.more-menu-item-icon {
    font-size: 20px;
    margin-right: var(--space-3);
    width: 28px;
    text-align: center;
}

.more-menu-item-badge {
    margin-left: auto;
    background: var(--error);
    color: white;
    border-radius: var(--radius-md);
    padding: var(--space-1) 10px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* Header - Consistent across all screen sizes */
.header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-3);
}

.header h1 {
    margin-bottom: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Hide user-info on all screen sizes - now in drawer */
.header .user-info {
    display: none;
}

/* Mobile header adjustments */
@media (max-width: 768px) {
    .header {
        padding: var(--space-4) var(--space-5);
    }

    .header h1 {
        font-size: 20px;
    }
}

/* Desktop - Only hide bottom nav */
@media (min-width: 769px) {
    .bottom-nav,
    .more-menu,
    .more-menu-backdrop {
        display: none !important;
    }

    /* Content padding for desktop */
    /* Padding moved to .tab-content */
}

@media (min-width: 1024px) {
    /* Padding moved to .tab-content */
}

/* ================================================== */
/* Utility Classes - Design System Compliance */
/* ================================================== */

/* Status Badges */
.badge-status {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-status.pending {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-status.accepted {
    background: var(--info-light);
    color: var(--info-dark);
}

.badge-status.completed {
    background: var(--success-light);
    color: var(--success);
}

.badge-status.declined {
    background: var(--error-light-alt);
    color: var(--error-dark);
}

.badge-status.cancelled {
    background: var(--error-light);
    color: var(--error-darker);
}

/* Unread Badge */
.badge-unread {
    background: var(--error);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: var(--space-1) var(--space-2);
    margin-left: var(--space-2);
    border-radius: var(--radius-sm);
}

/* Type Badges */
.badge-type {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.badge-type.task {
    background: var(--accent-light-hover);
    color: var(--accent-dark);
}

.badge-type.service {
    background: var(--success-light);
    color: var(--success);
}

.badge-type.question {
    background: var(--neutral-200);
    color: var(--neutral-700);
}

.badge-type.free-text {
    background: var(--success-light-alt);
    color: var(--success-darker);
}

/* Highlight Containers */
.container-highlight {
    margin: var(--space-3) 0;
    padding: var(--space-3);
    border-radius: var(--radius-md);
}

.container-highlight.warning {
    background: var(--warning-light);
    border: 1px solid var(--warning);
}

.container-highlight.info {
    background: var(--neutral-50);
    border-left: 4px solid var(--accent);
}

.container-highlight.success {
    background: var(--success-light);
    border: 1px solid var(--success);
}

.container-highlight.neutral {
    background: var(--neutral-100);
    border: 1px solid var(--neutral-300);
}

/* Counter-offer containers */
.counter-offer-container {
    margin-top: var(--space-3);
    padding: var(--space-3);
    background: var(--warning-orange);
    border-radius: var(--radius-md);
}

.counter-date-container {
    margin-top: var(--space-3);
    padding: var(--space-3);
    background: var(--neutral-100);
    border-radius: var(--radius-md);
}

/* Note Cards */
.note-card {
    margin: var(--space-3) 0;
    padding: var(--space-3);
    border-radius: var(--radius-md);
}

.note-card.highlight {
    background: var(--neutral-50);
    border-left: 4px solid var(--accent);
}

.note-card.standard {
    background: var(--neutral-100);
    border-left: 3px solid var(--neutral-800);
}

.note-card.special {
    background: var(--secondary-light);
    border-left: 4px solid var(--secondary);
}

/* Button Variants */
.btn-success {
    background: var(--success);
    color: white;
}

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

.btn-success-soft {
    background: var(--success-light-alt);
    color: var(--success-darker);
    box-shadow: 0 2px 6px rgba(187, 247, 208, 0.4);
}

.btn-success-soft:hover {
    background: var(--success-light-alt);
    box-shadow: 0 4px 8px rgba(187, 247, 208, 0.5);
}

.btn-neutral {
    background: var(--neutral-200);
    color: var(--neutral-900);
}

.btn-neutral:hover {
    background: var(--neutral-300);
}

.btn-mini {
    font-size: 12px;
    padding: var(--space-1) var(--space-2);
    min-height: 44px;
}

.btn-nav {
    padding: var(--space-1) var(--space-3);
    background: var(--neutral-200);
    color: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    min-height: 44px;
}

.btn-nav:hover {
    background: var(--neutral-300);
}

/* Form Elements */
.input-inline {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: white;
    color: var(--neutral-900);
}

.input-inline:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.textarea-inline {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-md);
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: var(--space-2);
    font-family: inherit;
}

.textarea-inline:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.label-admin {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    color: var(--neutral-700);
    font-size: 14px;
}

/* Gallery Components */
.gallery-btn {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    z-index: var(--z-sticky);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    transition: background 0.15s ease;
}

.gallery-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}

.gallery-btn.fullscreen {
    top: var(--space-4);
    right: var(--space-4);
    gap: var(--space-1);
}

.gallery-btn.nav {
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.gallery-btn.nav.prev {
    left: 20px;
}

.gallery-btn.nav.next {
    right: 20px;
}

.gallery-indicator {
    position: absolute;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    z-index: var(--z-sticky);
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.gallery-indicator.viewed {
    background: var(--neutral-100);
    color: var(--neutral-700);
}

.gallery-indicator.not-viewed {
    background: var(--accent);
    color: white;
}

/* Status Filter Buttons */
.status-filter-btn {
    padding: var(--space-3) var(--space-4);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    min-height: 44px;
}

.status-filter-btn.inactive {
    background: var(--neutral-100);
    color: var(--neutral-600);
}

.status-filter-btn.active.pending {
    background: var(--warning-light);
    color: var(--warning);
    box-shadow: 0 2px 6px rgba(254, 215, 170, 0.4);
}

.status-filter-btn.active.accepted {
    background: var(--info-light);
    color: var(--info-dark);
    box-shadow: 0 2px 6px rgba(209, 232, 255, 0.4);
}

.status-filter-btn.active.completed {
    background: var(--success-light);
    color: var(--success);
    box-shadow: 0 2px 6px rgba(198, 246, 213, 0.4);
}

.status-filter-btn.active.declined {
    background: var(--error-light-alt);
    color: var(--error-dark);
    box-shadow: 0 2px 6px rgba(254, 202, 202, 0.4);
}

.status-filter-btn.active.cancelled {
    background: var(--error-light);
    color: var(--error-darker);
    box-shadow: 0 2px 6px rgba(254, 226, 226, 0.4);
}
