* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    font-family: "Leelawadee UI", Tahoma, sans-serif;
    color: #fff;
    background:
        linear-gradient(
            90deg,
            rgba(9, 24, 50, .80),
            rgba(9, 24, 50, .42) 48%,
            rgba(9, 24, 50, .04) 100%
        ),
        url("/images/bg_login.jpg") center center / cover no-repeat;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 32px 6%;
}

.brand img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.brand strong {
    display: block;
    font-size: 18px;
    letter-spacing: 3px;
}

.brand span {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    color: #e3eaf4;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 32px 6%;
}

.glass {
    width: 100%;
    max-width: 460px;
    padding: 46px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 24px;
    background: rgba(15, 30, 55, .35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .12);
}

/* Login Box */
.login-box h2 {
    margin: 0 0 24px;
    font-size: 28px;
    font-weight: 600;
    color: #fff;
}

.login-box h2::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    background: #f1d291;
    margin-top: 12px;
}

/* Error Alert */
.alert-error {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(248, 113, 113, .45);
    background: rgba(185, 28, 28, .35);
    color: #fecaca;
    font-size: 14px;
    line-height: 1.5;
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 12px;
    background: rgba(9, 24, 50, .45);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color .2s ease, background .2s ease;
}

.login-box input[type="text"]::placeholder,
.login-box input[type="password"]::placeholder {
    color: #c5d3e6;
}

.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
    border-color: #f1d291;
    background: rgba(9, 24, 50, .65);
}

.options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 8px;
    font-size: 13px;
    color: #e3eaf4;
}

.options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #f1d291;
    cursor: pointer;
}

.options label {
    margin-right: auto;
    cursor: pointer;
}

.options a {
    color: #f1d291;
    text-decoration: none;
}

.options a:hover {
    text-decoration: underline;
}

.login-box button[type="submit"] {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #f1d291;
    color: #091832;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, transform .15s ease;
}

.login-box button[type="submit"]:hover {
    background: #f6dfad;
}

.login-box button[type="submit"]:active {
    transform: translateY(1px);
}

.login-box p {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    color: #e3eaf4;
}

.login-box p a {
    color: #f1d291;
    font-weight: 600;
    text-decoration: none;
}

.login-box p a:hover {
    text-decoration: underline;
}

footer {
    padding: 24px 6%;
    font-size: 13px;
    color: #d0dbea;
}

@media (max-width: 768px) {
    body {
        background:
            linear-gradient(
                rgba(9, 24, 50, .55),
                rgba(9, 24, 50, .80)
            ),
            url("/images/bg_login.jpg") 70% center / cover no-repeat;
    }

    .brand {
        padding: 24px;
    }

    main {
        padding: 24px;
    }

    .glass {
        padding: 28px;
    }

    footer {
        padding: 24px;
        text-align: center;
    }
}
/* Register Page Extensions */
.register-glass {
    max-width: 680px;
    width: 95%;
}

.register-box .subtitle {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 1rem;
    text-align: center;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
}

.form-group select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    font-family: inherit;
}

.form-group select option {
    color: #111827;
    background: #ffffff;
}

.thaid-register-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.88rem;
}

.btn-thaid-outline {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 6px;
    background: #0b5ed7;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
}

