/* ═══════════════════════════════════════════════════════════════
   style.css — The Bridge Protocol
   Warm Editorial Theme: Cream & Forest Emerald
   Premium light design with crisp white cards on warm alabaster canvas.
═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
    /* ── New Cream & Forest Emerald Palette ── */
    --bg-canvas:            #fbf9f5;
    --bg-card:              #ffffff;
    --bg-card-hover:        #f4f0e8;
    --bg-input:             #fbf9f5;
    --bg-modal:             #ffffff;
    --bg-glass:             rgba(255, 255, 255, 0.82);

    --border-subtle:        #e6dfd3;
    --border-default:       #c8bfb0;
    --border-focus:         #0f4c3a;

    --text-heading:         #1a1917;
    --text-primary:         #1a1917;
    --text-body:            #4a4741;
    --text-secondary:       #4a4741;
    --text-muted:           #78736a;
    --text-link:            #0f4c3a;

    /* ── Brand: Forest Emerald ── */
    --btn-primary:          #0f4c3a;
    --btn-primary-hover:    #0b3a2c;
    --btn-secondary:        #e3ebe6;
    --btn-secondary-text:   #0f4c3a;

    /* ── Accent ── */
    --accent-budget:        #1b6348;
    --emerald:              #1b6348;
    --emerald-light:        #1b6348;

    /* ── Category badge palette ── */
    --badge-tutoring-bg:    #f0ebf8;
    --badge-tutoring-text:  #4a2e80;
    --badge-tech-bg:        #e6f4f1;
    --badge-tech-text:      #0f5247;
    --badge-design-bg:      #fdf0e6;
    --badge-design-text:    #8a3b0f;
    --badge-logistics-bg:   #e8f5e9;
    --badge-logistics-text: #1b5e20;
    --badge-other-bg:       #f5f0e8;
    --badge-other-text:     #5a5248;

    /* ── Legacy brand aliases (keep for components that reference them) ── */
    --indigo:               #0f4c3a;
    --indigo-light:         #1b6348;
    --indigo-dark:          #0b3a2c;
    --cyan:                 #0f5247;
    --cyan-light:           #1b6348;
    --amber:                #b45309;
    --rose:                 #b91c1c;
    --violet:               #4a2e80;

    /* ── Gradients ── */
    --grad-brand:           linear-gradient(135deg, #0f4c3a, #1b6348);
    --grad-card-glow:       linear-gradient(135deg, rgba(15,76,58,0.04), rgba(27,99,72,0.03));
    --grad-hero:            radial-gradient(ellipse 80% 60% at 50% -10%, rgba(15,76,58,0.07) 0%, transparent 70%);
    --grad-text:            linear-gradient(135deg, #0f4c3a, #1b6348);

    /* ── Shadows (light-mode, warm toned) ── */
    --shadow-card:          0 2px 8px rgba(26,25,23,0.06);
    --shadow-card-hover:    0 8px 28px rgba(15,76,58,0.12);
    --shadow-modal:         0 20px 60px rgba(26,25,23,0.14);
    --shadow-btn:           0 4px 14px rgba(15,76,58,0.25);
    --shadow-toast:         0 8px 28px rgba(26,25,23,0.12);

    /* ── Radii ── */
    --radius-sm:            6px;
    --radius-md:            10px;
    --radius-lg:            16px;
    --radius-xl:            20px;
    --radius-full:          9999px;

    /* ── Spacing ── */
    --space-xs:             0.25rem;
    --space-sm:             0.5rem;
    --space-md:             1rem;
    --space-lg:             1.5rem;
    --space-xl:             2rem;
    --space-2xl:            3rem;

    /* ── Transitions ── */
    --transition-fast:      150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base:      250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:      400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* ── Typography ── */
    --font-sans:            'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* ── Teal accent (reach-out) mapped to forest emerald ── */
    --teal:                 #0f4c3a;
    --teal-hover:           #0b3a2c;
    --teal-light:           #1b6348;
    --teal-glow:            rgba(15, 76, 58, 0.28);
    --teal-bg:              rgba(15, 76, 58, 0.08);
    --teal-border:          rgba(15, 76, 58, 0.22);
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-canvas);
    color: var(--text-body);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Subtle warm top glow */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 400px;
    background: var(--grad-hero);
    pointer-events: none;
    z-index: 0;
}

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-canvas); }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--btn-primary); }

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-heading);
}

.gradient-text {
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Utility Classes ────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════════════ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 1px 4px rgba(26,25,23,0.06);
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    cursor: default;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-logo-img,
.brand-logo-svg {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(15,76,58,0.18);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.logo-container:hover .brand-logo-img,
.logo-container:hover .brand-logo-svg {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(15,76,58,0.28);
}

.logo-text {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.logo-text h1 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--text-heading);
}

.logo-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--btn-primary);
    background: var(--btn-secondary);
    border: 1px solid rgba(15,76,58,0.2);
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 18px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: all var(--transition-base);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

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

