@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --panel-bg: #ffffff;
    --page-bg: #eef8f1;
    --ink: #14281d;
    --muted: #60756a;
    --line: #dbeee2;
    --primary: #16a34a;
    --primary-dark: #15803d;
    --accent: #059669;
    --gold: #84cc16;
    --sidebar: #0b2418;
    --shadow-sm: 0 12px 30px rgba(20, 83, 45, .08);
    --shadow-md: 0 22px 54px rgba(20, 83, 45, .14);
}

body {
    background:
        radial-gradient(circle at 12% 16%, rgba(22, 163, 74, .14), transparent 18%),
        radial-gradient(circle at 88% 10%, rgba(132, 204, 22, .13), transparent 16%),
        radial-gradient(circle at 82% 86%, rgba(5, 150, 105, .13), transparent 18%),
        var(--page-bg);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0;
    min-height: 100vh;
    position: relative;
}

body::before,
body::after {
    content: '';
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    pointer-events: none;
}

body::before {
    width: 360px;
    height: 360px;
    right: -130px;
    top: 140px;
    background: radial-gradient(circle, rgba(22, 163, 74, .12), transparent 65%);
}

body::after {
    width: 280px;
    height: 280px;
    left: 44%;
    bottom: -130px;
    background: radial-gradient(circle, rgba(132, 204, 22, .13), transparent 68%);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(22, 163, 74, .14), transparent 40%),
        linear-gradient(315deg, rgba(132, 204, 22, .13), transparent 32%),
        #edf8f0;
}

.login-card {
    width: min(420px, calc(100vw - 32px));
    border-radius: 14px;
    box-shadow: var(--shadow-md);
}

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

.sidebar {
    width: 250px;
    flex: 0 0 250px;
    background:
        radial-gradient(circle at 28% 12%, rgba(255, 255, 255, .13), transparent 22%),
        linear-gradient(180deg, rgba(22, 163, 74, .34), transparent 46%),
        linear-gradient(155deg, #0f2d1e, #07160f 72%),
        var(--sidebar);
    color: #fff;
    padding: 20px;
    box-shadow: 12px 0 34px rgba(18, 26, 43, .18);
}

.brand {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.28rem;
    font-weight: 800;
    margin-bottom: 22px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
    letter-spacing: 0;
}

.brand::before {
    content: '';
    display: inline-grid;
    place-items: center;
    width: 0;
    height: 0;
    border-radius: 12px;
}

.user-box {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.user-box strong::before {
    content: '👤';
    margin-right: 6px;
}

.user-box span {
    display: block;
    color: #cce8d4;
    font-size: .85rem;
    margin-top: 2px;
}

.sidebar .nav-link {
    color: #d7eadc;
    border-radius: 13px;
    padding: 11px 12px;
    font-weight: 600;
    transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.sidebar .nav-link::before {
    display: inline-block;
    width: 24px;
    margin-right: 6px;
    text-align: center;
}

.sidebar .nav-link[href*="dashboard"]::before {
    content: '🏆';
}

.sidebar .nav-link[href*="users"]::before,
.sidebar .nav-link[href*="user_"]::before {
    content: '👤';
}

.sidebar .nav-link[href*="tasks"]::before,
.sidebar .nav-link[href*="task_"]::before {
    content: '🎯';
}

.sidebar .nav-link[href*="logout"]::before {
    content: '↪';
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #059669);
    transform: translateX(5px);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.18),
        0 0 24px rgba(34, 197, 94, .42),
        0 14px 30px rgba(5, 150, 105, .25);
}

.sidebar-note {
    margin-top: 12px;
    padding: 12px 13px;
    color: #dcfce7;
    background: linear-gradient(135deg, rgba(34, 197, 94, .18), rgba(255, 255, 255, .07));
    border: 1px solid rgba(187, 247, 208, .22);
    border-radius: 14px;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.35;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 22px rgba(5, 150, 105, .12);
}

.sidebar-note::before {
    content: '🪙';
    margin-right: 6px;
}

.content {
    flex: 1;
    padding: 28px;
    overflow-x: hidden;
}

.content h1,
.content h2,
.content h3 {
    font-weight: 800;
    color: var(--ink);
}

.content h1::before {
    content: '🎮';
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-right: 10px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(132,204,22,.20), rgba(22,163,74,.15));
    box-shadow: 0 10px 24px rgba(20, 83, 45, .08);
    font-size: 1.25rem;
    vertical-align: middle;
}

.stat-card,
.panel-card,
.action-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,.97), rgba(255,255,255,.90)),
        var(--panel-bg);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
}

