:root{
    --auth-bg:#050605;
    --auth-panel:#101211;
    --auth-panel-2:#171A18;
    --auth-ink:#F3F4F0;
    --auth-muted:#B6BBB4;
    --auth-ring:#303530;
    --auth-accent:#6fa37d;
    --auth-accent-2:#8fcf9d;
    --auth-accent-hover:#7fb88d;
    --auth-accent-light:#8fcf9d;
    --auth-accent-soft-bg:rgba(111, 163, 125, 0.14);
    --auth-accent-border:rgba(111, 163, 125, 0.35);
    --auth-accent-focus:rgba(111, 163, 125, 0.2);
    --auth-input-bg:#171A18;
    --auth-input-border:#303530;
    --auth-input-text:#F3F4F0;
    --auth-button-text:#ffffff;
    --auth-danger:#7f1d1d;
    --auth-danger-soft-bg:rgba(127, 29, 29, 0.16);
    --auth-danger-border:rgba(153, 27, 27, 0.35);
}

/* Base Page Styling */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Open Sans",Roboto,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
    color: var(--auth-ink);
    background: var(--auth-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: var(--auth-panel);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    border: 1px solid var(--auth-ring);
    padding: 52px 48px;
    max-width: 480px;
    width: 100%;
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.subdomain-notice {
    background: var(--auth-accent-soft-bg);
    border: 1px solid var(--auth-accent-border);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 28px;
    text-align: center;
}

.logo img {
    height: 44px;
    width: auto;
    margin-bottom: 20px;
    opacity: 0.95;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(111, 163, 125, 0.24));
}

.logo img:hover {
    opacity: 1.0;
    transform: translateY(-1px);
    filter: drop-shadow(0 4px 12px rgba(111, 163, 125, 0.32));
}

.logo h1 {
    color: var(--auth-accent);
    font-size: 32px;
    font-weight: 800;
    font-family: "Rhode",Roboto,"Open Sans",Arial,sans-serif;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.logo p {
    color: var(--auth-muted);
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

.footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--auth-ring);
}

.footer a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}

.footer a:hover {
    color: var(--auth-accent-hover);
    opacity: 1;
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--auth-accent-hover);
    transition: width 0.2s ease;
}

.footer a:hover::after {
    width: 100%;
}

/* Comprehensive Clerk Override - Designer Level */
/* Hide ALL Clerk branding elements */
[data-clerk-branding],
[data-testid="clerk-powered-by-clerk"],
.clerk-powered-by-clerk,
.clerk-signIn-root [data-clerk-branding],
.clerk-signUp-root [data-clerk-branding],
.clerk-signIn-root .clerk-powered-by-clerk,
.clerk-signUp-root .clerk-powered-by-clerk,
div[data-clerk-element="root-footer"],
div[data-clerk-element="root-branding"],
.clerk-internal-afad,
.clerk-internal-backlink,
.clerk-branding,
footer[role="contentinfo"],
[class*="clerk-branding"],
[class*="clerk-powered"],
[id*="clerk-branding"],
[id*="clerk-powered"],
div[style*="color: rgb(160, 174, 192)"],
div[style*="font-size: 12px"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Force dark theme for all Clerk elements */
.clerk-signIn-root,
.clerk-signUp-root {
    --clerk-color-primary: #6fa37d !important;
    --clerk-color-background: #101211 !important;
    --clerk-color-surface: #171A18 !important;
    --clerk-color-text: #F3F4F0 !important;
    --clerk-color-text-secondary: #B6BBB4 !important;
    --clerk-color-input: #171A18 !important;
    --clerk-color-input-text: #F3F4F0 !important;
    --clerk-color-input-border: #303530 !important;
    --clerk-color-button-primary: #6fa37d !important;
    --clerk-color-button-primary-text: #ffffff !important;
    --clerk-color-button-secondary: #171A18 !important;
    --clerk-color-button-secondary-text: #F3F4F0 !important;
    --clerk-fonts-body: "Open Sans",Roboto,system-ui,-apple-system,"Segoe UI",Arial,sans-serif !important;
}

/* Override all white backgrounds */
.clerk-signIn-root *,
.clerk-signUp-root * {
    background-color: transparent !important;
    background: transparent !important;
}

/* Enhanced Input fields with better contrast and depth */
.clerk-signIn-root input,
.clerk-signUp-root input,
.clerk-signIn-root input[type="text"],
.clerk-signIn-root input[type="email"],
.clerk-signIn-root input[type="password"],
.clerk-signUp-root input[type="text"],
.clerk-signUp-root input[type="email"],
.clerk-signUp-root input[type="password"],
input[class*="clerk-"],
[class*="clerk-"] input {
    background-color: var(--auth-input-bg) !important;
    background: var(--auth-input-bg) !important;
    border: 2px solid var(--auth-input-border) !important;
    color: var(--auth-input-text) !important;
    border-radius: 12px !important;
    padding: 16px 18px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: all 0.2s ease !important;
}

/* Input focus states */
.clerk-signIn-root input:focus,
.clerk-signUp-root input:focus,
.clerk-signIn-root input[type="text"]:focus,
.clerk-signIn-root input[type="email"]:focus,
.clerk-signIn-root input[type="password"]:focus,
.clerk-signUp-root input[type="text"]:focus,
.clerk-signUp-root input[type="email"]:focus,
.clerk-signUp-root input[type="password"]:focus,
input[class*="clerk-"]:focus,
[class*="clerk-"] input:focus {
    outline: none !important;
    border-color: var(--auth-accent) !important;
    box-shadow: 0 0 0 3px var(--auth-accent-focus), inset 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Enhanced Input labels with better hierarchy */
.clerk-signIn-root label,
.clerk-signUp-root label,
label[class*="clerk-"],
[class*="clerk-"] label {
    color: #F3F4F0 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
    text-transform: none !important;
    letter-spacing: 0.025em !important;
}

/* Enhanced Buttons with depth and hover effects */
.clerk-signIn-root button,
.clerk-signUp-root button,
button[class*="clerk-"],
[class*="clerk-"] button {
    background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-hover) 100%) !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 16px 24px !important;
    box-shadow: 0 4px 14px rgba(111, 163, 125, 0.28) !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    letter-spacing: 0.025em !important;
}

