html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

:root {
    --bg-main: #f9fafb;
    --card-bg: #ffffff;
    --primary: #0f172a; /* Dark sleek primary */
    --primary-hover: #8ca2de;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --danger: #ef4444;
    --radius: 12px;
}

body {
    background-color: var(--bg-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
}

/* Generic Card Container */
.platform-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

platform-card.banner {
    background: #fffde7;
    border-color: #ffe082;
    color: #b08900;
    display: flex;
    align-items: center;
    justify-content: space-between;

}

/* Typography */
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Buttons */
.btn-platform {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn.btn-primary-dark {
    background: var(--primary);
    color: white;
}

    .btn.btn-primary-dark:hover {
        background: var(--primary-hover);
    }

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 6px;
    color: var(--text-muted);
}

    .btn-icon:hover {
        background: #f3f4f6;
        color: var(--text-main);
    }

    .btn-icon.danger:hover {
        color: var(--danger);
        border-color: var(--danger);
    }

:root {
    --bg-surface: #f8fafc;
    --card-bg: #ffffff;
    --primary-dark: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --radius-lg: 12px;
    --radius-md: 8px;
}

.platform-container {
    padding: 2rem;
    max-width: 1300px;
    margin: 0 auto;
}

.display-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    gap: 0.75rem;
}

.display-box-value {
    flex: 1;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--text-main);
}

.btn-icon-only {
    background: transparent;
    border: none;
    padding: 2px;
    margin: 0;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.1s ease;
}

    .btn-icon-only i {
        font-size: 1.1rem;
        line-height: 1;
    }

.text-security {
    letter-spacing: 0.15em;
    font-family: 'ui-monospace', monospace;
    opacity: 0.8;
}

/* Inline Create Card Styling */
.create-inline-card {
    border: 1px solid #dbeafe !important; /* Soft blue border */
    background-color: #f8faff !important; /* Very light blue tint */
    animation: slideDown 0.3s ease-out;
}

.bg-light-gray {
    background-color: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
}

.border-light-gray {
    border-color: #e5e7eb !important;
    color: #374151;
}

/* Animation for the card appearing */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Ensure the input looks like a sleek display box but is editable */
input.display-box:focus {
    outline: 2px solid #3b82f6;
    background-color: #fff !important;
}

.modal-backdrop-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4); /* Slate-900 with transparency */
    backdrop-filter: blur(8px); /* The blur effect */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Stay on top of everything */
    animation: fadeIn 0.2s ease-out;
}

/* The actual modal card */
.modal-card-container {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

/* Optional: Soft blue line at the top to match your "Create" card */
.modal-header-accent {
    height: 4px;
    background: #dbeafe;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.btn-danger {
    background-color: #dc3545;
    border: none;
    color: white;
    border-radius: 8px;
    transition: background-color 0.2s;
}

    .btn-danger:hover {
        background-color: #bb2d3b;
    }

.text-danger {
    color: #dc3545 !important;
}

/* Modal specific tweaks for Revoke */
.bi-exclamation-triangle {
    filter: drop-shadow(0 4px 6px rgba(220, 53, 69, 0.2));
}

.btn-delete {
    color: #ef4444; /* Modern red */
    opacity: 0.6;
    transition: opacity 0.2s;
}

    .btn-delete:hover {
        opacity: 1;
        color: #b91c1c;
        animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
    }

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }

    30%, 50%, 70% {
        transform: translate3d(-2px, 0, 0);
    }

    40%, 60% {
        transform: translate3d(2px, 0, 0);
    }
}

:root[data-theme='light'] {
    --bg-main: #f9fafb;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --input-bg: #ffffff;
    --auth-bg: #f3f4f6; /* Light background for login */
}

:root[data-theme='dark'] {
    --bg-main: #121417;
    --card-bg: #1a1d21;
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --border-color: #2d3136;
    --input-bg: #22262a;
    --auth-bg: #121417; /* Dark background for login */
}

/* Update your existing components to use these variables */
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.auth-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

.platform-card.card-scroll {
    display: flex;
    flex-direction: column;
    height: 70vh; /* use height (stronger than max-height) */
    overflow: hidden; /* keep scroll inside card */
}

    .platform-card.card-scroll .card-header {
        flex: 0 0 auto;
    }

    .platform-card.card-scroll .card-body {
        flex: 1 1 auto;
        min-height: 0; /* ✅ critical for flex scrolling */
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 14px;
        scrollbar-gutter: stable;
    }

.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.40); /* slate dark */
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: flex-end;
    animation: overlayFadeIn .18s ease-out;
}

.drawer-panel {
    width: min(60vw, 980px);
    height: 100vh;
    background: #fff;
    border-left: 1px solid var(--border-light);
    box-shadow: -10px 0 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
    animation: drawerSlideIn .22s ease-out;
}

.drawer-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.drawer-title {
    min-width: 0;
}

.drawer-body {
    padding: 16px;
    overflow-y: auto;
    min-height: 0;
}

