/* ================== AUTH UI – POWERAGRISIM ================== */
/* Ảnh nền dùng chung cho tất cả trang (login/register/forgot/reset) */
:root {
    --auth-bg-url: url("/media/img.png");
    --auth-card-width: 380px;
    /* chiều rộng khung trắng tối đa */
    --auth-control-h: 44px;
    /* chiều cao các thanh input/nút */
}

/* === NỀN DÙNG CHUNG CHO TẤT CẢ TRANG AUTH === */
/* === NỀN DÙNG CHUNG KHÔNG OVERLAY (không lớp phủ mờ) === */
.auth-bg {
    min-height: 100dvh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;

    /* Chỉ còn ảnh nền duy nhất từ biến --auth-bg-url */
    background-image: var(--auth-bg-url);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}
/* Hook nếu cần style riêng cho login */
body.login-page {}


/* ===== KHUNG TRẮNG (kiểu cũ – login/register) ===== */
.login-card {
    background: #fff;
    width: min(92vw, 360px);
    border-radius: 26px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .15);
    padding: 30px 30px 28px;
    text-align: center;
}

.login-title {
    font-size: 30px;
    font-weight: 700;
    color: #0f52d6;
    margin-bottom: 18px;
}

/* ===== INPUT (kiểu cũ) ===== */
.login-input-group {
    text-align: left;
    margin-bottom: 14px;
}

.login-input-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #0f172a;
}

.login-input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    outline: none;
    transition: .15s;
}

.login-input-group input:focus {
    border-color: #0f52d6;
    box-shadow: 0 0 0 3px rgba(15, 82, 214, .1);
}

/* Ô password có icon mắt */
.password-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding-right: 4px;
}

.password-wrap input {
    border: none;
    flex: 1;
    box-shadow: none;
}

.pw-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
}

/* ===== NÚT LOGIN (kiểu cũ) ===== */
.login-btn {
    width: 100%;
    background: #fff;
    border: 1.5px solid #0f52d6;
    color: #0f52d6;
    font-weight: 600;
    padding: 9px 10px;
    border-radius: 9999px;
    cursor: pointer;
    margin-top: 6px;
    transition: .15s;
}

.login-btn:hover {
    background: #0f52d6;
    color: #fff;
}

/* ===== LINK FORGOT / CREATE ===== */
.login-links {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
}

.login-links a {
    color: #0f52d6;
    text-decoration: none;
    font-weight: 500;
}

/* ===== DÒNG NGĂN CÁCH ===== */
.login-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
}

.login-divider::before,
.login-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e2e8f0;
}

.login-divider span {
    font-size: 12px;
    color: #94a3b8;
}

/* ===== NÚT GOOGLE ===== */
.google-btn {
    width: 100%;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 9999px;
    padding: 8px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: .15s;
}

.google-btn:hover {
    background: #f8fafc;
}

.google-icon {
    width: 16px;
    height: 16px;
    background: url("https://www.google.com/favicon.ico") center/cover no-repeat;
}

/* ===== FLASH MESSAGE ===== */
.flash {
    background: #ecfeff;
    border: 1px solid #67e8f9;
    color: #155e75;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    text-align: left;
    margin-bottom: 12px;
}

/* ===== Chuẩn hoá kích thước các thanh (inputs & buttons) ===== */
.login-card,
.reg-card {
    width: min(92vw, var(--auth-card-width));
}

.login-input-group input,
.password-wrap,
.login-btn,
.google-btn {
    height: var(--auth-control-h);
    border-radius: 12px;
}

.password-wrap input {
    height: calc(var(--auth-control-h) - 2px);
}

.login-btn,
.google-btn {
    padding: 0 12px;
    line-height: 1;
}

.login-input-group input,
.password-wrap,
.login-btn,
.google-btn {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width:380px) {
    :root {
        --auth-control-h: 42px;
    }
}


/* ====== Card trắng ở giữa (kiểu mới – forgot/reset) ====== */
.auth-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .08);
    padding: 36px 32px;
    backdrop-filter: saturate(140%) blur(2px);
}

/* ====== Tiêu đề ====== */
.auth-title {
    margin: 0 0 18px 0;
    font-size: 32px;
    line-height: 1.2;
    text-align: center;
    color: #1f4dd9;
    font-weight: 800;
}

