/* ====================================================
   AUTH.CSS — Đăng nhập / Đăng ký
   SHOPDINOSAW
   ==================================================== */

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #eaf2f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 16px 40px;
}

/* BACK LINK */
.back-link {
    align-self: flex-start;
    margin-bottom: 16px;
    font-size: 13px;
    color: #4A8F7E;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.18s;
}
.back-link:hover { color: #2F5D50; }

/* CARD WRAPPER */
.auth-wrap {
    width: 100%;
    max-width: 460px;
}

/* BRAND */
.auth-brand {
    text-align: center;
    margin-bottom: 20px;
}
.auth-brand a { text-decoration: none; }
.auth-brand img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    display: block;
    margin: 0 auto 10px;
}
.auth-brand strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #1a3530;
    letter-spacing: -0.3px;
}
.auth-brand span {
    font-size: 12px;
    color: #7aa89e;
}

/* TABS */
.auth-tabs {
    display: flex;
    background: #d4e6e1;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}
.auth-tab {
    flex: 1;
    text-align: center;
    padding: 14px 0;
    font-size: 14px;
    font-weight: 600;
    color: #4a7a6e;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    letter-spacing: 0.3px;
}
.auth-tab:hover  { background: #c0d9d3; color: #1a3530; }
.auth-tab.active { background: #2F5D50; color: #e0f2f1; }

/* CARD */
.auth-card {
    background: #fff;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 6px 28px rgba(47, 93, 80, 0.13);
    padding: 30px 34px 26px;
}

/* PANELS */
.auth-panel {
    visibility: hidden;
    height: 0;
    overflow: hidden;
}
.auth-panel.active {
    visibility: visible;
    height: auto;
    overflow: visible;
}

/* ALERT */
.auth-alert {
    border-radius: 7px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 18px;
    line-height: 1.5;
}
.auth-alert-error   { background: #fff0f0; color: #c0392b; border: 1px solid #f5c6c6; }
.auth-alert-success { background: #f0faf6; color: #2F5D50; border: 1px solid #b2dfdb; }

/* FORM */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.auth-field label {
    font-size: 13px;
    font-weight: 600;
    color: #1a3530;
}
.auth-field input {
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid #c8ddd9;
    border-radius: 7px;
    font-size: 14px;
    color: #1a3530;
    background: #f9fdfb;
    outline: none;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-field input::placeholder { color: #b2ccc8; }
.auth-field input:focus {
    border-color: #4A8F7E;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74, 143, 126, 0.15);
}

/* 2 cột họ tên + SĐT */
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* NÚT SUBMIT */
.auth-btn {
    margin-top: 4px;
    height: 46px;
    width: 100%;
    background: #2F5D50;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 3px 10px rgba(47, 93, 80, 0.25);
}
.auth-btn:hover {
    background: #4A8F7E;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(47, 93, 80, 0.32);
}
.auth-btn:active { transform: translateY(0); }

/* SWITCH LINK */
.auth-switch {
    font-size: 13px;
    color: #7aa89e;
    text-align: center;
    margin-top: 18px;
}
.auth-switch a {
    color: #2F5D50;
    font-weight: 600;
    text-decoration: none;
}
.auth-switch a:hover { color: #4A8F7E; text-decoration: underline; }

/* RESPONSIVE */
@media (max-width: 500px) {
    .auth-card { padding: 22px 18px 20px; }
    .auth-row  { grid-template-columns: 1fr; }
}