.stat-card {
    min-height: 128px;
    padding: 22px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(22, 163, 74, .24), rgba(5, 150, 105, .15) 50%, rgba(255,255,255,.98) 50%),
        #fff;
    transition: transform .18s ease, box-shadow .18s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card::before {
    content: '🎯';
    position: absolute;
    right: 18px;
    top: 18px;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff, #ecfdf3);
    box-shadow: 0 14px 30px rgba(20, 83, 45, .16);
    font-size: 1.9rem;
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -42px;
    bottom: -48px;
    width: 132px;
    height: 132px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .42);
}

.row.g-3 > div:nth-child(1) .stat-card::before {
    content: '🎯';
}

.row.g-3 > div:nth-child(2) .stat-card::before {
    content: '🧮';
}

.row.g-3 > div:nth-child(3) .stat-card::before {
    content: '🪙';
}

.row.g-3 > div:nth-child(4) .stat-card::before {
    content: '📤';
}

.row.g-3 > div:nth-child(5) .stat-card::before {
    content: '🏆';
}

.stat-label {
    max-width: calc(100% - 74px);
    color: #3f5f4b;
    font-size: .9rem;
    font-weight: 700;
}

.stat-value {
    color: var(--ink);
    max-width: calc(100% - 70px);
    font-size: 1.72rem;
    font-weight: 800;
    margin-top: 10px;
}

.table {
    vertical-align: middle;
    color: var(--ink);
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table thead th {
    background: transparent;
    color: #486753;
    border-bottom: 0;
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
    padding-bottom: 12px;
}

.table tbody td {
    background: #fff;
    border-top: 1px solid #e4f3e9;
    border-bottom: 1px solid #e4f3e9;
    box-shadow: 0 6px 16px rgba(20, 83, 45, .035);
}

.table tbody td:first-child {
    border-left: 1px solid #e4f3e9;
    border-radius: 14px 0 0 14px;
}

.table tbody td:last-child {
    border-right: 1px solid #e4f3e9;
    border-radius: 0 14px 14px 0;
}

.table-hover tbody tr {
    transition: background .16s ease, transform .16s ease;
}

.table-hover tbody tr:hover {
    background: transparent;
    transform: translateY(-2px);
}

.table-hover tbody tr:hover td {
    background: #f3fbf5;
    box-shadow: 0 12px 28px rgba(20, 83, 45, .07);
}

.action-card {
    display: block;
    min-height: 124px;
    padding: 22px;
    text-decoration: none;
    color: inherit;
    background:
        linear-gradient(135deg, rgba(132, 204, 22, .15), rgba(22, 163, 74, .10) 44%, rgba(255,255,255,.94) 44%),
        #fff;
    transition: transform .15s ease, box-shadow .15s ease;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.action-card strong::before {
    content: '🪙';
    margin-right: 6px;
}

.btn {
    border-radius: 999px;
    font-weight: 700;
    padding-inline: 16px;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: 0;
    box-shadow: 0 10px 22px rgba(22, 163, 74, .24);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #047857);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: rgba(22, 163, 74, .38);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-outline-danger {
    border-color: rgba(220, 38, 38, .35);
}

.form-control,
.form-select {
    border-color: #d8eadf;
    border-radius: 10px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(22, 163, 74, .14);
}

.badge {
    border-radius: 999px;
    padding: .45em .7em;
    font-weight: 700;
}

.card {
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.panel-card > .border-top.mt-3.pt-3.text-end {
    display: flex;
    justify-content: flex-end;
    border-top-color: #dceee3 !important;
}

.panel-card > .border-top.mt-3.pt-3.text-end > .d-inline-block,
.panel-card > .border-top.mt-3.pt-3.text-end > span:first-child + strong,
.panel-card > .border-top.mt-3.pt-3.text-end > span:first-child {
    position: relative;
}

.panel-card > .border-top.mt-3.pt-3.text-end > .d-inline-block {
    min-width: 230px;
    border: 1px solid rgba(132, 204, 22, .34) !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, rgba(240, 253, 244, .96), rgba(255,255,255,.94)) !important;
    box-shadow: 0 12px 26px rgba(22, 163, 74, .12);
}

.panel-card > .border-top.mt-3.pt-3.text-end:not(:has(.d-inline-block)) {
    gap: 8px;
    align-items: center;
}

.panel-card > .border-top.mt-3.pt-3.text-end:not(:has(.d-inline-block))::before {
    content: '🪙';
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(132, 204, 22, .18);
}

.panel-card > .border-top.mt-3.pt-3.text-end strong {
    color: #166534;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        box-shadow: none;
    }

    .content {
        padding: 18px;
    }

    .table-responsive {
        border-radius: 12px;
    }
}