.btn-primary {
    background: var(--btn-primary);
    color: #fff;
    box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
    background: var(--btn-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15,76,58,0.32);
}

.btn-primary:active { transform: translateY(0); }

.btn-accent {
    background: linear-gradient(135deg, #1b6348, #0f4c3a);
    color: #fff;
    box-shadow: 0 4px 14px rgba(27,99,72,0.28);
}

.btn-accent:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 6px 20px rgba(27,99,72,0.36);
}

.btn-ghost {
    background: var(--bg-canvas);
    color: var(--text-body);
    border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
    background: var(--bg-card-hover);
    color: var(--text-heading);
    border-color: var(--border-default);
}

.btn-danger {
    background: rgba(185, 28, 28, 0.07);
    color: #b91c1c;
    border: 1px solid rgba(185, 28, 28, 0.2);
}

.btn-danger:hover {
    background: rgba(185, 28, 28, 0.13);
}

.btn-icon { font-size: 1rem; font-weight: 400; }

.btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-canvas);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
    line-height: 1;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-heading);
    border-color: var(--border-default);
}

.refresh-icon {
    display: inline-block;
    transition: transform 0.5s ease;
}

#refresh-btn:hover .refresh-icon {
    transform: rotate(360deg);
}

/* ═══════════════════════════════════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════════════════════════════════ */
.main-content {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg) var(--space-2xl);
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════════════════════════ */
.hero-section {
    text-align: center;
    padding: var(--space-2xl) 0 var(--space-xl);
}

.hero-inner {
    max-width: 640px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px 14px;
    background: rgba(15,76,58,0.07);
    border: 1px solid rgba(15,76,58,0.18);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--btn-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background: var(--btn-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.hero-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: var(--space-md);
    color: var(--text-heading);
}

.hero-sub {
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-card);
}

.stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: var(--border-subtle);
}

/* ═══════════════════════════════════════════════════════════════
   TASKS SECTION
═══════════════════════════════════════════════════════════════ */
.tasks-section {
    margin-top: var(--space-xl);
}

.section-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-heading);
}

/* ─── Filter Chips ───────────────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.filter-chip {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-body);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-chip:hover {
    border-color: var(--border-default);
    color: var(--text-heading);
    background: var(--bg-card-hover);
}

.filter-chip.active {
    background: var(--btn-primary);
    border-color: var(--btn-primary);
    color: #fff;
    font-weight: 600;
}

/* ─── Task Grid ──────────────────────────────────────────────── */
.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: var(--space-lg);
}

/* ─── Task Card ──────────────────────────────────────────────── */
.task-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    transition: all var(--transition-base);
    overflow: hidden;
    cursor: default;
    box-shadow: var(--shadow-card);
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--grad-brand);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.task-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-default);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-card-hover);
}

.task-card:hover::before {
    opacity: 1;
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-sm);
}

.card-body { flex: 1; }

.task-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.4;
    margin-bottom: var(--space-xs);
}

.task-card-desc {
    font-size: 0.855rem;
    color: var(--text-body);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
    gap: var(--space-sm);
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.task-budget {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-budget);
}

.task-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── Category Tags ──────────────────────────────────────────── */
.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-tag.small {
    font-size: 0.68rem;
    padding: 3px 8px;
}

/* Updated pastel category pills */
.cat--tech-repair       { background: var(--badge-tech-bg);      color: var(--badge-tech-text);      border: 1px solid rgba(15,82,71,0.18); }
.cat--tutoring          { background: var(--badge-tutoring-bg);   color: var(--badge-tutoring-text);  border: 1px solid rgba(74,46,128,0.18); }
.cat--graphic-design    { background: var(--badge-design-bg);     color: var(--badge-design-text);    border: 1px solid rgba(138,59,15,0.18); }
.cat--campus-logistics  { background: var(--badge-logistics-bg);  color: var(--badge-logistics-text); border: 1px solid rgba(27,94,32,0.18); }
.cat--other             { background: var(--badge-other-bg);      color: var(--badge-other-text);     border: 1px solid rgba(90,82,72,0.18); }

/* ─── Status Badge ───────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    transition: all 0.2s ease;
}

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

/* Open */
.status--open {
    background: rgba(15,76,58,0.1);
    color: #0f4c3a;
    border: 1px solid rgba(15,76,58,0.25);
}
.status--open .status-dot {
    background: #0f4c3a;
    box-shadow: 0 0 6px rgba(15,76,58,0.4);
}

/* Assigned / In Progress */
.status--assigned,
.status--in-progress {
    background: rgba(180, 83, 9, 0.09);
    color: #92400e;
    border: 1px solid rgba(180, 83, 9, 0.22);
}
.status--assigned .status-dot,
.status--in-progress .status-dot {
    background: #b45309;
    box-shadow: 0 0 6px rgba(180, 83, 9, 0.4);
    animation: pulseGlow 1.5s infinite;
}

