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

:root {
    --amanah-ink: #0f172a;
    --amanah-muted: #64748b;
    --amanah-line: rgba(148, 163, 184, 0.26);
    --amanah-panel: rgba(255, 255, 255, 0.86);
    --amanah-primary: #093ea7;
    --amanah-primary-dark: #062b75;
    --amanah-accent: #f8c404;
    --amanah-accent-dark: #d4a803;
    --amanah-cyan: #2563eb;
    --amanah-violet: #093ea7;
    --amanah-shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
    --amanah-soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

* {
    letter-spacing: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--amanah-ink);
    background:
        radial-gradient(circle at top left, rgba(9, 62, 167, 0.13), transparent 32rem),
        radial-gradient(circle at top right, rgba(248, 196, 4, 0.16), transparent 34rem),
        linear-gradient(135deg, #f8fafc 0%, #eef4ff 46%, #fff9dc 100%) !important;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
}

main {
    min-height: 100vh;
}

header {
    background: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(18px);
}

aside#sidebar,
.md\:hidden.bg-slate-900 {
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98)),
        radial-gradient(circle at top, rgba(9, 62, 167, 0.30), transparent 22rem),
        radial-gradient(circle at bottom right, rgba(248, 196, 4, 0.18), transparent 18rem) !important;
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 18px 0 46px rgba(15, 23, 42, 0.18);
}

aside#sidebar nav a {
    position: relative;
    overflow: hidden;
}

aside#sidebar nav a::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(90deg, rgba(9, 62, 167, 0.24), rgba(248, 196, 4, 0.13));
    transition: opacity 180ms ease;
}

aside#sidebar nav a:hover::before {
    opacity: 1;
}

aside#sidebar nav a > span {
    position: relative;
    z-index: 1;
}

.bg-white {
    background-color: var(--amanah-panel) !important;
}

.rounded-2xl {
    border-radius: 18px !important;
}

.shadow-sm,
.shadow-md,
.shadow-lg,
.shadow-xl {
    box-shadow: var(--amanah-soft-shadow) !important;
}

.border-slate-200,
.border-slate-100 {
    border-color: var(--amanah-line) !important;
}

.bg-white.border,
.bg-white.rounded-2xl,
article.bg-white,
div.bg-white.rounded-2xl {
    backdrop-filter: blur(16px);
}

table {
    border-collapse: separate !important;
    border-spacing: 0;
}

thead tr {
    background: rgba(248, 250, 252, 0.82) !important;
}

tbody tr {
    transition: background-color 160ms ease, transform 160ms ease;
}

tbody tr:hover {
    background: rgba(238, 244, 255, 0.72) !important;
}

input,
select,
textarea {
    border-color: rgba(148, 163, 184, 0.32) !important;
    background-color: rgba(248, 250, 252, 0.78) !important;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(9, 62, 167, 0.76) !important;
    box-shadow: 0 0 0 4px rgba(9, 62, 167, 0.13) !important;
}

