/* ============================================================
   Marcbantu Africa — App-specific styles
   Loaded after main.css on authenticated pages.
   ============================================================ */

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(230, 180, 34, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(230, 180, 34, 0.5);
}

/* Table scroll container */
.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 1rem;
    display: block;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f4ec 25%, #e2e8dd 50%, #f0f4ec 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Tab navigation (in-page) */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border-soft);
    padding-bottom: 0.2rem;
}

.tab {
    padding: 0.7rem 1.3rem;
    border: none;
    background: none;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s;
}

.tab.active {
    color: var(--green-deep);
    border-bottom-color: var(--gold);
}

.tab:hover {
    color: var(--green-deep);
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--red);
    color: #fff;
    font-size: 0.65rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    color: var(--green-deep);
    transition: all 0.2s;
}

.icon-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* User avatar */
.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--green-deep);
    color: var(--gold-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.user-avatar:hover {
    transform: scale(1.05);
}

/* User area in topbar */
.user-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Task check */
.task-check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--border-soft);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.task-check:hover {
    border-color: var(--green-mid);
}

.task-check.done {
    background: var(--green-mid);
    border-color: var(--green-mid);
    color: #fff;
}

/* Chip / badge */
.chip {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.chip-green {
    background: var(--green-soft);
    color: var(--green-ok);
}

.chip-gold {
    background: #fef3d0;
    color: #b8860b;
}

.chip-red {
    background: #fde8e8;
    color: var(--red);
}

.chip-blue {
    background: #e3f2fd;
    color: #1565c0;
}

/* Progress bar */
.progress-bar {
    height: 8px;
    background: #eef1ea;
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green-mid), var(--gold));
    border-radius: 20px;
    transition: width 0.4s ease;
}

/* Grid helpers */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Quick action cards */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-action {
    background: #fff;
    border-radius: 16px;
    padding: 1.2rem;
    border: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--green-deep);
    transition: all 0.2s;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.quick-action:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
}

.quick-action i {
    font-size: 1.8rem;
    color: var(--gold);
}

.quick-action span {
    font-size: 0.88rem;
    font-weight: 600;
}

/* Notice banner */
.notice {
    background: linear-gradient(135deg, #fff8e1, #fef3d0);
    border-left: 5px solid var(--gold);
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.notice i {
    color: var(--gold);
    font-size: 1.3rem;
    margin-top: 2px;
}

.notice strong {
    color: var(--green-deep);
    display: block;
    margin-bottom: 0.2rem;
}

.notice p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Offline banner override */
#offline-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--red);
    color: #fff;
    padding: 8px 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    z-index: 8000;
    display: none;
}

/* Print-friendly */
@media print {

    .sidebar,
    .navbar,
    .topbar,
    .quick-actions,
    .btn-primary,
    .btn-outline,
    .btn-icon {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    body {
        background: #fff !important;
    }

    .panel {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}