:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #eef4ff;
    --sidebar: #122033;
    --sidebar-soft: rgba(255, 255, 255, 0.08);
    --text: #172334;
    --muted: #64748b;
    --border: rgba(15, 23, 42, 0.08);
    --brand: #1d4ed8;
    --brand-soft: #dbeafe;
    --success: #15803d;
    --success-soft: #dcfce7;
    --warning: #d97706;
    --warning-soft: #ffedd5;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.10), transparent 28%),
        radial-gradient(circle at top right, rgba(21, 128, 61, 0.10), transparent 22%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

h1, h2, h3, h4, h5, .brand-mark, .page-title {
    font-family: "Space Grotesk", sans-serif;
}

a {
    text-decoration: none;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 290px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
        var(--sidebar);
    color: #fff;
    padding: 2rem 1.5rem;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(145deg, #60a5fa, #2563eb);
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    box-shadow: 0 16px 30px rgba(59, 130, 246, 0.35);
}

.brand-eyebrow,
.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #8cb4ff;
}

.sidebar__brand h1 {
    font-size: 1.15rem;
    margin: 0.2rem 0 0;
}

.sidebar__nav {
    display: grid;
    gap: 0.55rem;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.78);
    transition: all 0.2s ease;
}

.sidebar__link:hover,
.sidebar__link.active {
    color: #fff;
    background: var(--sidebar-soft);
    transform: translateX(3px);
}

.sidebar__footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.user-chip__avatar,
.profile-summary__avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.15);
    display: grid;
    place-items: center;
    font-weight: 700;
}

.user-chip small {
    display: block;
    color: rgba(255, 255, 255, 0.65);
}

.page-content {
    flex: 1;
    padding: 1.5rem;
}

.mobile-bar {
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.mobile-bar__title {
    font-weight: 700;
}

.app-offcanvas {
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.page-title {
    font-size: clamp(1.8rem, 2vw, 2.6rem);
}

.page-body {
    display: grid;
    gap: 1.5rem;
}

.panel-card,
.stat-card,
.auth-panel,
.mini-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.panel-card {
    padding: 1.5rem;
}

.panel-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.panel-card__title {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card {
    padding: 1.35rem;
    position: relative;
    overflow: hidden;
}

.stat-card span {
    color: var(--muted);
    font-size: 0.92rem;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    margin: 0.55rem 0 0.35rem;
}

.stat-card small {
    color: var(--muted);
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -30px -35px auto;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    opacity: 0.15;
}

.stat-card--blue::after { background: #2563eb; }
.stat-card--green::after { background: #16a34a; }
.stat-card--amber::after { background: #f59e0b; }
.stat-card--rose::after { background: #e11d48; }

.toolbar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.table {
    --bs-table-bg: transparent;
}

.table thead th {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom-width: 1px;
}

.table tbody tr {
    border-color: var(--border);
}

.progress--thick {
    height: 0.8rem;
    border-radius: 999px;
    background: #e5eefb;
}

.progress-bar {
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    border-radius: 999px;
}

.member-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.member-badge,
.role-pill,
.status-pill,
.priority-pill,
.pill-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    font-weight: 600;
}

.member-badge {
    padding: 0.38rem 0.7rem;
    background: #edf2ff;
    color: #1e3a8a;
    font-size: 0.8rem;
}

.role-pill,
.pill-label {
    background: var(--brand-soft);
    color: #1d4ed8;
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
}

.status-pill,
.priority-pill {
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
}

.status-pill--todo {
    background: #e2e8f0;
    color: #334155;
}

.status-pill--in_progress {
    background: var(--warning-soft);
    color: #b45309;
}

.status-pill--done {
    background: var(--success-soft);
    color: var(--success);
}

.priority-pill--low {
    background: #e0f2fe;
    color: #0369a1;
}

.priority-pill--medium {
    background: #fff7ed;
    color: #c2410c;
}

.priority-pill--high {
    background: var(--danger-soft);
    color: var(--danger);
}

.timeline-list,
.deadline-list,
.progress-list,
.stacked-tips {
    display: grid;
    gap: 1rem;
}

.timeline-list__item,
.deadline-list__item,
.stacked-tips__item {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.timeline-list__dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    margin-top: 0.35rem;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.12);
}

.deadline-list__item {
    justify-content: space-between;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: #f8fafc;
}

.progress-list__item {
    padding: 1rem;
    border-radius: 18px;
    background: #f8fafc;
}

.stacked-tips__item {
    padding: 1rem;
    border-radius: 18px;
    background: #f8fafc;
}

.stacked-tips__item i {
    color: var(--brand);
    font-size: 1rem;
    margin-top: 0.15rem;
}

.profile-summary {
    text-align: center;
}

.profile-summary__avatar {
    margin: 0 auto 1rem;
    width: 72px;
    height: 72px;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    text-align: left;
}

.summary-grid small {
    display: block;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.summary-grid strong {
    font-size: 0.98rem;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.auth-grid {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
}

.auth-grid--wide {
    grid-template-columns: 1fr 1fr;
}

.auth-panel {
    padding: 2.25rem;
}

.auth-panel--hero {
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.25), transparent 28%),
        linear-gradient(145deg, #122033, #1e293b);
    color: #fff;
}

.auth-panel--hero h1 {
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    line-height: 1.05;
    margin: 1rem 0 1.1rem;
}

.auth-panel--hero p {
    max-width: 42rem;
    color: rgba(255, 255, 255, 0.75);
}

.auth-panel--form {
    display: flex;
    align-items: center;
}

.auth-form-wrap {
    width: 100%;
}

.auth-form-wrap h2 {
    font-size: 2rem;
    margin-bottom: 0.35rem;
}

.auth-link a {
    font-weight: 700;
}

.auth-hero-cards,
.feature-stack {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.mini-card,
.feature-stack__item {
    padding: 1rem 1.1rem;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.09);
    border-radius: 18px;
}

.mini-card i,
.feature-stack__item i {
    font-size: 1.1rem;
}

.mini-card span,
.feature-stack__item span {
    display: block;
    color: rgba(255, 255, 255, 0.76);
}

.toast-message {
    border-radius: 18px;
    overflow: hidden;
}

.toast-header--success { background: #dcfce7; }
.toast-header--warning { background: #fef3c7; }
.toast-header--danger { background: #fee2e2; }
.toast-header--info,
.toast-header--secondary { background: #dbeafe; }

.modal-content {
    border: 0;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.accordion-item {
    border: 0;
    border-radius: 20px !important;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #f8fafc;
}

.accordion-button:not(.collapsed) {
    background: #eff6ff;
    color: var(--text);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
}

.overdue-row td {
    vertical-align: middle;
}

.chart-card canvas {
    max-height: 240px;
}

.page-link {
    border: 0;
    color: var(--text);
    border-radius: 12px !important;
    margin: 0 0.15rem;
}

.page-item.active .page-link {
    background: var(--brand);
}

@media (max-width: 1199px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .page-content {
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-grid,
    .auth-grid--wide {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .stats-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .panel-card,
    .auth-panel,
    .stat-card {
        padding: 1.15rem;
        border-radius: 20px;
    }

    .auth-shell {
        padding: 1rem;
    }

    .auth-panel--hero h1 {
        font-size: 2rem;
    }
}
