* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

p {
    margin: 0;
}

.auth-body,
.error-body {
    min-height: 100vh;
}

.public-stock-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(122, 193, 67, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fbf6 0%, #f4f7fb 100%);
}

.auth-body {
    min-height: 100vh;
    background: #292929;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.public-stock-shell {
    width: min(1440px, calc(100% - 48px));
    margin: 0 auto;
    padding: 36px 0 44px;
}

.public-stock-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.public-stock-copy h1 {
    margin-top: 14px;
    font-size: clamp(1.8rem, 2vw, 2.6rem);
}

.public-stock-copy p {
    margin-top: 12px;
    color: rgba(39, 39, 39, 0.68);
    max-width: 720px;
    line-height: 1.7;
}

.public-stock-card {
    overflow: hidden;
}

.auth-panel {
    width: min(520px, 100%);
}

.auth-card,
.error-card {
    background: #fff;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
}

.auth-card,
.error-card {
    border-radius: 32px;
    padding: 34px;
}

.auth-card-title {
    margin-top: 14px;
}

.auth-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 76px;
    margin-bottom: 10px;
}

.auth-logo {
    display: block;
    width: 100%;
    max-width: 140px;
    height: auto;
    object-fit: contain;
}

.auth-card-header {
    text-align: center;
}

.auth-card-header .tag {
    margin-inline: auto;
}

.auth-card-header p {
    margin-top: 10px;
    color: rgba(39, 39, 39, 0.65);
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.auth-form label,
.stack-form label {
    display: grid;
    gap: 10px;
}

.auth-form span,
.stack-form span {
    font-size: 0.94rem;
    color: rgba(39, 39, 39, 0.68);
}

input {
    width: 100%;
    border: 1px solid rgba(39, 39, 39, 0.08);
    background: #fff;
    padding: 15px 16px;
    border-radius: 16px;
    outline: none;
    transition: 0.2s ease;
}

input:focus {
    border-color: rgba(122, 193, 67, 0.66);
    box-shadow: 0 0 0 4px rgba(122, 193, 67, 0.13);
}

.primary-btn,
.secondary-btn,
.ghost-btn {
    border: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--color-primary);
    color: #fff;
    padding: 14px 20px;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(122, 193, 67, 0.28);
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 16px;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(39, 39, 39, 0.08);
}

.ghost-btn {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(39, 39, 39, 0.08);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-1px);
}

.tag,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.tag {
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(122, 193, 67, 0.15);
    color: var(--color-primary-dark);
    font-weight: 700;
}

.eyebrow {
    color: rgba(39, 39, 39, 0.52);
    font-weight: 700;
}

.inline-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
}

.inline-alert.success {
    background: rgba(122, 193, 67, 0.14);
    color: var(--color-primary-dark);
}

.inline-alert.danger {
    background: rgba(185, 62, 62, 0.12);
    color: #8a1f1f;
}

.app-toast {
    border-radius: 16px !important;
    box-shadow: var(--shadow-card) !important;
    font-family: 'Inter', sans-serif !important;
}

.swal2-title {
    font-size: 1rem !important;
}

.demo-access {
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--color-surface-soft);
    color: rgba(39, 39, 39, 0.72);
}

.error-card {
    width: min(520px, calc(100% - 32px));
    margin: 80px auto;
    text-align: center;
}

.error-card h1 {
    margin: 14px 0;
}

.error-card p {
    margin-bottom: 24px;
    color: rgba(39, 39, 39, 0.68);
}

.processing-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(16, 24, 32, 0.42);
    backdrop-filter: blur(6px);
    z-index: 9999;
}

.processing-overlay[hidden] {
    display: none;
}

.processing-card {
    width: min(460px, 100%);
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.processing-spinner {
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    border-radius: 999px;
    border: 4px solid rgba(122, 193, 67, 0.18);
    border-top-color: var(--color-primary);
    animation: processing-spin 0.85s linear infinite;
}

.processing-card h3 {
    font-size: 1.05rem;
}

.processing-card p {
    margin-top: 10px;
    color: rgba(39, 39, 39, 0.66);
    line-height: 1.7;
}

.is-submitting {
    pointer-events: none;
    opacity: 0.72;
}

@keyframes processing-spin {
    to {
        transform: rotate(360deg);
    }
}

.datetime-primary,
.datetime-secondary {
    display: block;
}

.datetime-secondary {
    margin-top: 4px;
    color: rgba(39, 39, 39, 0.56);
    font-size: 0.76rem;
    line-height: 1.4;
}
