* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #f4f6f9, #eef1f5);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}

/* ===== FORM CARD ===== */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
    padding: 40px 35px;
    max-width: 440px;
    width: 100%;
    text-align: center;
}

/* Logo */
.logo {
    width: 220px;
    margin-bottom: 20px;
}

/* Titles */
.form-container h2 {
    margin-bottom: 6px;
    font-weight: 700;
    color: #333;
}

.form-subtitle {
    font-size: 14px;
    color: #777;
    margin-bottom: 25px;
}

/* Fields */
.field {
    margin-bottom: 14px;
}

.form-container input,
.form-container select {
    width: 100%;
    padding: 14px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-container input::placeholder {
    color: #aaa;
}

/* Focus */
.form-container input:focus,
.form-container select:focus {
    outline: none;
    border-color: maroon;
    box-shadow: 0 0 0 3px rgba(128, 0, 0, 0.15);
}

/* Select */
.form-container select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23999' d='M5.5 7l4.5 4.5L14.5 7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    margin-bottom: 14px;
}

/* Button */
.form-container input[type="submit"] {
    margin-top: 20px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, maroon, #B33838);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-container input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(179, 56, 56, 0.35);
}

/* ===== FORM GRID ===== */
.form-row {
    margin-bottom: 14px;
}

.form-row.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Ensure inputs fill grid */
.form-row input,
.form-row select {
    width: 100%;
}

/* Mobile: stack everything */
@media (max-width: 520px) {
    .form-row.two {
        grid-template-columns: 1fr;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 520px) {
    .form-container {
        padding: 30px 25px;
    }
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    transition: color 0.25s ease;
}

.toggle-password:hover {
    color: maroon;
}

.toggle-password svg {
    pointer-events: none;
}

.password-wrapper input {
    padding-right: 42px;
}

/* TERMS SECTION */
.terms-row {
    margin-top: 10px;
    font-size: 14px;
    text-align: left;
}

.terms-label {
    display: flex;
    align-items: center;  
    gap: 10px;
    line-height: 1.6;
    cursor: pointer;
}

.terms-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #c0392b;   /* modern red checkbox */
}

.terms-text {
    flex: 1;
    color: #444;
}

.terms-text a {
    color: #c0392b;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

.terms-text a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* MODAL */
.terms-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
}

/* MODAL CARD */
.terms-content {
    background: #ffffff;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    margin: 4% auto;
    padding: 30px;
    border-radius: 14px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.terms-content h2 {
    margin: 0;
    font-size: 22px;
    color: #c0392b;
}

.effective-date {
    font-size: 13px;
    color: #777;
    margin-bottom: 15px;
}

/* SCROLLABLE CONTENT */
.terms-scroll {
    overflow-y: auto;
    padding-right: 10px;
    font-size: 14px;
    line-height: 1.6;
}

/* SECTION SPACING */
.terms-scroll section {
    margin-bottom: 18px;
}

.terms-scroll h3 {
    font-size: 15px;
    margin-bottom: 6px;
    color: #333;
}

.terms-scroll ul {
    padding-left: 18px;
}

.terms-scroll li {
    margin-bottom: 6px;
}

/* CLOSE BUTTON */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    transition: 0.2s ease;
}

.close-btn:hover {
    color: #c0392b;
}

/* ANIMATION */
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
