:root {
    --portal-ink: #101828;
    --portal-muted: #667085;
    --portal-line: #e4e7ec;
    --portal-soft: #f6f8fb;
    --portal-card: rgba(255, 255, 255, 0.94);
    --portal-blue: #1264a3;
    --portal-blue-dark: #0b4f82;
    --portal-green: #16805b;
    --portal-orange: #d97706;
    --portal-red: #d92d20;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--portal-ink);
    background:
        linear-gradient(135deg, rgba(232, 245, 251, 0.92) 0%, rgba(244, 250, 253, 0.94) 34%, rgba(255, 247, 237, 0.72) 72%, rgba(253, 234, 234, 0.56) 100%),
        url("/static/images/background.db244aa6eb59.png") center / cover fixed no-repeat;
}

.floating-elements::before,
.floating-elements::after,
.notification-icon::after {
    display: none;
}

.login-container,
.otp-container,
.modern-auth-card,
.main-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 252, 255, 0.92)) !important;
    border: 1px solid rgba(196, 228, 244, 0.9) !important;
    box-shadow: 0 22px 58px rgba(8, 47, 68, 0.1) !important;
    backdrop-filter: blur(18px);
}

.sidebar-gradient {
    background: linear-gradient(180deg, rgba(26, 35, 71, 0.98) 0%, rgba(20, 106, 150, 0.97) 52%, rgba(30, 155, 215, 0.94) 100%) !important;
    border-right: 1px solid rgba(91, 189, 228, 0.35) !important;
    box-shadow: 14px 0 46px rgba(8, 47, 68, 0.22) !important;
    backdrop-filter: blur(18px);
}

.header-gradient {
    background: linear-gradient(135deg, rgba(26, 35, 71, 0.97) 0%, rgba(20, 106, 150, 0.95) 42%, rgba(30, 155, 215, 0.92) 74%, rgba(249, 115, 22, 0.88) 100%) !important;
    border-bottom: 1px solid rgba(196, 228, 244, 0.28) !important;
    box-shadow: 0 12px 34px rgba(8, 47, 68, 0.16) !important;
    backdrop-filter: blur(18px);
}

.header-gradient::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, #1E9BD7 0%, #5BBDE4 34%, #F97316 72%, #E03333 100%);
    box-shadow: 0 0 18px rgba(249, 115, 22, 0.45);
}

.footer-gradient {
    background: rgba(255, 255, 255, 0.9) !important;
    border-top: 1px solid rgba(196, 228, 244, 0.72) !important;
    box-shadow: 0 -10px 28px rgba(8, 47, 68, 0.08) !important;
    backdrop-filter: blur(18px);
}

.main-card {
    border-radius: 18px !important;
    padding: clamp(1rem, 2vw, 2rem) !important;
}

.logo-container {
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(196, 228, 244, 0.72);
    box-shadow: 0 16px 36px rgba(5, 8, 22, 0.16) !important;
}

.logo-container::before {
    display: none;
}

.portal-title {
    color: #fff !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
}

.nav-item {
    border-radius: 12px !important;
    color: rgba(255, 255, 255, 0.86) !important;
    box-shadow: none !important;
}

.nav-item:hover {
    transform: none !important;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    box-shadow: inset 3px 0 0 rgba(251, 146, 60, 0.9), 0 10px 28px rgba(5, 8, 22, 0.18) !important;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(232, 245, 251, 0.9)) !important;
    color: #1A2347 !important;
    box-shadow: inset 4px 0 0 #F97316, 0 14px 32px rgba(5, 8, 22, 0.18) !important;
}

.nav-item.active svg {
    color: #1A2347 !important;
}

.signout-link {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(224, 51, 51, 0.2)) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    box-shadow: 0 10px 24px rgba(5, 8, 22, 0.16) !important;
}

.signout-link:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #F97316, #E03333) !important;
    border-color: rgba(255, 255, 255, 0.44) !important;
    transform: translateY(-1px);
}

.profile-avatar {
    background: #1264a3 !important;
    box-shadow: none !important;
}

input,
select,
textarea {
    border-color: #d0d5dd !important;
    border-radius: 10px !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--portal-blue) !important;
    box-shadow: 0 0 0 4px rgba(18, 100, 163, 0.12) !important;
    outline: none !important;
}

button,
.btn,
a[class*="bg-"] {
    border-radius: 10px;
}

button[type="submit"],
.modern-primary,
.bg-orange-500,
.bg-blue-600 {
    background: var(--portal-blue) !important;
    color: #fff !important;
}

button[type="submit"]:hover,
.modern-primary:hover,
.bg-orange-500:hover,
.hover\:bg-orange-600:hover,
.hover\:bg-blue-700:hover {
    background: var(--portal-blue-dark) !important;
}