/* Submitted */
.status--submitted {
    background: var(--badge-tutoring-bg);
    color: var(--badge-tutoring-text);
    border: 1px solid rgba(74,46,128,0.22);
}
.status--submitted .status-dot {
    background: #4a2e80;
    box-shadow: 0 0 6px rgba(74,46,128,0.35);
    animation: pulseGlow 1.2s infinite;
}

/* Completed */
.status--completed {
    background: rgba(15,76,58,0.1);
    color: #0f4c3a;
    border: 1px solid rgba(15,76,58,0.25);
}
.status--completed .status-dot {
    background: #0f4c3a;
}

/* Cancelled */
.status--cancelled {
    background: rgba(185, 28, 28, 0.08);
    color: #b91c1c;
    border: 1px solid rgba(185, 28, 28, 0.2);
}
.status--cancelled .status-dot {
    background: #b91c1c;
}

/* ─── Skeleton Loading ───────────────────────────────────────── */
.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    box-shadow: var(--shadow-card);
}

.skeleton-line {
    background: linear-gradient(90deg, #f4f0e8 25%, #ede8de 50%, #f4f0e8 75%);
    background-size: 200% 100%;
    border-radius: var(--radius-sm);
    animation: shimmer 1.5s infinite;
}

.skeleton-tag  { height: 22px; width: 80px; border-radius: var(--radius-full); }
.skeleton-title { height: 18px; width: 70%; }
.skeleton-desc  { height: 14px; }
.skeleton-desc-2 { height: 14px; width: 85%; }
.skeleton-budget { height: 16px; width: 90px; }

/* ─── Empty State ────────────────────────────────────────────── */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 1.05rem;
    color: var(--text-body);
    margin-bottom: var(--space-sm);
}

.empty-state p {
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ─── Error State ────────────────────────────────────────────── */
.error-state {
    grid-column: 1 / -1;
    padding: var(--space-xl) var(--space-lg);
    background: rgba(185, 28, 28, 0.05);
    border: 1px solid rgba(185, 28, 28, 0.16);
    border-radius: var(--radius-lg);
    text-align: center;
}

.error-state h4 {
    color: #b91c1c;
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
}

.error-state p {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.error-state code {
    background: rgba(26,25,23,0.07);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-body);
}

/* ═══════════════════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 25, 23, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: var(--space-md);
    animation: fadeIn var(--transition-fast) ease;
}

.modal-content {
    background: var(--bg-modal);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-xl);
    box-shadow: var(--shadow-modal);
    animation: slideUp var(--transition-base) ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.modal-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-heading);
}

/* ─── Task Preview Strip ─────────────────────────────────────── */
.task-preview-strip {
    background: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.preview-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.4;
}

.preview-budget {
    font-size: 0.8rem;
    color: var(--accent-budget);
    font-weight: 600;
}

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group {
    margin-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-body);
    letter-spacing: 0.02em;
}

.required {
    color: #b91c1c;
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-heading);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2378736a' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-group select option {
    background: var(--bg-modal);
    color: var(--text-heading);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(15, 76, 58, 0.1);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.08);
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.field-hint {
    font-size: 0.73rem;
    color: var(--text-muted);
}

.char-counter {
    font-size: 0.73rem;
    color: var(--text-muted);
    text-align: right;
}

.char-counter.warning { color: #b45309; }
.char-counter.over    { color: #b91c1c; }

/* Prefix input wrapper (UGX label) */
.input-prefix-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-prefix-wrapper:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(15, 76, 58, 0.1);
}

.input-prefix {
    padding: 10px 12px;
    background: var(--btn-secondary);
    border-right: 1px solid var(--border-subtle);
    color: var(--btn-primary);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.input-prefix-wrapper input {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.input-prefix-wrapper input:focus {
    border: none !important;
    box-shadow: none !important;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════════════════════════ */
#toast-container {
    position: fixed;
    top: var(--space-md);
    right: var(--space-md);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-modal);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-toast);
    min-width: 280px;
    max-width: 380px;
    pointer-events: all;
    animation: slideInRight var(--transition-base) ease;
}

.toast.toast-exit {
    animation: slideOutRight var(--transition-base) ease forwards;
}

.toast-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-body { flex: 1; }

.toast-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 2px;
}

.toast-msg {
    font-size: 0.78rem;
    color: var(--text-body);
    line-height: 1.4;
}