/* ====== Form ====== */
.auth-form label {
    display: block;
    margin: 16px 0 6px;
    font-size: 14px;
    color: #344054;
}

.auth-form input {
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #d0d5dd;
    background: #fff;
    outline: none;
    font-size: 15px;
    color: #111827;
    transition: box-shadow .2s, border-color .2s, transform .02s;
}

.auth-form input::placeholder {
    color: #98a2b3;
}

.auth-form input:focus {
    border-color: #3570ff;
    box-shadow: 0 0 0 4px rgba(53, 112, 255, .15);
}

/* ====== Button chính ====== */
.btn-primary {
    width: 100%;
    margin-top: 18px;
    height: 48px;
    border: 1.5px solid #2f66ff;
    background: #fff;
    color: #2f66ff;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: transform .06s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.btn-primary:hover {
    background: #2f66ff;
    color: #fff;
    box-shadow: 0 8px 20px rgba(47, 102, 255, .35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    opacity: .92;
}

.btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ====== Link phụ ====== */
.auth-links {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    font-size: 14px;
}

.auth-links .right {
    margin-left: auto;
}

.auth-links a {
    color: #2f66ff;
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

.helper {
    margin-top: 10px;
    font-size: 14px;
    color: #667085;
}

/* ====== Responsive nhỏ ====== */
@media (max-width:420px) {
    .auth-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .auth-title {
        font-size: 26px;
    }
}
/* ====== PATCH: Chuẩn hoá kích thước & khoảng cách các ô ====== */
:root{
  --auth-control-h: 48px;   /* CHIỀU CAO CHUẨN cho mọi ô */
  --auth-radius: 12px;      /* Bo góc đồng nhất */
  --auth-gap: 12px;         /* Khoảng cách dọc giữa các hàng */
}

/* Mọi control đều cao bằng nhau */
.auth-form input,
.auth-form select,
.password-wrap,
.btn-primary,
.login-btn,
.google-btn {
  height: var(--auth-control-h);
  border-radius: var(--auth-radius);
  box-sizing: border-box;
  font-size: 15px;
}

/* Input bên trong ô password lấp đầy đúng chiều cao khung */
.password-wrap { padding-right: 8px; }
.password-wrap input {
  height: 100%;
  padding-top: 0;
  padding-bottom: 0;
}

/* Nút dùng flex để căn giữa theo chiều dọc, tránh lệch chữ */
.btn-primary,
.login-btn,
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;          /* bỏ padding dọc, chỉ padding ngang */
  line-height: 1;           /* không đội chiều cao */
}

/* Ô nhập toàn chiều rộng khung */
.auth-form input,
.auth-form select,
.password-wrap,
.btn-primary,
.login-btn,
.google-btn {
  width: 100%;
}

/* Khoảng cách dọc giữa các hàng trong form */
.auth-form {
  display: grid;
  row-gap: var(--auth-gap);
}

/* Nhóm label + input nhìn cân hơn */
.auth-form label {
  margin: 0 0 6px;
}

/* Ở layout cũ (login-input-group) cũng áp dụng chiều cao & gap */
.login-input-group { margin-bottom: var(--auth-gap); }
.login-input-group input { height: var(--auth-control-h); }

/* Mobile: hạ nhẹ chiều cao cho vừa ngón tay */
@media (max-width: 380px){
  :root{ --auth-control-h: 44px; }
}
/* ===== Accent CTA button for Register ===== */
.btn-accent {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 14px;
    background: #f43f5e;
    /* hồng đậm nổi bật */
    color: #ffffff;
    /* chữ trắng nổi */
    font-weight: 800;
    font-size: 16px;
    letter-spacing: .2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .06s ease, box-shadow .2s ease, filter .15s ease;
}

.btn-accent:hover {
    filter: brightness(1.06);
    box-shadow: 0 10px 22px rgba(244, 63, 94, .28);
    transform: translateY(-1px);
}

.btn-accent:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

.btn-accent:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(244, 63, 94, .25);
}

/* Trạng thái disabled (khi form chưa hợp lệ) */
.btn-accent:disabled {
    opacity: .6;
    cursor: not-allowed;
    filter: none;
    box-shadow: none;
}
