/* ---- Sidebar navigation ---- */

.group-title {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    padding: 1rem 1.2rem .3rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 1.2rem;
    color: #cbd5e1;
    font-size: .92rem;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .05);
    color: #fff;
}

.nav-item.active {
    background: var(--primary-light);
    border-left-color: var(--primary);
    color: #fff;
}

.nav-item.disabled {
    opacity: .4;
    cursor: not-allowed;
}

.nav-item .badge-soon {
    margin-left: auto;
    font-size: .6rem;
}

/* ---- Buttons / icon buttons ---- */

.icon-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Large touch-target action button - used by the employee mobile portal for
   primary workflow actions (start journey, arrived, complete collection...).
   Consolidates what used to be two near-identical classes (.big-btn in
   employee/dashboard.php and .action-btn in employee/pickups/show.php). */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 1.1rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    width: 100%;
    border: none;
    color: var(--accent-contrast);
    background: var(--primary);
    margin-bottom: .75rem;
}

.action-btn:active {
    transform: scale(.98);
}

.action-btn.action-btn-success {
    background: var(--success);
    color: #04170a;
}

.action-btn.action-btn-danger {
    background: var(--danger);
    color: #2a0a0a;
}

/* Employee portal: today's pickup list item */
.task-card {
    border-left: 4px solid var(--primary);
}

/* ---- Global search trigger (topbar) ---- */

.search-trigger {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    padding: .45rem .75rem;
    font-size: .85rem;
    min-width: 220px;
    cursor: pointer;
}

.search-trigger:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.search-trigger span:nth-child(2) {
    flex: 1;
    text-align: left;
}

.search-kbd {
    font-size: .68rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: .05rem .35rem;
    color: var(--text-muted);
}

/* ---- Breadcrumb bar ---- */

.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.5rem;
    font-size: .82rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb-bar a {
    color: var(--text-muted);
}

.breadcrumb-bar a:hover {
    color: var(--primary);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

.breadcrumb-sep {
    font-size: .6rem;
    opacity: .5;
}

@media (max-width: 480px) {
    .breadcrumb-bar {
        padding: .5rem 1rem;
    }
}

/* ---- Global search overlay (Ctrl+K) ---- */

.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 1050;
    padding: 10vh 1rem 1rem;
}

.search-overlay.open {
    display: block;
}

.search-panel {
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.search-panel-input {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

.search-panel-input input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
}

.search-panel-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: .5rem;
}

.search-group-title {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    padding: .6rem .6rem .3rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.search-result-item i {
    width: 20px;
    text-align: center;
    color: var(--primary);
}

.search-result-item:hover,
.search-result-item.active {
    background: var(--surface-hover);
}

/* ---- Cards ---- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.stat-card {
    padding: 1.1rem;
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: .8rem;
}

.stat-card .stat-trend {
    font-size: .75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.stat-card .stat-trend.up {
    color: var(--success);
}

.stat-card .stat-trend.down {
    color: var(--danger);
}

/* ---- Status timeline (pickup lifecycle, etc.) ---- */

.status-timeline {
    display: flex;
    align-items: flex-start;
    overflow-x: auto;
    padding: .5rem 0;
}

.status-timeline .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 90px;
    position: relative;
    text-align: center;
}

.status-timeline .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 55%;
    width: 90%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.status-timeline .step.done:not(:last-child)::after {
    background: var(--success);
}

.status-timeline .dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-hover);
    border: 2px solid var(--border);
    color: var(--text-muted);
    font-size: .8rem;
    z-index: 1;
    flex-shrink: 0;
}

.status-timeline .step.done .dot {
    background: var(--success);
    border-color: var(--success);
    color: #04170a;
}

.status-timeline .step.current .dot {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--accent-contrast);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.status-timeline .label {
    font-size: .72rem;
    margin-top: .4rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.status-timeline .step.done .label,
.status-timeline .step.current .label {
    color: var(--text-primary);
    font-weight: 600;
}

/* ---- Activity timeline (chronological log) ---- */

.activity-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
}

.activity-timeline .activity-item {
    position: relative;
    padding-bottom: 1rem;
}

.activity-timeline .activity-item:last-child {
    padding-bottom: 0;
}

.activity-timeline .activity-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--surface);
}

.dash-section-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin-bottom: .75rem;
}

/* ---- Dropdowns / notifications ---- */

.dropdown-menu {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-primary);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.notif-item {
    padding: .6rem .9rem;
    border-bottom: 1px solid var(--border);
    font-size: .85rem;
}

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

/* ---- Empty / loading states ---- */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    opacity: .4;
    margin-bottom: .75rem;
    display: block;
}

.empty-state .empty-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: .25rem;
}

.skeleton {
    background: linear-gradient(90deg, var(--surface-hover) 25%, var(--border) 37%, var(--surface-hover) 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}