.toast-success { border-color: rgba(15,76,58,0.28); background: #f0f8f4; }
.toast-success .toast-icon { color: #0f4c3a; }

.toast-error { border-color: rgba(185,28,28,0.25); background: #fef2f2; }
.toast-error .toast-icon { color: #b91c1c; }

.toast-info { border-color: var(--border-default); }
.toast-info .toast-icon { color: var(--btn-primary); }

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════════════ */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.85); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

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

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

@keyframes cardPop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.task-card {
    animation: cardPop var(--transition-slow) ease both;
}

/* Stagger animation delay for cards */
.task-card:nth-child(1)  { animation-delay: 0ms; }
.task-card:nth-child(2)  { animation-delay: 50ms; }
.task-card:nth-child(3)  { animation-delay: 100ms; }
.task-card:nth-child(4)  { animation-delay: 150ms; }
.task-card:nth-child(5)  { animation-delay: 200ms; }
.task-card:nth-child(6)  { animation-delay: 250ms; }
.task-card:nth-child(n+7){ animation-delay: 300ms; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .navbar { padding: 0 var(--space-md); }

    .main-content { padding: var(--space-lg) var(--space-md) var(--space-xl); }

    .hero-section { padding: var(--space-xl) 0 var(--space-lg); }
    .hero-title   { font-size: 1.8rem; }

    .hero-stats {
        gap: var(--space-md);
        padding: var(--space-sm) var(--space-md);
    }

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

    .modal-content { padding: var(--space-lg); }

    #toast-container {
        top: auto;
        bottom: var(--space-md);
        right: var(--space-sm);
        left: var(--space-sm);
    }

    .toast { min-width: unset; max-width: 100%; }
}

@media (max-width: 480px) {
    .hero-stats { flex-wrap: wrap; justify-content: center; }
    .stat-divider { display: none; }
    .filter-bar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: var(--space-xs); }
    .filter-chip { flex-shrink: 0; }
}


/* ═══════════════════════════════════════════════════════════════
   NAV TABS (Marketplace / My Tasks)
═══════════════════════════════════════════════════════════════ */
.nav-center {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 4px;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.nav-tab:hover {
    color: var(--text-heading);
    background: var(--bg-card-hover);
}

.nav-tab.active {
    background: var(--btn-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(15,76,58,0.28);
}


/* ═══════════════════════════════════════════════════════════════
   MY TASKS SECTION
═══════════════════════════════════════════════════════════════ */
.section-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-body);
    font-weight: 400;
}

.my-tasks-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.my-task-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.my-task-row::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-card-glow);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.my-task-row:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

.my-task-row:hover::before { opacity: 1; }

.my-task-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.my-task-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.my-task-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-task-desc {
    font-size: 0.84rem;
    color: var(--text-body);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.my-task-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* View Bids button */
.btn-view-bids {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--btn-secondary);
    border: 1px solid rgba(15,76,58,0.22);
    border-radius: var(--radius-md);
    color: var(--btn-primary);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-view-bids:hover {
    background: var(--btn-primary);
    border-color: var(--btn-primary);
    color: #fff;
    box-shadow: var(--shadow-btn);
    transform: translateY(-1px);
}

.bids-icon { font-size: 1rem; }


/* ═══════════════════════════════════════════════════════════════
   BIDS PANEL — SLIDE-IN DRAWER
═══════════════════════════════════════════════════════════════ */
.bids-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 25, 23, 0.35);
    backdrop-filter: blur(3px);
    z-index: 200;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.bids-panel-overlay.open {
    opacity: 1;
}

.bids-panel-overlay.hidden {
    display: none !important;
}

.bids-panel {
    width: 100%;
    max-width: 520px;
    height: 100%;
    background: var(--bg-canvas);
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    box-shadow: -8px 0 40px rgba(26,25,23,0.12);
}

.bids-panel-overlay.open .bids-panel {
    transform: translateX(0);
}

.bids-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    background: var(--bg-card);
}

.bids-panel-title-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bids-panel-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-top: 2px;
}

.bids-panel-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-heading);
}

.bids-panel-task-name {
    font-size: 0.85rem;
    color: var(--text-body);
    margin-top: 2px;
    line-height: 1.4;
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bids-panel-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-xl);
    background: var(--btn-secondary);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.bids-panel-budget {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-budget);
}

.bids-panel-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.bids-panel-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px var(--space-xl);
    background: rgba(180,83,9,0.05);
    border-bottom: 1px solid rgba(180,83,9,0.1);
    font-size: 0.8rem;
    color: var(--text-body);
    flex-shrink: 0;
}

.hint-icon { font-size: 1rem; flex-shrink: 0; }

.bids-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    background: var(--bg-canvas);
}


/* ═══════════════════════════════════════════════════════════════
   BID CARDS (inside panel)
═══════════════════════════════════════════════════════════════ */
.bid-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.bid-card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-card-hover);
}

/* Best bid highlight */
.bid-card--best {
    border-color: rgba(15,76,58,0.3);
    background: linear-gradient(
        135deg,
        rgba(15,76,58,0.04) 0%,
        var(--bg-card) 60%
    );
}