.alert-success {
    padding: 10px 14px;
    margin-bottom: 14px;
    border-radius: 8px;
    background: rgba(25, 135, 84, 0.25);
    border: 1px solid #198754;
    color: #d1e7dd;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}
/* Forgot Password Page Styles */
.reset-glass {
    max-width: 480px;
    width: 95%;
}

.thaid-reset-box {
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    text-align: center;
    margin-bottom: 16px;
}

.thaid-desc {
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

.btn-thaid-primary {
    display: inline-block;
    width: 100%;
    padding: 11px 16px;
    border-radius: 8px;
    background: #0b5ed7;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: background 0.2s ease;
}

.btn-thaid-primary:hover {
    background: #094db1;
}

.divider-text {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 16px 0;
    font-size: 0.85rem;
    opacity: 0.8;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.divider-text span {
    padding: 0 10px;
}

.verified-profile-card {
    padding: 14px;
    border-radius: 10px;
    background: rgba(25, 135, 84, 0.2);
    border: 1px solid #198754;
    text-align: center;
    margin-bottom: 16px;
}

.badge-verified {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    background: #198754;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.profile-name {
    font-size: 1.05rem;
    font-weight: 600;
}

.profile-cid {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 2px;
}

.reset-glass .form-group {
    margin-bottom: 12px;
    text-align: left;
}

.back-link {
    margin-top: 16px;
    text-align: center;
}
/* ปรับขนาดโลโก้กรมประชาสัมพันธ์ */
.brand {
    display: flex !important;
    align-items: center !important;
    gap: 0px !important;
    height: auto !important;
    max-height: none !important;
    padding-left: 135px;
    margin-top: 55px;
    margin-bottom: -50px;
}

.brand img {
    width: 400px !important;        /* ปรับเพิ่ม-ลดขนาดได้ตามต้องการ เช่น 200px, 250px */
    height: auto !important;
    max-width: none !important;     /* ปลดล็อกไม่ให้ CSS เดิมบีบความกว้าง */
    max-height: none !important;    /* ปลดล็อกไม่ให้ CSS เดิมบีบความสูง */
    flex-shrink: 0 !important;
    object-fit: contain;
}
/* ขยายขนาดข้อความข้างโลโก้ในส่วนหัว */
.brand div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.brand strong {
    font-size: 1.65rem !important;   /* ขนาดคำว่า PRD INTRANET (ประมาณ 26px) */
    line-height: 1.2 !important;
    letter-spacing: 0.5px;
}

.brand span {
    font-size: 1.15rem !important;   /* ขนาดคำว่า กรมประชาสัมพันธ์ (ประมาณ 18px) */
    line-height: 1.3 !important;
    opacity: 0.95;
}
.prd-logo {
    width: 300px ;
    height: auto !important;
}
.register-glass { max-width: 620px; width: 95%; }
.reset-glass { max-width: 480px; width: 95%; }
.subtitle { font-size: 0.92rem; opacity: 0.9; margin-bottom: 1rem; text-align: center; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; text-align: left; }
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; text-align: left; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 0.88rem; font-weight: 500; }
.field-hint { font-size: 0.8rem; opacity: 0.85; }
.thaid-reset-box { padding: 18px; border-radius: 12px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25); text-align: center; margin-bottom: 14px; }
.thaid-desc { font-size: 0.92rem; margin-bottom: 14px; line-height: 1.5; }
.btn-thaid-primary { display: inline-block; width: 100%; padding: 11px 16px; border-radius: 8px; background: #0b5ed7; color: #ffffff; text-decoration: none; font-weight: 600; box-sizing: border-box; }
.btn-thaid-primary:hover { background: #094db1; }
.verified-profile-card { padding: 14px; border-radius: 10px; background: rgba(25, 135, 84, 0.22); border: 1px solid #198754; text-align: center; margin-bottom: 16px; }
.badge-verified { display: inline-block; padding: 3px 12px; border-radius: 20px; background: #198754; color: #ffffff; font-size: 0.8rem; font-weight: 600; margin-bottom: 6px; }
.profile-name { font-size: 1.05rem; font-weight: 600; }
.profile-cid { font-size: 0.88rem; opacity: 0.95; margin-top: 2px; }
.back-link { margin-top: 16px; text-align: center; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
/* บังคับให้ input type="email" และ type="tel" มีสไตล์เหมือน text และ password */
.login-box input[type="email"],
.login-box input[type="tel"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    font-family: inherit;
    font-size: 1rem;
}

/* ล็อกขนาดความสูงและระยะห่างของทุกช่องใน .form-grid ให้เท่ากัน */
.form-grid .form-group input {
    width: 100%;
    box-sizing: border-box;
    height: 40px;
}