/* ============================================================
   Trang dang nhap / dang ky — tach khoi app.css de khong dung
   cham giao dien chat. Bang mau rieng: muc xanh-da + giay am,
   diem nhan ngoc (khong dung xanh duong choi).
   ============================================================ */

:root {
    --a-ink: #182530;
    --a-ink-soft: #223342;
    --a-paper: #f5f4f0;
    --a-field: #ffffff;
    --a-border: #d9d7d0;
    --a-text: #232e38;
    --a-muted: #6e7883;
    --a-jade: #2f7a68;
    --a-jade-dark: #266556;
    --a-error: #b3382e;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    font-family: "Be Vietnam Pro", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--a-paper);
    color: var(--a-text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.auth-split {
    min-height: 100%;
    display: flex;
}

/* ---------------- Panel mực bên trái ---------------- */
.auth-panel {
    position: relative;
    width: 42%;
    background: var(--a-ink);
    color: #eef1f3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 52px;
    overflow: hidden;
}

/* Khối "bản mã" — máy chủ chỉ giữ ciphertext, đó là lời hứa của app */
.auth-cipher {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 24px;
    font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 2px;
    color: rgba(238, 241, 243, 0.07);
    word-break: break-all;
    white-space: pre-wrap;
    user-select: none;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 88%);
    mask-image: linear-gradient(to bottom, #000 50%, transparent 88%);
}

.auth-brand {
    position: relative;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
}
.auth-brand .dot { color: #7fb8a9; }

.auth-promise {
    position: relative;
    max-width: 34ch;
    font-size: 17px;
    line-height: 1.65;
    font-weight: 400;
    color: rgba(238, 241, 243, 0.85);
}
.auth-promise b {
    font-weight: 600;
    color: #fff;
}
.auth-promise small {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    color: rgba(238, 241, 243, 0.55);
}

/* ---------------- Phần form bên phải ---------------- */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 48px 24px;
}
.auth-form-col {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.auth-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.auth-lead {
    margin: 0 0 28px;
    color: var(--a-muted);
    font-size: 14px;
}
.auth-lead a { font-weight: 500; }

a { color: var(--a-jade); text-decoration: none; }
a:hover { text-decoration: underline; }

.field { margin-bottom: 18px; }
.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--a-text);
}
.field input {
    width: 100%;
    padding: 11px 13px;
    font-family: inherit;
    font-size: 15px;
    color: var(--a-text);
    background: var(--a-field);
    border: 1px solid var(--a-border);
    border-radius: 8px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #a7aeb5; }
.field input:focus {
    border-color: var(--a-jade);
    box-shadow: 0 0 0 3px rgba(47, 122, 104, 0.15);
}

.row-2 { display: flex; gap: 12px; }
.row-2 .field { flex: 1; }

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 6px;
    font-size: 14px;
    color: var(--a-muted);
    cursor: pointer;
}
.remember input { accent-color: var(--a-jade); width: 15px; height: 15px; }

.note {
    border-left: 3px solid var(--a-jade);
    padding: 2px 0 2px 12px;
    margin: 4px 0 16px;
    font-size: 13px;
    color: var(--a-muted);
}
.note b { color: var(--a-text); font-weight: 600; }

.form-error {
    color: var(--a-error);
    font-size: 13px;
    min-height: 20px;
    margin: 2px 0 6px;
}

.btn-submit {
    width: 100%;
    padding: 12px 18px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--a-ink);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, opacity .15s;
}
.btn-submit:hover { background: var(--a-ink-soft); }
.btn-submit:focus-visible { outline: 3px solid rgba(47, 122, 104, 0.4); outline-offset: 2px; }
.btn-submit:disabled { opacity: .55; cursor: not-allowed; }

/* ---------------- Mobile: panel thành dải đầu trang ---------------- */
@media (max-width: 820px) {
    .auth-split { flex-direction: column; }
    .auth-panel {
        width: 100%;
        padding: 24px 24px 26px;
        gap: 12px;
    }
    .auth-cipher { padding: 12px; font-size: 11px; }
    .auth-brand { font-size: 21px; }
    .auth-promise { font-size: 14px; max-width: none; }
    .auth-promise small { margin-top: 8px; }
    .auth-main { align-items: flex-start; padding: 32px 20px 48px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