.bid-card--best:hover {
    border-color: var(--btn-primary);
    box-shadow: 0 4px 24px rgba(15,76,58,0.14);
}

/* Rejected bid — dimmed */
.bid-card.bid-status-rejected {
    opacity: 0.55;
}

/* Accepted bid — highlighted */
.bid-card.bid-status-accepted {
    border-color: rgba(15,76,58,0.35);
    background: linear-gradient(135deg, rgba(15,76,58,0.05) 0%, var(--bg-card) 60%);
}

.best-bid-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--btn-primary);
    background: var(--btn-secondary);
    border: 1px solid rgba(15,76,58,0.22);
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.bid-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.bid-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.bid-card--best .bid-rank {
    background: var(--btn-secondary);
    border-color: rgba(15,76,58,0.3);
    color: var(--btn-primary);
}

.bid-amount-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 1;
}

.bid-amount {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.bid-savings-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--btn-primary);
    background: var(--btn-secondary);
    border: 1px solid rgba(15,76,58,0.2);
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

/* Status pill */
.bid-status-pill {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
}

.bid-status--pending  { color: #92400e;  background: rgba(180,83,9,0.09);   border-color: rgba(180,83,9,0.22); }
.bid-status--accepted { color: #0f4c3a;  background: rgba(15,76,58,0.09);   border-color: rgba(15,76,58,0.22); }
.bid-status--rejected { color: #b91c1c;  background: rgba(185,28,28,0.08);  border-color: rgba(185,28,28,0.18); }

.bid-proposal-text {
    font-size: 0.875rem;
    color: var(--text-body);
    line-height: 1.6;
    background: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.bid-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.bid-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

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

/* Accept / Reject buttons */
.btn-accept,
.btn-reject {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid transparent;
}

.btn-accept {
    background: rgba(15,76,58,0.08);
    border-color: rgba(15,76,58,0.25);
    color: var(--btn-primary);
}

.btn-accept:hover {
    background: var(--btn-primary);
    border-color: var(--btn-primary);
    color: #fff;
    box-shadow: var(--shadow-btn);
    transform: translateY(-1px);
}

.btn-reject {
    background: rgba(185,28,28,0.07);
    border-color: rgba(185,28,28,0.2);
    color: #b91c1c;
}

.btn-reject:hover {
    background: rgba(185,28,28,0.14);
    border-color: #b91c1c;
    box-shadow: 0 3px 10px rgba(185,28,28,0.16);
    transform: translateY(-1px);
}


/* ─── Bids loading skeletons ──────────────────────────────────── */
.bids-loading {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.bid-skeleton {
    height: 120px;
    border-radius: var(--radius-lg);
    background: linear-gradient(
        90deg,
        #f4f0e8 25%,
        #ede8de 50%,
        #f4f0e8 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.bids-empty {
    padding: var(--space-2xl) var(--space-xl);
}


/* ─── Responsive: Bids Panel ─────────────────────────────────── */
@media (max-width: 600px) {
    .bids-panel {
        max-width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-default);
    }

    .bids-panel-overlay {
        align-items: flex-end;
    }

    .bids-panel-overlay.open .bids-panel {
        transform: translateY(0);
    }

    .bids-panel-overlay:not(.open) .bids-panel {
        transform: translateY(100%);
    }

    .my-task-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-view-bids {
        width: 100%;
        justify-content: center;
    }

    .nav-center {
        display: none;
    }
}


/* ═══════════════════════════════════════════════════════════════
   REACH-OUT / DIRECT INQUIRY
═══════════════════════════════════════════════════════════════ */

/* ── "Send Direct Inquiry" primary CTA ── */
.btn-reachout {
    background:    var(--btn-primary);
    color:         #fff;
    border:        1px solid transparent;
    box-shadow:    var(--shadow-btn);
    font-weight:   700;
    letter-spacing: 0.01em;
}

.btn-reachout:hover:not(:disabled) {
    background:    var(--btn-primary-hover);
    transform:     translateY(-2px);
    box-shadow:    0 8px 24px rgba(15,76,58,0.32);
}

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

/* ── "Reach Out" ghost button on task cards ── */
.btn-reach-ghost {
    background:    var(--teal-bg);
    color:         var(--btn-primary);
    border:        1px solid var(--teal-border);
    font-size:     0.8rem;
    padding:       6px 12px;
    border-radius: var(--radius-sm);
    font-weight:   600;
    cursor:        pointer;
    transition:    background 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space:   nowrap;
}

.btn-reach-ghost:hover:not(:disabled) {
    background:  rgba(15,76,58,0.14);
    border-color: var(--btn-primary);
    transform:   translateY(-1px);
    box-shadow:  0 4px 12px var(--teal-glow);
}

/* ── Modal width override ── */
.reachout-modal-content {
    max-width: 580px;
}

/* ── Teal modal icon background ── */
.reachout-modal-icon {
    background: var(--teal-bg) !important;
    border: 1px solid var(--teal-border) !important;
}

/* ── Subtitle below modal title ── */
.reachout-subtitle {
    font-size:  0.78rem;
    color:      var(--text-muted);
    margin-top: 2px;
}

/* ── Info callout ── */
.reachout-callout {
    display:       flex;
    align-items:   flex-start;
    gap:           10px;
    padding:       10px 14px;
    background:    var(--teal-bg);
    border:        1px solid var(--teal-border);
    border-radius: 8px;
    font-size:     0.83rem;
    color:         var(--btn-primary);
    line-height:   1.5;
    margin-bottom: 20px;
}

.reachout-callout-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Task preview strip overrides for reach-out modal ── */
#reachout-task-strip {
    margin-bottom: 14px;
}

/* ── Success state ── */
.reachout-success {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    text-align:      center;
    padding:         32px 20px 20px;
    gap:             12px;
}

.reachout-success.hidden {
    display: none;
}

.reachout-success-icon {
    font-size:     3.5rem;
    animation:     reachout-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes reachout-pop {
    from { transform: scale(0.4); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.reachout-success h4 {
    font-size:   1.3rem;
    font-weight: 700;
    color:       var(--text-heading);
}

.reachout-success p {
    font-size:   0.92rem;
    color:       var(--text-body);
    max-width:   380px;
    line-height: 1.6;
}

/* ── Card footer: two-button row layout ── */
.card-footer-actions {
    display:     flex;
    gap:         8px;
    align-items: center;
    flex-wrap:   wrap;
}

/* ── Inquiry count badge on task cards ── */
.inquiry-count-badge {
    display:       inline-flex;
    align-items:   center;
    gap:           4px;
    padding:       2px 8px;
    font-size:     0.72rem;
    font-weight:   700;
    color:         var(--btn-primary);
    background:    var(--teal-bg);
    border:        1px solid var(--teal-border);
    border-radius: 20px;
    white-space:   nowrap;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .reachout-modal-content {
        max-width: 100%;
    }
    .card-footer-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-reach-ghost {
        text-align: center;
        justify-content: center;
    }
}


/* ═══════════════════════════════════════════════════════════════
   TASK LIFECYCLE & STATUS WORKFLOW
═══════════════════════════════════════════════════════════════ */

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}


/* ── Visual Status Progress Stepper Component ── */
.task-stepper-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px;
    margin: 14px 0;
    box-shadow: var(--shadow-card);
}

.stepper-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.stepper-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 4px 0;
}

.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.stepper-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-canvas);
    border: 2px solid var(--border-default);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.stepper-item.is-complete .stepper-circle {
    background: rgba(15,76,58,0.12);
    border-color: var(--btn-primary);
    color: var(--btn-primary);
}

.stepper-item.is-active .stepper-circle {
    background: rgba(180,83,9,0.1);
    border-color: #b45309;
    color: #92400e;
    box-shadow: 0 0 14px rgba(180,83,9,0.22);
    animation: activeStepPulse 2s infinite;
}

.stepper-item.is-submitted-active .stepper-circle {
    background: var(--badge-tutoring-bg);
    border-color: var(--badge-tutoring-text);
    color: var(--badge-tutoring-text);
    box-shadow: 0 0 14px rgba(74,46,128,0.25);
}

.stepper-item.is-completed-active .stepper-circle {
    background: rgba(15,76,58,0.12);
    border-color: var(--btn-primary);
    color: var(--btn-primary);
    box-shadow: 0 0 14px rgba(15,76,58,0.22);
}

@keyframes activeStepPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.stepper-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
}

.stepper-item.is-complete .stepper-label,
.stepper-item.is-active .stepper-label {
    color: var(--text-heading);
}

/* Connector bar between steps */
.stepper-track {
    position: absolute;
    top: 20px;
    left: 12%;
    right: 12%;
    height: 3px;
    background: var(--border-subtle);
    z-index: 1;
}

.stepper-track-fill {
    height: 100%;
    background: linear-gradient(90deg, #0f4c3a, #b45309, #4a2e80, #1b6348);
    transition: width 0.4s ease;
    border-radius: 2px;
}

/* Stepper Action Bar */
.stepper-actions {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stepper-note {
    font-size: 0.8rem;
    color: var(--text-body);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Custom Action Buttons for Workflow Transitions */
.btn-submit-work {
    background: var(--badge-tutoring-text);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(74,46,128,0.28);
    transition: all 0.2s ease;
}

.btn-submit-work:hover:not(:disabled) {
    background: #3b2568;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(74,46,128,0.36);
}

.btn-approve-complete {
    background: var(--btn-primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: all 0.2s ease;
}

.btn-approve-complete:hover:not(:disabled) {
    background: var(--btn-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15,76,58,0.32);
}

.cancelled-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(185,28,28,0.08);
    border: 1px solid rgba(185,28,28,0.2);
    border-radius: 8px;
    color: #b91c1c;
    font-size: 0.85rem;
    font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════════
   STUDENT RATING & REVIEW SYSTEM
═══════════════════════════════════════════════════════════════ */

/* Modal styling override */
.review-modal-content {
    max-width: 540px;
}

.review-modal-icon {
    background: rgba(180,83,9,0.1) !important;
    border: 1px solid rgba(180,83,9,0.22) !important;
    color: #b45309;
}

.review-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Star Rating Group & Interactive Widget */
.star-rating-group {
    background: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    padding: 16px;
    border-radius: 12px;
    align-items: center;
    text-align: center;
}

.star-rating-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 0;
}

.star-btn {
    background: transparent;
    border: none;
    font-size: 2.3rem;
    color: var(--border-default);
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease, transform 0.15s ease;
    user-select: none;
    outline: none;
}

.star-btn.active,
.star-btn.hovered {
    color: #b45309;
    text-shadow: 0 0 10px rgba(180,83,9,0.35);
}

.star-btn:hover {
    transform: scale(1.22);
}

.rating-label-display {
    font-size: 0.88rem;
    font-weight: 700;
    color: #92400e;
    display: block;
    margin-top: 4px;
}

/* Student Rating Badge on Bid Cards */
.student-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #92400e;
    background: rgba(180,83,9,0.09);
    border: 1px solid rgba(180,83,9,0.22);
    border-radius: 12px;
    white-space: nowrap;
}

.student-rating-badge .star-icon {
    color: #b45309;
}

/* Review Publish Button */
.btn-review {
    background: linear-gradient(135deg, #b45309, #92400e);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(180,83,9,0.28);
}

.btn-review:hover:not(:disabled) {
    background: linear-gradient(135deg, #92400e, #78350f);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(180,83,9,0.36);
}


/* ═══════════════════════════════════════════════════════════════
   IN-APP DIRECT CONTACT & COMMUNICATION
═══════════════════════════════════════════════════════════════ */

/* Contact Details Box Container */
.contact-details-box {
    background: linear-gradient(135deg, rgba(15,76,58,0.05), rgba(27,99,72,0.03));
    border: 1px solid rgba(15,76,58,0.2);
    border-radius: 14px;
    padding: 16px;
    margin: 14px 0;
    box-shadow: 0 4px 16px rgba(15,76,58,0.08);
    animation: slideUp var(--transition-base) ease;
}

.contact-details-box.hidden {
    display: none;
}

.contact-box-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15,76,58,0.15);
}

.contact-box-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
}

.contact-box-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--btn-primary);
    margin: 0 0 2px 0;
}

.contact-box-subtitle {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin: 0;
}

/* Contact Person Card */
.contact-person-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.contact-person-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--btn-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.contact-person-info {
    flex: 1;
    min-width: 0;
}

.contact-person-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-person-role {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-body);
    text-transform: capitalize;
    display: flex;
    align-items: center;
    gap: 4px;
}