/* Mobile: take full width */
@media (max-width: 768px) {
    .drawer-panel {
        width: 100vw;
    }
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes drawerSlideIn {
    from {
        transform: translateX(24px);
        opacity: .6;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* Signup/Auth centered layout */
.auth-page {
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.auth-card-body {
    padding: 22px;
}

.auth-title {
    font-weight: 800;
    margin-bottom: 6px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Inputs consistent */
.auth-input {
    border-radius: 10px;
}

/* Bottom actions */
.auth-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}

.auth-btn {
    height: 40px;
    border-radius: 10px;
    font-weight: 600;
}

/* Progress */
.signup-progress {
    height: 6px;
    background: rgba(0,0,0,0.08);
    border-radius: 999px;
    overflow: hidden;
}

.signup-progress-bar {
    height: 100%;
    background: #2563eb;
    border-radius: 999px;
    transition: width .25s ease;
}

.otp-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    cursor: text;
}

.otp-real-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: text;
    z-index: 2;
    font-size: 16px; /* Prevent keyboard zoom on mobile */
}

.otp-visual-wrap {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    pointer-events: none; /* Let clicks pass through to real input */
}

.otp-box {
    width: 45px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    transition: all 0.2s ease;
}

    /* Highlight the box where the cursor currently is */
    .otp-box.active {
        border-color: #3b82f6;
        background: #eff6ff;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

/* Dark theme support */
:root[data-theme='dark'] .otp-box {
    background: #1a1d21;
    border-color: #2d3136;
    color: #ffffff;
}

    :root[data-theme='dark'] .otp-box.active {
        border-color: #3b82f6;
        background: #1e3a5f;
    }


/* Password eye button */
.password-eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    text-decoration: none;
    color: var(--text-muted);
}

/* Password requirements card */
.password-req {
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 12px;
    padding: 12px;
    background: rgba(0,0,0,0.02);
    font-size: 0.9rem;
}

.req-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

/* Status Modal Styles */
.status-modal-content {
    padding: 1rem;
}

.status-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.75rem;
}

.status-icon.warning {
    background: #fef3c7;
    color: #d97706;
}

.status-icon.success {
    background: #d1fae5;
    color: #059669;
}

.status-icon.error {
    background: #fee2e2;
    color: #dc2626;
}

.status-modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.status-modal-message {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.status-modal-actions {
    display: flex;
    gap: 0.75rem;
}

.status-modal-actions .btn {
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Access Denied Styles */
.access-denied-content {
    text-align: center;
    padding: 3rem 2rem;
}

.access-denied-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.access-denied-message {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.access-denied-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* === Generic Banner Styles (Extends your existing design system) === */

/* Base banner class */
.platform-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border-radius: 8px;
    padding: 0.8rem 2rem;
    margin: 0 0 1.5rem 0;
    font-size: 0.98rem;
    box-sizing: border-box;
    min-height: 48px;
    width: 100%;
    position: relative;
    z-index: 10;
    border-width: 1px;
    border-style: solid;
    background: var(--banner-bg, #f8fafc);
    color: var(--banner-fg, #1e293b);
    border-color: var(--banner-border, #e2e8f0);
    /* For top or bottom positioning, see .platform-banner-top/.platform-banner-bottom */
}

/* Top or bottom positioning (for fixed banners) */
.platform-banner-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    border-radius: 0 0 8px 8px;
}

.platform-banner-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 8px 8px 0 0;
}

/* Banner color themes (set CSS variables for each type) */
.platform-banner-warning {
    --banner-bg: #fffde7;
    --banner-fg: #b08900;
    --banner-border: #ffe082;
}

.platform-banner-success {
    --banner-bg: #e6f9ed;
    --banner-fg: #15803d;
    --banner-border: #a7f3d0;
}

.platform-banner-error {
    --banner-bg: #fef2f2;
    --banner-fg: #b91c1c;
    --banner-border: #fecaca;
}

.platform-banner-info {
    --banner-bg: #e0f2fe;
    --banner-fg: #0369a1;
    --banner-border: #bae6fd;
}

/* Banner content and button alignment */
.platform-banner-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.platform-banner .platform-banner-action {
    margin-left: 2rem;
    align-self: flex-start;
}

/* Responsive: shrink padding on mobile */
@media (max-width: 640px) {
    .platform-banner {
        padding: 0.7rem 0.7rem;
        font-size: 0.95rem;
    }
    .platform-banner .platform-banner-action {
        margin-left: 1rem;
    }
}

/* Example icon style (optional) */
.platform-banner .banner-icon {
    font-size: 1.1rem;
    margin-right: 0.7rem;
    vertical-align: middle;
}

.platform-banner.platform-banner-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.platform-banner.platform-banner-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.platform-banner.platform-banner-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.platform-banner.platform-banner-info {
    background: #cce5ff;
    color: #004085;
    border-color: #b8daff;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.empty-state-message {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