.rounded-xl,
.rounded-2xl,
.rounded-lg {
    border-radius: 14px;
}

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

thead th {
    background: #f8fafc;
    color: #475467;
    font-size: 0.75rem;
    letter-spacing: 0;
}

tbody tr:hover {
    background: #f8fafc;
}

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

.dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(228, 231, 236, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 45px rgba(16, 24, 40, 0.07);
}

.dashboard-hero h1 {
    margin: 0.25rem 0;
    color: var(--portal-ink);
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    font-weight: 800;
    letter-spacing: 0;
}

.dashboard-hero p,
.dashboard-kicker,
.dashboard-hero-meta span {
    color: var(--portal-muted);
}

.dashboard-kicker {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-hero-meta {
    min-width: 12rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--portal-line);
    border-radius: 14px;
    background: #f8fafc;
}

.dashboard-hero-meta strong {
    display: block;
    margin-top: 0.2rem;
    color: var(--portal-ink);
    font-size: 0.85rem;
}

.dashboard-metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-metric-card,
.dashboard-panel,
.dashboard-subpanel {
    border: 1px solid rgba(228, 231, 236, 0.95);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 34px rgba(16, 24, 40, 0.07);
}

.dashboard-metric-card {
    min-height: 7rem;
    padding: 0.9rem;
    border-radius: 14px;
    border-left-width: 4px;
}

.dashboard-metric-card p {
    overflow-wrap: anywhere;
}

.dashboard-accent-blue { border-left-color: var(--portal-blue); }
.dashboard-accent-red { border-left-color: var(--portal-red); }
.dashboard-accent-green { border-left-color: var(--portal-green); }
.dashboard-accent-teal { border-left-color: #0f766e; }
.dashboard-accent-indigo { border-left-color: #4f46e5; }
.dashboard-accent-orange { border-left-color: var(--portal-orange); }

.dashboard-panel {
    border-radius: 18px;
    padding: 1.25rem;
}

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

.dashboard-panel-heading h2,
.dashboard-panel h2 {
    color: var(--portal-ink);
    letter-spacing: 0;
}

.dashboard-panel-heading p {
    margin-top: 0.2rem;
    color: var(--portal-muted);
    font-size: 0.88rem;
}

.dashboard-subpanel {
    border-radius: 16px;
    padding: 1rem;
}

.dashboard-subpanel-blue {
    background: linear-gradient(180deg, #f7fbff, #ffffff);
}

.dashboard-subpanel-red {
    background: linear-gradient(180deg, #fff8f7, #ffffff);
}

.dashboard-scroll-list {
    max-height: 22.5rem;
    overflow-y: auto;
    padding-right: 0.4rem;
    scrollbar-width: thin;
    scrollbar-color: #98a2b3 #eef2f6;
}

.dashboard-transaction-list {
    max-height: 27rem;
}

.dashboard-scroll-list::-webkit-scrollbar {
    width: 0.45rem;
}

.dashboard-scroll-list::-webkit-scrollbar-track {
    background: #eef2f6;
    border-radius: 999px;
}

.dashboard-scroll-list::-webkit-scrollbar-thumb {
    background: #98a2b3;
    border-radius: 999px;
}

.dashboard-list-row {
    min-height: 4.05rem;
    border-radius: 12px;
    padding: 0.65rem 0.75rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(228, 231, 236, 0.72);
}

.dashboard-total-row {
    background: rgba(248, 250, 252, 0.84);
    border-radius: 12px;
    padding: 0.75rem;
}

@media (max-width: 1180px) {
    .dashboard-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .dashboard-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-hero-meta {
        min-width: 0;
    }

    .dashboard-metric-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-scroll-list,
    .dashboard-transaction-list {
        max-height: 22.5rem;
    }
}

.modern-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modern-auth-card {
    border-radius: 20px !important;
    max-width: 30rem;
    width: 100%;
}

.modern-auth-brand {
    color: var(--portal-ink);
}

.modern-auth-copy {
    color: var(--portal-muted);
}

.registration-section-card {
    padding: 1rem;
    border: 1px solid rgba(228, 231, 236, 0.95);
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff, #ffffff);
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.06);
}

.registration-section-heading {
    margin-bottom: 1rem;
}

.registration-section-heading h3 {
    color: var(--portal-ink);
    font-size: 1rem;
    font-weight: 800;
}

.registration-section-heading p {
    color: var(--portal-muted);
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

@media (max-width: 767px) {
    .main-card {
        border-radius: 14px !important;
        padding: 1rem !important;
    }

    .footer-bar {
        display: none !important;
    }
}