.contact-phone-masked {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: monospace;
    letter-spacing: 1px;
    background: var(--bg-canvas);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    margin-top: 2px;
    display: inline-block;
}

/* Action Buttons Row */
.contact-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Call Button */
.btn-contact-call {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
    min-width: 120px;
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #fff;
    box-shadow: 0 4px 14px rgba(29,78,216,0.28);
}

.btn-contact-call:hover {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(29,78,216,0.36);
    color: #fff;
    text-decoration: none;
}

/* WhatsApp Button */
.btn-contact-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
    min-width: 120px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37,211,102,0.28);
}

.btn-contact-whatsapp:hover {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37,211,102,0.36);
    color: #fff;
    text-decoration: none;
}

/* Privacy Shield */
.contact-privacy-shield {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--btn-secondary);
    border: 1px solid rgba(15,76,58,0.18);
    border-radius: 10px;
    color: var(--text-body);
    font-size: 0.82rem;
    font-weight: 500;
}

.contact-privacy-shield .shield-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* Loading skeleton for contact box */
.contact-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.contact-loading .skeleton-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f4f0e8 25%, #ede8de 50%, #f4f0e8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    flex-shrink: 0;
}

.contact-loading .skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-loading .skeleton-line {
    height: 10px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f4f0e8 25%, #ede8de 50%, #f4f0e8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.contact-loading .skeleton-line.short {
    width: 60%;
}

