
/* ============================================================
   SECRETARY AI v0.4.0 — AUTH
   ============================================================ */

:root {
    --bg-app: #0a0e14;
    --bg-elevated: #1a1f2b;
    --bg-input: rgba(255, 255, 255, 0.04);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-light: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(201, 168, 76, 0.4);
    --gold-400: #c9a84c;
    --gold-gradient: linear-gradient(135deg, #c9a84c 0%, #e0c878 30%, #b8942e 60%, #8b6914 100%);
    --cyan-400: #22d3ee;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-hover: rgba(255, 255, 255, 0.06);
    --glass-blur: blur(20px) saturate(180%);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-gold: 0 4px 16px rgba(201, 168, 76, 0.15);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --obsidian-900: #0a0e14;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg-app);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: background var(--duration-normal) var(--ease-out);
}

.auth-container {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 90%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: background var(--duration-normal) var(--ease-out);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo h1 span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.form h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.form > p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Поле телефона */
.phone-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 16px 0;
    background: var(--bg-input);
    transition: border-color var(--duration-fast) var(--ease-out);
}

.phone-input:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.08);
}

.country-code {
    background: var(--glass-bg);
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-primary);
    border-right: 1px solid var(--border-light);
    font-size: 15px;
}

#phone, #code {
    border: none;
    padding: 14px;
    font-size: 16px;
    flex: 1;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
}

#phone::placeholder, #code::placeholder {
    color: var(--text-muted);
}

/* Чекбокс */
.consent-block {
    margin: 16px 0;
    text-align: left;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.consent-block input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: var(--gold-400);
    cursor: pointer;
}

.consent-block label {
    cursor: pointer;
    line-height: 1.4;
}

.consent-block a {
    color: var(--gold-400);
    text-decoration: underline;
}

.consent-block a:hover {
    color: var(--cyan-400);
}

/* Кнопки */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--gold-gradient);
    color: var(--obsidian-900);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-gold);
    transition: all var(--duration-fast) var(--ease-spring);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.3);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-max {
    width: 100%;
    padding: 14px;
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    transition: all var(--duration-fast) var(--ease-out);
}

.btn-max:hover:not(:disabled) {
    background: var(--glass-hover);
    border-color: rgba(201, 168, 76, 0.3);
}

.btn-max:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-tg {
    width: 100%;
    padding: 14px;
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    transition: all var(--duration-fast) var(--ease-out);
}

.btn-tg:hover:not(:disabled) {
    background: var(--glass-hover);
    border-color: rgba(34, 211, 238, 0.3);
}

.btn-tg:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Кнопка входа по коду */
.btn-code {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s;
}
.btn-code:hover {
    background: var(--glass-hover);
    border-color: var(--border-focus);
}
.btn-code:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.auth-channel-field {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    text-align: left;
}

.auth-channel-field label {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}

.auth-channel-field span {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}

.auth-channel-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font: inherit;
    outline: none;
}

.auth-channel-select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.08);
}

/* Разделитель */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-light);
}

.divider span {
    padding: 0 12px;
}

.hidden {
    display: none;
}

/* Адаптив */
@media (max-width: 480px) {
    .auth-container {
        padding: 28px 20px;
        border-radius: var(--radius-md);
    }
    
    .logo h1 {
        font-size: 22px;
    }
}
.auth-status {
    display: none;
    margin-top: 14px;
    padding: 11px 14px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: 10px;
    background: rgba(248, 113, 113, 0.1);
    color: #ef4444;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
}

.auth-status.visible { display: block; }