.clerk-signIn-root button:hover,
.clerk-signUp-root button:hover,
button[class*="clerk-"]:hover,
[class*="clerk-"] button:hover {
    background: linear-gradient(135deg, var(--auth-accent-hover) 0%, var(--auth-accent) 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(111, 163, 125, 0.34) !important;
}

.clerk-signIn-root button:active,
.clerk-signUp-root button:active,
button[class*="clerk-"]:active,
[class*="clerk-"] button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(111, 163, 125, 0.24) !important;
}

/* Enhanced Links with better styling */
.clerk-signIn-root a,
.clerk-signUp-root a,
a[class*="clerk-"],
[class*="clerk-"] a {
    color: var(--auth-accent) !important;
    font-weight: 600 !important;
    transition: color 0.2s ease !important;
}

/* Enhanced Text elements */
.clerk-signIn-root span,
.clerk-signUp-root span,
.clerk-signIn-root div,
.clerk-signUp-root div,
span[class*="clerk-"],
div[class*="clerk-"] {
    color: var(--auth-input-text) !important;
}

/* Enhanced Error messages */
.clerk-signIn-root [role="alert"],
.clerk-signUp-root [role="alert"] {
    color: #fee2e2 !important;
    background-color: var(--auth-danger-soft-bg) !important;
    border: 1px solid var(--auth-danger-border) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-weight: 500 !important;
}

/* Enhanced Success messages */
.clerk-signIn-root .clerk-form-success-message,
.clerk-signUp-root .clerk-form-success-message {
    color: var(--auth-accent-light) !important;
    background-color: var(--auth-accent-soft-bg) !important;
    border: 1px solid var(--auth-accent-border) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-weight: 500 !important;
}

/* Enhanced Loading states */
.clerk-signIn-root [data-loading="true"],
.clerk-signUp-root [data-loading="true"] {
    opacity: 0.7 !important;
    transition: opacity 0.2s ease !important;
}

/* Form spacing improvements */
.clerk-signIn-root > div,
.clerk-signUp-root > div {
    margin-bottom: 20px !important;
}

/* Better social buttons styling */
.clerk-signIn-root button[type="button"],
.clerk-signUp-root button[type="button"] {
    background-color: var(--auth-panel-2) !important;
    border: 2px solid var(--auth-ring) !important;
    color: var(--auth-input-text) !important;
    box-shadow: none !important;
}

.clerk-signIn-root button[type="button"]:hover,
.clerk-signUp-root button[type="button"]:hover {
    background-color: var(--auth-ring) !important;
    border-color: var(--auth-accent) !important;
}

/* Error page styles */
.error-title {
    color: #e74c3c;
    margin-bottom: 16px;
}

.error-message {
    color: var(--auth-muted);
    margin-bottom: 24px;
}

.error-button {
    display: inline-block;
    background: var(--auth-accent);
    color: white;
    padding: 12px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
}

.error-link {
    display: inline-block;
    background: var(--auth-accent);
    color: white;
    padding: 12px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
}