@media (max-width: 480px) {
    .contact-actions {
        flex-direction: column;
    }
    .btn-contact-call,
    .btn-contact-whatsapp {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════
   USER CHIP (navbar avatar)
═══════════════════════════════════════════════════════════════ */
.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    cursor: default;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--btn-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-chip-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.user-chip-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1;
}

.user-chip-role {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1;
}


/* ═══════════════════════════════════════════════════════════════
   BID EXPLORER — Category-Grouped Accordion
════════════════════════════════════════════════════════════════ */

.bid-explorer-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

/* ─── Category accordion group ───────────────────────────────── */
.explorer-cat-group {
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.explorer-cat-group:hover {
    box-shadow: var(--shadow-card-hover);
}

.explorer-cat-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    border: none;
    border-bottom: 1.5px solid var(--border-subtle);
    cursor: pointer;
    text-align: left;
    transition: background 0.18s;
}

.explorer-cat-header:hover {
    background: var(--bg-card-hover);
}

.excat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.excat-emoji {
    font-size: 1.3rem;
    line-height: 1;
}

.excat-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.01em;
}

.excat-counts {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.excat-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    letter-spacing: 0.01em;
}

.excat-badge--tasks {
    background: rgba(15, 76, 58, 0.1);
    color: var(--btn-primary);
}

