/* File: wwwroot/css/auth-modal.css */
:root {
    --auth-primary:  #1e3a8a;
    --auth-mid:      #1d4ed8;
    --auth-light:    #eff6ff;
    --auth-border:   #bfdbfe;
    --auth-text:     #374151;
    --auth-muted:    #6b7280;
    --auth-input-bg: #f8fafc;
    --auth-ease:     0.22s cubic-bezier(0.4,0,0.2,1);
    --auth-error:    #dc2626;
}

.auth-overlay {
    position: fixed; inset: 0; top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(10,18,36,0.72);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center; justify-content: center;
    z-index: 9998; padding: 16px;
    box-sizing: border-box;
}

.auth-shell {
    display: flex;
    width: 100%; max-width: 820px;
    height: auto; max-height: 90vh;
    background: #fff;
    border-radius: 22px; overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.06);
    animation: authSlideUp .28s cubic-bezier(0.34,1.46,0.64,1);
}

@keyframes authSlideUp {
    from { opacity:0; transform: translateY(24px) scale(.97) }
    to   { opacity:1; transform: none }
}

.auth-brand {
    width: 260px; flex-shrink: 0;
    background: linear-gradient(145deg, #1d4ed8 0%, #1e3a8a 55%, #0f172a 100%);
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.auth-brand-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 20% 20%, rgba(99,102,241,0.25) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, rgba(29,78,216,0.3) 0%, transparent 60%);
    pointer-events: none;
}
.auth-brand-content { position: relative; z-index: 1; padding: 36px 28px; text-align: center; }
.auth-brand-logo {
    width: 56px; height: 56px; border-radius: 16px;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.auth-brand-logo img { width: 28px; filter: brightness(0) invert(1); opacity:.9; }
.auth-brand-title { font-size: 1.5rem; font-weight: 900; color: #fff; margin: 0 0 10px; letter-spacing:-.02em; }
.auth-brand-sub { font-size: 0.78rem; color: rgba(255,255,255,0.55); line-height: 1.65; margin: 0; }
.auth-brand-dots { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.auth-brand-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.25); }
.auth-brand-dots span:first-child { background: rgba(255,255,255,0.85); width: 18px; border-radius: 3px; }

.auth-form-panel {
    flex: 1; overflow-y: auto; position: relative; 
    padding: 32px 32px 28px;
    scrollbar-width: thin; scrollbar-color: var(--auth-border) transparent;
}
.auth-form-panel::-webkit-scrollbar { width: 4px; }
.auth-form-panel::-webkit-scrollbar-thumb { background: var(--auth-border); border-radius: 4px; }

.auth-close-btn {
    position: absolute; top: 16px; right: 16px;
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--auth-input-bg); border: 1px solid var(--auth-border);
    color: var(--auth-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--auth-ease);
}
.auth-close-btn:hover { background: #fee2e2; border-color: #fca5a5; color: var(--auth-error); }

.auth-tabs {
    display: flex; position: relative;
    background: var(--auth-input-bg); border: 1px solid var(--auth-border);
    border-radius: 10px; padding: 4px; margin-bottom: 24px; gap: 4px;
}
.auth-tab {
    flex: 1; padding: 8px; border: none; background: transparent;
    border-radius: 7px; font-size: 0.82rem; font-weight: 600;
    color: var(--auth-muted); cursor: pointer;
    transition: all var(--auth-ease); z-index: 1; font-family: inherit;
}
.auth-tab.active { color: var(--auth-primary); }
.auth-tab-indicator {
    position: absolute; top: 4px; left: 4px; bottom: 4px;
    width: calc(50% - 6px);
    background: #fff; border-radius: 7px;
    box-shadow: 0 1px 4px rgba(30,58,138,0.12);
    transition: transform var(--auth-ease);
}
.auth-tab-indicator.right { transform: translateX(calc(100% + 8px)); }

.auth-form-header { margin-bottom: 20px; }
.auth-form-title { font-size: 1.25rem; font-weight: 800; color: var(--auth-primary); margin: 0 0 4px; letter-spacing:-.02em; }
.auth-form-sub { font-size: 0.78rem; color: var(--auth-muted); margin: 0; }

.auth-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.auth-label-row { display: flex; align-items: center; justify-content: space-between; }
.auth-label { font-size: 0.7rem; font-weight: 700; color: var(--auth-muted); letter-spacing:.04em; text-transform: uppercase; }
.auth-forgot-link { font-size: 0.72rem; color: var(--auth-mid); font-weight: 600; text-decoration: none; }
.auth-forgot-link:hover { text-decoration: underline; }

.auth-input-wrap {
    display: flex; align-items: center;
    background: var(--auth-input-bg); border: 1px solid var(--auth-border);
    border-radius: 9px; overflow: hidden;
    transition: border-color var(--auth-ease), box-shadow var(--auth-ease);
}
.auth-input-wrap:focus-within { border-color: var(--auth-mid); box-shadow: 0 0 0 3px rgba(29,78,216,0.1); background: #fff; }
.auth-input-icon { padding: 0 10px 0 12px; color: var(--auth-muted); display: flex; align-items: center; flex-shrink: 0; }
.auth-input {
    flex: 1; border: none; outline: none; background: transparent;
    padding: 10px 12px 10px 0; font-size: 0.83rem; color: var(--auth-text); font-family: inherit;
}
.auth-input::placeholder { color: #9ca3af; }
.auth-select { appearance: none; cursor: pointer; }
.auth-textarea { resize: none; padding: 10px 12px 10px 0; line-height: 1.5; }

.auth-pwd-wrap { position: relative; }
.auth-eye-btn { background: none; border: none; cursor: pointer; padding: 0 10px; color: var(--auth-muted); display: flex; transition: color var(--auth-ease); }
.auth-eye-btn:hover { color: var(--auth-primary); }

.auth-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.auth-error { font-size: 0.76rem; color: var(--auth-error); font-weight: 600; min-height: 20px; margin-bottom: 4px; display: none; }
.auth-error.visible { display: block; }

.auth-submit-btn {
    width: 100%; padding: 12px;
    background: var(--auth-primary); color: #fff;
    border: none; border-radius: 9px;
    font-size: 0.88rem; font-weight: 700;
    cursor: pointer; font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all var(--auth-ease); margin-top: 4px;
}
.auth-submit-btn:hover { background: var(--auth-mid); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(30,58,138,0.25); }
.auth-submit-btn:disabled { opacity:.55; cursor: not-allowed; transform: none; }

.auth-spinner {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    animation: authSpin .7s linear infinite;
    display: none;
}
.auth-spinner.active { display: inline-block; }

@keyframes authSpin { to { transform: rotate(360deg); } }

.auth-switch-text { text-align: center; font-size: 0.77rem; color: var(--auth-muted); margin-top: 16px; }
.auth-switch-text a { color: var(--auth-mid); font-weight: 700; text-decoration: none; }
.auth-switch-text a:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .auth-brand { display: none; }
    .auth-form-panel { padding: 24px 18px 20px; }
    .auth-two-col { grid-template-columns: 1fr; gap: 0; }
    .auth-shell { max-height: 95vh; }
}

.auth-success {
    font-size: 0.76rem;
    color: #16a34a;
    font-weight: 600;
    min-height: 20px;
    margin-bottom: 4px;
    display: none;
}