/* =================== MAIN DASHBOARD STYLING =================== */
.zoot-admin-dashboard {
    margin-top: 20px;
}
.analytics-grid, .teams-grid, .status-grid, .timeline-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
.stat-card, .team-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #0073aa;
    display: block;
}
.stat-number.critical {
    color: #d63384;
}
.efficiency-high { color: #28a745; }
.efficiency-medium { color: #ffc107; }
.efficiency-low { color: #dc3545; }
.projects-table, .milestone-list, .critical-tasks {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.projects-table th,
.projects-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
.status-pending { background: #ffc107; color: #000; padding: 3px 8px; border-radius: 3px; }
.status-active, .status-in_progress { background: #0073aa; color: #fff; padding: 3px 8px; border-radius: 3px; }
.status-completed { background: #28a745; color: #fff; padding: 3px 8px; border-radius: 3px; }
.zoot-refresh-controls {
    margin-top: 30px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

/* =================== FRONTEND ASKING TASKS STYLING =================== */
.asking-tasks-filters-frontend {
    margin: 20px 0;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.asking-tasks-filters-frontend select {
    padding: 6px 8px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    min-width: 150px;
    font-size: 14px;
    line-height: 2;
    color: #2c3338;
    background-color: #ffffff;
}

/* Frontend Task Cards */
.task-card-frontend {
    background: #ffffff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

/* =================== PROJECT MANAGEMENT STYLING =================== */
.pms-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pms-nav {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f1;
}

.nav-btn {
    background: none;
    border: none;
    padding: 15px 20px;
    margin-right: 10px;
    cursor: pointer;
    color: #646970;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    color: #2271b1;
    background-color: #f6f7f7;
}

.nav-btn.active {
    color: #2271b1;
    border-bottom: 3px solid #2271b1;
    background-color: #ffffff;
}

.pms-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.pms-section.active {
    display: block;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.stat-card h3 {
    margin: 0 0 12px 0;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #6366f1;
    line-height: 1.2;
    margin-bottom: 8px;
}

.stat-change {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 20px;
    background-color: #f0f9ff;
    color: #0369a1;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table th {
    background: #f8fafc;
    color: #374151;
    font-weight: 600;
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.table td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #6b7280;
}

.table tr:hover {
    background-color: #f9fafb;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.btn-primary {
    background: #6366f1;
    color: #ffffff;
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-danger {
    background: #ef4444;
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 30px;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.close {
    color: #9ca3af;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: #374151;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.recent-activity {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recent-activity h3 {
    color: #1e293b;
    margin-bottom: 15px;
}

.activity-item {
    padding: 10px;
    border-left: 3px solid #6366f1;
    background: #f8fafc;
    margin-bottom: 10px;
    border-radius: 4px;
}

.activity-item .time {
    font-size: 12px;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pms-container {
        padding: 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .pms-nav {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        margin: 10px auto;
    }
}

/* =================== MEMBER PORTAL STYLES =================== */
/* Member Dashboard Styles - Version 2.0 - Updated with filters and overdue warnings */

/* Order Task Card Styles for Member Dashboard */
.order-task-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.order-task-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.order-task-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.order-task-title h3 {
    margin: 0 0 10px 0;
    color: #1e293b;
    font-size: 1.3em;
    font-weight: 600;
}

.order-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9em;
}

.order-task-meta .meta-item {
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.order-task-meta .meta-item strong {
    color: #475569;
}

.order-task-meta .order-type-pill,
.order-task-meta .order-type-pill strong {
    color: #fff;
}

.task-count-badge {
    background: #e2e8f0;
    color: #334155;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85em;
}

.order-type-pill {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85em;
    display: inline-block;
}

.order-type-pill strong {
    color: white;
}

.order-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.days-left-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
    background: #f1f5f9;
    white-space: nowrap;
}

.days-left-badge--danger {
    color: #b91c1c;
    background: #fee2e2;
}

.order-general-info {
    padding: 16px 20px;
    background: #fafbfc;
    border-bottom: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.order-general-info .info-item {
    display: flex;
    gap: 8px;
    font-size: 0.9em;
}

.order-general-info .info-item label {
    color: #64748b;
    font-weight: 500;
    min-width: 60px;
}

.order-general-info .info-item span {
    color: #1e293b;
}

.order-notes-block {
    margin: 14px 20px 18px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #6366f1;
}

.order-notes-block h4 {
    font-size: 0.95em;
    font-weight: 600;
    margin-bottom: 8px;
    color: #475569;
}

.order-notes-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 8px;
    display: block;
}

.note-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
    color: #374151;
}

.note-toggle {
    margin-top: 8px;
    padding: 6px 12px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
}

.note-toggle:hover {
    background: #4f46e5;
}

/* Order Task Tabs */
.order-task-tabs-container {
    padding: 0;
}

.order-task-tabs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    background: #f8fafc;
    overflow-x: auto;
    white-space: nowrap;
}

.task-tab {
    flex: 1;
    min-width: 200px;
    padding: 16px 20px;
    cursor: pointer;
    border-right: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    position: relative;
}

.task-tab:last-child {
    border-right: none;
}

.task-tab:hover {
    background: #f1f5f9;
}

.task-tab.active {
    background: white;
    border-bottom: 3px solid #6366f1;
}

.task-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #6366f1;
}

.task-tab-name {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.task-tab.active .task-tab-name {
    color: #6366f1;
}

.task-tab-type {
    display: block;
    font-size: 0.85em;
    color: #64748b;
}

/* Task Panels */
.order-task-content {
    position: relative;
}

.task-panel {
    display: none;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

.task-panel.active {
    display: block;
}

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

.task-details h4 {
    margin: 0 0 16px 0;
    color: #1e293b;
    font-size: 1.1em;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.task-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.task-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-info-item label {
    font-size: 0.85em;
    color: #64748b;
    font-weight: 500;
}

.task-info-item span {
    color: #1e293b;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.in-progress {
    background: #e0e7ff;
    color: #4338ca;
}

.status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.priority-chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-chip.priority-urgent {
    background: #fee2e2;
    color: #991b1b;
}

.priority-chip.priority-high {
    background: #fef3c7;
    color: #92400e;
}

.priority-chip.priority-normal {
    background: #dbeafe;
    color: #1e40af;
}

.priority-chip.priority-low {
    background: #f3f4f6;
    color: #6b7280;
}

.task-notes-block {
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #6366f1;
}

.task-notes-block h4 {
    margin: 0 0 8px 0;
    color: #475569;
    font-size: 0.95em;
    font-weight: 600;
}

.task-assignment-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.completion-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95em;
}

/* Priority Filter Buttons */
.priority-filter-btn {
    padding: 6px 14px;
    font-size: 0.9em;
    border: 1px solid #e5e7eb;
    background: white;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.priority-filter-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.priority-filter-btn.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* Overdue Warning */
.overdue-warning {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border-left: 3px solid #dc2626;
    border-radius: 4px;
}

.overdue-warning span {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.85em;
}

/* Responsive Design for Member Portal */
@media (max-width: 768px) {
    .order-task-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .days-left-badge {
        text-align: center;
    }

    .order-task-tabs {
        flex-direction: column;
    }

    .task-tab {
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .task-tab.active {
        border-bottom: 3px solid #6366f1;
    }

    .task-info-grid {
        grid-template-columns: 1fr;
    }

    .order-general-info {
        grid-template-columns: 1fr;
    }
}

/* =================== ASKING TASK STATUS INDICATORS =================== */
.asking-status-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 10px 20px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #475569;
    border-left: 3px solid #94a3b8;
}

.asking-status-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status-dot--pending {
    background: #dc2626;
    box-shadow: 0 0 6px rgba(220, 38, 38, 0.6);
}

.status-dot--notify {
    background: #f97316;
    box-shadow: 0 0 6px rgba(249, 115, 22, 0.6);
}

.status-dot--complete {
    background: #16a34a;
    box-shadow: 0 0 6px rgba(22, 163, 74, 0.6);
}

.status-dot--notify::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: rgba(249, 115, 22, 0.4);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.2);
        opacity: 0;
    }
}

.btn-notify {
    padding: 6px 12px;
    font-size: 0.85em;
    border: 1px solid #f97316;
    background: white;
    color: #f97316;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-notify:hover:not(:disabled) {
    background: #fff7ed;
    border-color: #ea580c;
    color: #ea580c;
}

.btn-notify:disabled,
.btn-notify.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #d1d5db;
    color: #9ca3af;
}

.asking-status-timestamp {
    font-size: 0.8em;
    color: #64748b;
    margin-left: 4px;
}