.excat-badge--bids {
    background: rgba(74, 46, 128, 0.1);
    color: var(--violet);
}

.excat-chevron {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}

.explorer-cat-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    max-height: 9999px;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 1;
}

.explorer-cat-body.is-collapsed {
    max-height: 0;
    opacity: 0;
}

/* ─── Task row inside a category ─────────────────────────────── */
.explorer-task-row {
    border-bottom: 1px solid var(--border-subtle);
}

.explorer-task-row:last-child {
    border-bottom: none;
}

.explorer-task-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.explorer-task-header:hover {
    background: var(--bg-card-hover);
}

.explorer-task-header.no-bids {
    cursor: default;
    opacity: 0.7;
}

.extask-left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.extask-chevron {
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: 3px;
    transition: transform 0.2s;
    min-width: 14px;
}

.extask-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.extask-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.extask-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.extask-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.extask-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.extask-bid-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.extask-bid-pill.has-bids {
    background: rgba(74, 46, 128, 0.1);
    color: var(--violet);
}

.extask-bid-pill.no-bids-pill {
    background: var(--bg-card-hover);
    color: var(--text-muted);
}

/* ─── Bids body (expandable) ─────────────────────────────────── */
.explorer-bids-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 9999px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    opacity: 1;
    background: rgba(251, 249, 245, 0.6);
    border-top: 1px solid var(--border-subtle);
}

.explorer-bids-body.is-collapsed {
    max-height: 0;
    opacity: 0;
    border-top: none;
}

/* ─── Individual bid item ─────────────────────────────────────── */
.explorer-bid-item {
    padding: 14px 20px 14px 32px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    transition: background 0.15s;
}

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

.explorer-bid-item:hover {
    background: rgba(15, 76, 58, 0.03);
}

.explorer-bid-item--best {
    background: linear-gradient(135deg, rgba(15,76,58,0.04), rgba(27,99,72,0.02));
    border-left: 3px solid var(--btn-primary);
}

.explorer-best-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--btn-primary);
    background: rgba(15, 76, 58, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.explorer-bid-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.explorer-bid-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.explorer-bid-rank {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.explorer-bid-details {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.explorer-bid-amount {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-budget);
}

.explorer-bid-proposal {
    font-size: 0.83rem;
    color: var(--text-body);
    line-height: 1.5;
    margin: 0;
    white-space: pre-line;
    word-break: break-word;
}

.explorer-bid-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.explorer-bid-actions {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
}

/* ─── Reach Out button ───────────────────────────────────────── */
.btn-explorer-reachout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--btn-primary);
    background: transparent;
    color: var(--btn-primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-family: inherit;
}

.btn-explorer-reachout:hover {
    background: var(--btn-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 76, 58, 0.3);
    transform: translateY(-1px);
}

.btn-explorer-reachout:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ─── No bids message ────────────────────────────────────────── */
.explorer-no-bids-msg {
    padding: 12px 20px 12px 44px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ─── Loading skeletons ──────────────────────────────────────── */
.explorer-loading {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.explorer-skeleton-group {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1.5px solid var(--border-subtle);
}

.explorer-skeleton-header {
    height: 54px;
    background: linear-gradient(90deg, var(--bg-card-hover) 25%, #ece8e0 50%, var(--bg-card-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
}

.explorer-skeleton-row {
    height: 44px;
    margin: 0;
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
    border-top: 1px solid var(--border-subtle);
}

.explorer-skeleton-row.short {
    height: 36px;
    opacity: 0.7;
}

/* ─── Explorer filter bar spacing ────────────────────────────── */
.explorer-filter-bar {
    margin-bottom: 4px;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .explorer-bid-row {
        flex-direction: column;
    }
    .explorer-bid-actions {
        width: 100%;
    }
    .btn-explorer-reachout {
        width: 100%;
        justify-content: center;
    }
    .extask-right {
        flex-direction: column;
        align-items: flex-end;
    }
    .explorer-task-header {
        flex-wrap: wrap;
    }
}
