@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Instrument+Serif:ital@0;1&display=swap");

:root {
    --bg-primary: #f7f4ef;
    --bg-surface: #ffffff;
    --bg-surface-2: #f0ece4;
    --border-color: #e0dbd0;
    --text-primary: #1a1a2e;
    --text-muted: #6b7280;
    --action-primary: #a86832;
    --action-hover: #935a2a;
    --text-on-action: #ffffff;
    --color-error: #dc2626;
    --focus-ring: rgba(168, 104, 50, 0.2);
    --message-error-bg: rgba(220, 38, 38, 0.08);
    --message-error-border: rgba(220, 38, 38, 0.35);
    --message-error-text: #991b1b;
    --message-status-bg: rgba(168, 104, 50, 0.10);
    --message-status-border: rgba(168, 104, 50, 0.40);
    --message-status-text: #7a4c22;
}

[data-theme="dark"] {
    --bg-primary: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-2: #1a2236;
    --border-color: #263354;
    --text-primary: #e8edf5;
    --text-muted: #8896b3;
    --action-primary: #c77d3a;
    --action-hover: #d4923f;
    --text-on-action: #0b0f19;
    --color-error: #f87171;
    --focus-ring: rgba(199, 125, 58, 0.25);
    --message-error-bg: rgba(248, 113, 113, 0.10);
    --message-error-border: rgba(248, 113, 113, 0.35);
    --message-error-text: #fecaca;
    --message-status-bg: rgba(199, 125, 58, 0.12);
    --message-status-border: rgba(199, 125, 58, 0.45);
    --message-status-text: #fde7c4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--bg-primary);
    background-image: radial-gradient(ellipse at 50% 0%, var(--bg-surface-2) 0%, transparent 60%);
    color: var(--text-primary);
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-shell::before,
.auth-shell::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(120px);
    background: rgba(199, 125, 58, 0.10);
    z-index: 0;
}

.auth-shell::before {
    top: -120px;
    left: -120px;
}

.auth-shell::after {
    bottom: -120px;
    right: -120px;
    background: rgba(168, 104, 50, 0.07);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .auth-card {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.logo-mark {
    width: 72px;
    height: 72px;
    display: block;
    filter: drop-shadow(0 0 18px rgba(199, 125, 58, 0.25));
}

.logo-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 30px;
    font-weight: 400;
    letter-spacing: -0.5px;
}

.logo-title span {
    color: var(--action-primary);
    font-style: italic;
}

.message {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

.message.show {
    display: block;
}

.error-message {
    background: var(--message-error-bg);
    border: 1px solid var(--message-error-border);
    color: var(--message-error-text);
}

.status-message {
    background: var(--message-status-bg);
    border: 1px solid var(--message-status-border);
    color: var(--message-status-text);
}

.auth-tabs {
    display: flex;
    gap: 6px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .auth-tab.active {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 8px;
}

.field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-row a {
    font-size: 11px;
    color: var(--action-primary);
    text-decoration: none;
}

.field-row a:hover {
    text-decoration: underline;
}

input {
    width: 100%;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--text-primary);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
    outline: none;
    border-color: var(--action-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.primary-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 12px;
    background: var(--action-primary);
    color: var(--text-on-action);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.primary-btn:hover {
    background: var(--action-hover);
}

.primary-btn:active {
    transform: scale(0.98);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 22px 0 16px;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 12px;
}

.google-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.15s ease;
}

.google-btn:hover {
    border-color: var(--action-primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .google-btn:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.google-icon {
    width: 20px;
    height: 20px;
}

.back-link {
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    z-index: 1;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--text-primary);
}

.auth-footer {
    margin-top: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.auth-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--action-primary);
}

.auth-footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 6px;
}

.hidden {
    display: none;
}

.google-btn:disabled,
.primary-btn:disabled,
.auth-tab:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#register-legal {
    margin-top: 12px;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

#register-legal a {
    color: var(--action-primary);
    text-decoration: none;
}