button,
a[class*="bg-emerald"],
a[class*="bg-orange"],
a[class*="bg-blue"],
a[class*="bg-slate-900"],
button[class*="bg-emerald"],
button[class*="bg-orange"],
button[class*="bg-blue"],
button[class*="bg-slate-900"] {
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

button:hover,
a[class*="bg-emerald"]:hover,
a[class*="bg-orange"]:hover,
a[class*="bg-blue"]:hover,
a[class*="bg-slate-900"]:hover,
button[class*="bg-emerald"]:hover,
button[class*="bg-orange"]:hover,
button[class*="bg-blue"]:hover,
button[class*="bg-slate-900"]:hover {
    transform: translateY(-1px);
}

.bg-emerald-600,
.hover\:bg-emerald-700:hover,
.bg-orange-600,
.hover\:bg-orange-700:hover,
.bg-blue-600,
.bg-blue-700,
.bg-blue-800,
.hover\:bg-blue-700:hover,
.hover\:bg-blue-800:hover,
.hover\:bg-blue-900:hover {
    background: linear-gradient(135deg, var(--amanah-primary), var(--amanah-primary-dark)) !important;
}

.bg-emerald-50,
.bg-emerald-50\/40,
.bg-emerald-50\/60,
.bg-emerald-500\/20,
.bg-blue-50,
.bg-blue-100,
.bg-orange-50,
.bg-orange-100 {
    background-color: rgba(9, 62, 167, 0.08) !important;
}

.bg-emerald-100 {
    background-color: rgba(248, 196, 4, 0.22) !important;
}

.bg-emerald-200,
.bg-emerald-300,
.bg-emerald-400,
.bg-emerald-500,
.bg-yellow-300,
.bg-yellow-400,
.bg-yellow-500,
.bg-orange-300,
.bg-orange-400,
.bg-orange-500 {
    background-color: var(--amanah-accent) !important;
}

.text-emerald-100,
.text-emerald-200,
.text-emerald-300,
.text-emerald-400,
.text-yellow-300,
.text-yellow-400,
.text-orange-300,
.text-orange-400 {
    color: #ffe46b !important;
}

.text-emerald-500,
.text-emerald-600,
.text-emerald-700,
.text-emerald-800,
.text-blue-500,
.text-blue-600,
.text-blue-700,
.text-blue-800,
.text-blue-900,
.text-orange-600,
.text-orange-700,
.text-orange-800 {
    color: var(--amanah-primary) !important;
}

.border-emerald-100,
.border-emerald-200,
.border-emerald-300,
.border-emerald-500,
.border-emerald-500\/30,
.border-blue-100,
.border-blue-200,
.border-blue-300,
.border-blue-500,
.border-orange-100,
.border-orange-200,
.border-orange-300,
.border-orange-500 {
    border-color: rgba(9, 62, 167, 0.22) !important;
}

.ring-emerald-500\/20,
.ring-orange-500\/25,
.ring-yellow-300\/30 {
    --tw-ring-color: rgba(248, 196, 4, 0.38) !important;
}

.focus\:ring-emerald-500:focus,
.focus\:ring-orange-500:focus,
.focus\:ring-orange-400:focus,
.focus\:ring-blue-800:focus,
.focus\:border-emerald-500:focus,
.focus\:border-orange-500:focus,
.focus\:border-blue-800:focus {
    --tw-ring-color: rgba(9, 62, 167, 0.24) !important;
    border-color: var(--amanah-primary) !important;
}

.bg-slate-900 {
    background: linear-gradient(135deg, #0f172a, #111827) !important;
}

.bg-gradient-to-r {
    box-shadow: var(--amanah-shadow) !important;
}

.text-slate-400 {
    color: #7c8da5 !important;
}

.text-slate-500 {
    color: var(--amanah-muted) !important;
}

footer {
    background: rgba(255, 255, 255, 0.76) !important;
    backdrop-filter: blur(16px);
}

@media (max-width: 768px) {
    body::before {
        background-size: 28px 28px;
    }

    .p-6 {
        padding: 1rem !important;
    }
}

@keyframes amanah-pop {
    0% { transform: scale(0.92); opacity: 0; }
    70% { transform: scale(1.04); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes amanah-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes amanah-shimmer {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}

@keyframes amanah-coin-spin {
    0% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.08); }
    100% { transform: rotateY(360deg) scale(1); }
}

.genz-shell {
    background:
        radial-gradient(circle at 12% 20%, rgba(9, 62, 167, 0.18), transparent 18rem),
        radial-gradient(circle at 85% 18%, rgba(248, 196, 4, 0.18), transparent 20rem),
        linear-gradient(135deg, rgba(255,255,255,0.86), rgba(238,244,255,0.78));
}

.genz-hero {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    background:
        radial-gradient(circle at 14% 12%, rgba(248, 196, 4, 0.28), transparent 13rem),
        radial-gradient(circle at 78% 15%, rgba(37, 99, 235, 0.24), transparent 17rem),
        radial-gradient(circle at 72% 95%, rgba(9, 62, 167, 0.28), transparent 17rem),
        linear-gradient(135deg, #020617 0%, #0b1f4d 48%, #093ea7 100%) !important;
    border: 1px solid rgba(255,255,255,0.14);
}

.genz-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.08) 48%, transparent 66%);
    animation: amanah-shimmer 5s ease-in-out infinite;
}

.genz-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.82) 56%, rgba(2, 6, 23, 0.90)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.88));
}

.habit-neon-panel {
    background: rgba(2, 6, 23, 0.78);
    border: 1px solid rgba(255,255,255,0.20);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 20px 60px rgba(0,0,0,0.22);
    backdrop-filter: blur(14px);
}

.habit-hero-title {
    color: #ffffff;
    text-shadow: 0 3px 18px rgba(0,0,0,0.55);
}

.habit-hero-copy {
    color: #dbeafe;
    text-shadow: 0 2px 12px rgba(0,0,0,0.40);
}

.habit-progress-track {
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 6px rgba(0,0,0,0.30);
}

.habit-progress-fill {
    background: linear-gradient(90deg, #f8c404, #2563eb, #093ea7);
    box-shadow: 0 0 22px rgba(9, 62, 167, 0.42);
}

[data-habit-week-progress-fill],
[data-habit-lifetime-progress-fill],
[data-habit-progress-fill] {
    background: linear-gradient(90deg, #f8c404, #2563eb, #093ea7) !important;
}

[style*="#10b981"],
[style*="#059669"],
[style*="#047857"] {
    color: var(--amanah-primary) !important;
}

.motion-pop {
    animation: amanah-pop 380ms ease both;
}

.floaty {
    animation: amanah-float 3.8s ease-in-out infinite;
}

.coin-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 30%, #fff8bf, #f8c404 58%, #b88d02);
    color: #093ea7;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(248, 196, 4, 0.32), inset 0 2px 4px rgba(255,255,255,0.45);
    animation: amanah-coin-spin 4.5s ease-in-out infinite;
}

.habit-card {
    transform: translateY(0) scale(1);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.habit-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12) !important;
}

.tab-glow {
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255,255,255,0.18);
}

.soft-pill {
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.68);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.aldp-tab-shell {
    position: sticky;
    top: 0;
    z-index: 20;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.aldp-tabs {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0.35rem;
    scrollbar-width: none;
}

.aldp-tabs::-webkit-scrollbar {
    display: none;
}

.aldp-tab {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
    border-radius: 1rem 1rem 0.65rem 0.65rem;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 900;
    white-space: nowrap;
    transition: transform 180ms ease, color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.aldp-tab:hover {
    color: #0f172a;
    background: rgba(241, 245, 249, 0.82);
}

.aldp-tab.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #111827);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.16);
}

.aldp-tab-panel {
    animation: amanah-pop 260ms ease both;
}

.aldp-anchor-section {
    scroll-margin-top: 5.75rem;
}

[data-page-tab-panel].hidden,
[data-tab-panel].hidden {
    display: none !important;
}
