:root {
    --color-primary: #f1b317;
    --color-primary-dark: #d99f12;
    --color-secondary: #1a3838;
    --color-bg: #f6f7fb;
    --color-card: #ffffff;
    --color-text: #0f172a;
    --scrollbar-thumb: rgba(241, 179, 23, 0.86);
    --scrollbar-thumb-hover: rgba(217, 159, 18, 0.95);
    --scrollbar-track: #e2e8f0;
}

.dark {
    --scrollbar-thumb: rgba(241, 179, 23, 0.72);
    --scrollbar-thumb-hover: rgba(241, 179, 23, 0.88);
    --scrollbar-track: rgba(148, 163, 184, 0.32);
}

.admin-shell {
    --admin-primary: #1a3838;
    --admin-accent: #f1b317;
    --admin-surface: #ffffff;
    --admin-surface-muted: #f8fafc;
    --admin-border: #e2e8f0;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

* {
    box-sizing: border-box;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 999px;
    border: 2px solid var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
}

body {
    font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-text);
    overflow-x: hidden;
}

input,
select,
textarea {
    min-height: 48px;
    border-radius: 999px;
    padding: 0 20px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 16px;
    line-height: 1.35;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select,
input[type="date"],
select.form-input,
.form-input[type="date"] {
    padding-right: 56px;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%2364748b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

select[multiple],
select[size] {
    background-image: none;
    padding-right: 20px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 1;
    cursor: pointer;
    margin-right: 2px;
}

textarea {
    border-radius: 20px;
    padding: 14px 20px;
    min-height: 120px;
}

.form-input {
    padding-left: 20px;
    padding-right: 20px;
}

select.form-input,
.form-input[type="date"] {
    padding-right: 56px;
}

.password-field {
    position: relative;
}

.password-field .form-input,
.password-field input {
    padding-right: 56px;
}

.password-toggle {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 10px;
    margin: auto 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.password-toggle:hover {
    color: #1a3838;
    background: #f8fafc;
}

.password-toggle:focus-visible {
    outline: 2px solid rgba(241, 179, 23, 0.55);
    outline-offset: 1px;
}

.notification-dropdown {
    min-width: 250px;
    width: 22rem;
    max-width: 90vw;
    word-wrap: break-word;
}

.sidebar-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-scroll::-webkit-scrollbar {
    display: none;
}

.admin-skeleton {
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
}

.admin-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: admin-shimmer 1.2s infinite;
}

@keyframes admin-shimmer {
    100% {
        transform: translateX(100%);
    }
}

.dashboard-card {
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(241, 179, 23, 0.25);
}

button,
.btn {
    border-radius: 999px;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-secondary);
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 10px 24px rgba(241, 179, 23, 0.32);
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: var(--color-secondary);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-secondary:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.btn-ghost {
    background: transparent;
    color: var(--color-secondary);
}

.card {
    background: var(--color-card);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(241, 179, 23, 0.15);
    color: var(--color-secondary);
}

.progress-track {
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    height: 12px;
}

.progress-fill {
    background: var(--color-primary);
    height: 100%;
}

[x-cloak] {
    display: none !important;
}

.landing-page .landing-orb {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(20px);
    opacity: 0.25;
}

.landing-page .landing-orb-1 {
    width: 340px;
    height: 340px;
    top: -120px;
    right: -60px;
    background: #f1b317;
}

.landing-page .landing-orb-2 {
    width: 280px;
    height: 280px;
    bottom: -120px;
    left: -80px;
    background: #3f8181;
}

.auth-shell {
    background: radial-gradient(circle at top left, rgba(241, 179, 23, 0.18), transparent 38%), radial-gradient(circle at bottom right, rgba(26, 56, 56, 0.18), transparent 38%), #f6f7fb;
}

.auth-card {
    width: 100%;
    max-width: 460px;
}

.onboarding-progress {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.onboarding-progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #f1b317, #d99f12);
}

.fade-up {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.dashboard-grid > * {
    opacity: 0;
    transform: translateY(14px);
    animation: dashboard-fade-up 0.45s ease forwards;
}

.dashboard-grid > *:nth-child(1) { animation-delay: 0.04s; }
.dashboard-grid > *:nth-child(2) { animation-delay: 0.12s; }
.dashboard-grid > *:nth-child(3) { animation-delay: 0.2s; }
.dashboard-grid > *:nth-child(4) { animation-delay: 0.28s; }
.dashboard-grid > *:nth-child(5) { animation-delay: 0.36s; }

@keyframes dashboard-fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reward-action-arrow {
    transform-origin: center;
    filter: drop-shadow(0 4px 10px rgba(217, 159, 18, 0.35));
    animation: reward-arrow-bounce 1.9s ease-in-out infinite, reward-arrow-wiggle 3.2s ease-in-out infinite;
}

.reward-action-arrow--premium {
    filter: drop-shadow(0 6px 14px rgba(217, 159, 18, 0.42));
}

@keyframes reward-arrow-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

@keyframes reward-arrow-wiggle {
    0%, 100% { rotate: 0deg; }
    30% { rotate: -1.8deg; }
    70% { rotate: 1.8deg; }
}

@media (hover: hover) and (pointer: fine) {
    .reward-action-highlight:hover .reward-action-arrow,
    .reward-action-highlight:focus-within .reward-action-arrow {
        animation-duration: 1.25s, 2.2s;
        filter: drop-shadow(0 8px 16px rgba(217, 159, 18, 0.48));
    }
}

@media (prefers-reduced-motion: reduce) {
    .reward-action-arrow {
        animation: none !important;
        transform: none !important;
    }
}

.table-scroll-area {
    scrollbar-width: thin;
}

.swipe-scroll-hint {
    animation: swipe-hint-slide 1.8s ease-in-out infinite;
}

.table-scroll-hint::before,
.table-scroll-hint::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 22px;
    z-index: 10;
    pointer-events: none;
}

.table-scroll-hint::before {
    left: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(246, 247, 251, 0));
}

.table-scroll-hint::after {
    right: 0;
    background: linear-gradient(270deg, rgba(255, 255, 255, 0.96), rgba(246, 247, 251, 0));
}

@media (max-width: 768px) {
    *::-webkit-scrollbar {
        width: 7px;
        height: 7px;
    }

    .dashboard-card {
        width: 100%;
        margin-bottom: 1rem;
    }

    .form-input {
        width: 100%;
    }

    .notification-dropdown {
        max-width: 95vw;
        width: min(95vw, 22rem);
        position: fixed !important;
        left: 50% !important;
        right: auto !important;
        top: 72px;
        transform: translateX(-50%);
        margin-top: 0 !important;
    }

    .btn-mobile-full {
        width: 100%;
    }

    .landing-page header nav a {
        padding-top: 2px;
        padding-bottom: 2px;
    }

    .auth-card {
        max-width: 100%;
        border-radius: 18px;
    }

    .table-scroll-hint::before,
    .table-scroll-hint::after {
        width: 18px;
    }
}

@keyframes swipe-hint-slide {
    0%, 100% {
        transform: translateX(0);
        opacity: 0.75;
    }
    50% {
        transform: translateX(5px);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .swipe-scroll-hint {
        animation: none !important;
    }
}
