html,
body {
  margin: 0;
  padding: 0;
  border: 0;
}

:root {
  --primary: #0066cc;
  --secondary: #00b39f;
  --dark: #0f172a;
  --white: #ffffff;
  --light: #f5f7fa;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --footer-bg: #003d7c;
  --footer-light: #52c2ff;
  --footer-text: #e0f7ff;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth;
}


body {
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}


header {
 background:  linear-gradient(135deg, #00b4d8, #0077b6);
  color: white;
  padding: 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  max-width: 1150px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  letter-spacing: 0.5px;
}

.brand-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 22px;
}

nav a {
  color: white;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: 0.3s;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s;
}

nav a:hover::after {
  width: 100%;
}
.member-banner {
  background: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  color: white;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.2;
}

.member-banner img {
  height: 38px;
  width: auto;
  vertical-align: middle;
  filter: brightness(0) invert(1);
  margin-top: 5px;
}


@media (max-width: 768px) {

  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .member-banner {
    flex-direction: row;
    font-size: 12px;
  }

  .member-banner img {
    height: 25px;
    margin-top: 0;
  }
}
.main-footer {
  /* Loại bỏ max-width và margin, để nó chiếm 100% chiều rộng trình duyệt */
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 20px 20px;
  font-size: 15px;
  line-height: 1.6;
  width: 100%; /* Đảm bảo chiếm toàn bộ chiều ngang */
}
@media (max-width: 1150px) {
    .main-footer {
        max-width: 100%;
        border-radius: 0;
    }
}


/* Giữ lại max-width cho phần nội dung (footer-content) để căn chỉnh với .nav của header */
.footer-content {
  max-width: 1150px; /* Giới hạn nội dung ở 1150px */
  margin: 0 auto; /* Căn giữa nội dung */
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-column {
  min-width: 250px;
  margin-bottom: 30px;
  flex-basis: calc(33.33% - 40px);
}

.footer-column h3 {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--footer-light);
  position: relative;
}

.footer-column h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background-color: var(--footer-light);
  margin-top: 5px;
}

.footer-logo {
  width: 120px;
  height: auto;
  margin-bottom: 15px;
}

.footer-title {
  font-size: 1.5em;
  margin: 0 0 5px;
}

.footer-slogan {
  font-size: 0.9em;
  opacity: 0.8;
}

.footer-social {
  margin-top: 20px;
  display: flex;
  gap: 15px;
  align-items: center;
}

.social-icon-fa {
  font-size: 20px;
  color: #ffffff;
  width: auto;
  height: auto;
  padding: 6px;
  border: 1px solid #ffffff;
  border-radius: 50%;
  transition: 0.3s;
}


.footer-social a:hover .social-icon-fa {
  transform: scale(1.1);
  opacity: 0.9;
  color: #ffffff;
  border-color: #ffffff;
}

.footer-contact ul {
  list-style: none;
  padding: 0;
}

.footer-contact ul li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.footer-contact ul li i {
  font-size: 1em;
  color: var(--footer-light);
  margin-right: 15px;
  margin-top: 3px;
}

.footer-contact a {
  color: var(--footer-light);
  text-decoration: none;
  transition: 0.3s;
}

.footer-contact a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-org-name {
  font-size: 1em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--white);
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--footer-text);
  text-decoration: none;
  transition: 0.3s;
  position: relative;
  padding-left: 15px;
}

.footer-links a:hover {
  color: var(--footer-light);
}

.footer-links a::before {
  content: '▶';
  position: absolute;
  left: 0;
  font-size: 0.7em;
  color: var(--footer-light);
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85em;
  opacity: 0.7;
}


@media (max-width: 992px) {
  .footer-content {
    justify-content: space-around;
  }
  .footer-column {
    flex-basis: calc(50% - 20px);
  }
  .footer-brand-column {
    flex-basis: 100%;
    text-align: center;
  }
  .footer-brand-column .footer-logo,
  .footer-brand-column .footer-social {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }
  .footer-column h3::after {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 576px) {
  .main-footer {
    padding-top: 20px;
  }
  .footer-column {
    flex-basis: 100%;
    text-align: center;
  }
  .footer-column h3 {
    font-size: 1.1em;
    text-align: center;
  }
  .footer-column h3::after {
    left: 50%;
    transform: translateX(-50%);
    margin: 5px auto 0;
  }
  .footer-contact ul li {
    justify-content: center;
  }
  .footer-contact ul li i {
    margin-right: 10px;
  }
  .footer-links a {
    padding-left: 0;
  }
  .footer-links a::before {
    content: none;
  }
}
/* Thiết lập biến màu để nhất quán */
:root {
    --primary-color: #003366; /* Xanh Dương Đậm */
    --accent-color: #00c0f0;  /* Xanh Ngọc */
    --light-bg: #f5f8fa;
    --border-color: #e0e0e0;
}

/* ----------------------------------
 * 1. Styling Chung Cho Biểu Mẫu
 * ---------------------------------- */
.form-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.1); /* Bóng mờ nhẹ */
    border-radius: 12px;
}

.dorm-form {
    padding: 20px 0;
    display: none; /* Ẩn form theo mặc định, dùng JS để hiện */
}

.dorm-form.active {
    display: block;
}

.form-title {
    color: var(--primary-color);
    text-align: center;
    font-size: 2em;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 5px;
    width: 100%;
}

/* ----------------------------------
 * 2. Nút Chuyển Đổi Tab (Đăng Ký/Hủy)
 * ---------------------------------- */
.form-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 25px;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.tab-btn:hover {
    background-color: rgba(0, 51, 102, 0.05);
}

.tab-btn.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 3px 10px rgba(0, 192, 240, 0.4);
}

/* ----------------------------------
 * 3. Form Input Styling
 * ---------------------------------- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
}

.form-grid-cancel {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
}

label {
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 1em;
    box-sizing: border-box;
}

input:focus,
textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 192, 240, 0.2);
    outline: none;
}

textarea {
    resize: vertical;
    grid-column: 1 / -1; /* Chiếm toàn bộ chiều rộng cho textarea */
}

/* Lý do hủy phòng */
.cancellation-intro {
    background-color: var(--light-bg);
    padding: 15px;
    border-left: 5px solid var(--accent-color);
    margin-bottom: 20px;
    color: #333;
}

.reason-options {
    display: flex;
    gap: 20px;
    margin: 10px 0 15px 0;
    grid-column: 1 / -1;
}

.reason-option input[type="radio"] {
    margin-right: 5px;
}

/* ----------------------------------
 * 4. Multi-Step Form (Đăng Ký)
 * ---------------------------------- */
.form-step {
    padding: 10px 0;
    display: none;
    animation: fadeIn 0.5s;
}

.form-step.active {
    display: block;
}

/* Thanh Tiến Trình */
.progress-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 40px;
}

.progress-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
    transform: translateY(-50%);
}

.progress-step {
    width: 120px;
    text-align: center;
    padding: 8px 0;
    border-radius: 20px;
    background-color: var(--light-bg);
    color: #666;
    font-weight: 500;
    position: relative;
    z-index: 2;
    transition: all 0.3s;
    font-size: 0.9em;
    border: 2px solid var(--border-color);
}

.progress-step.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    font-weight: bold;
}

/* Card Lựa Chọn Phòng */
.room-options {
    /* Đã sửa: Cố định 2 cột trên màn hình lớn */
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* CHIA THÀNH 2 CỘT bằng nhau */
    gap: 20px;
    margin-bottom: 20px;
    grid-column: 1 / -1;
}
.room-card {
    display: block;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    background-color: var(--light-bg);
}

.room-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 6px 15px rgba(0, 192, 240, 0.15);
}

.room-card input[type="radio"] {
    display: none;
}

.room-card input[type="radio"]:checked + .card-content {
    border: 4px solid var(--accent-color);
    background-color: #e6f8ff; /* Màu nền nhạt khi được chọn */
}

.card-content {
    border: 4px solid transparent;
    border-radius: 4px;
    padding: 10px;
    transition: all 0.3s;
}

.room-card h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 5px;
}

.price-tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.9em;
    font-weight: bold;
}

/* ----------------------------------
 * 5. Nút Điều Hướng & Submit
 * ---------------------------------- */
.form-nav-group {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

.form-nav-btn {
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.prev-btn {
    background-color: #6c757d;
    color: white;
    border: none;
}

.prev-btn:hover {
    background-color: #5a6268;
}

.next-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.next-btn:hover {
    background-color: #002244;
}

.form-submit-btn,
.cancel-submit-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 6px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 25px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.form-submit-btn {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.form-submit-btn:hover {
    background-color: #00e0ff;
    box-shadow: 0 4px 15px rgba(0, 192, 240, 0.5);
}

.cancel-submit-btn {
    background-color: #dc3545; /* Màu đỏ cho hủy */
    color: white;
}

.cancel-submit-btn:hover {
    background-color: #c82333;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.5);
}

/* ----------------------------------
 * 6. Checkbox & Ghi chú
 * ---------------------------------- */
.checkbox-group {
    display: flex;
    align-items: center;
    margin: 15px 0 20px 0;
}

.checkbox-group input {
    width: auto;
    margin-right: 10px;
}

.checkbox-group label {
    text-align: left;
    font-weight: normal;
    font-size: 0.95em;
    color: #333;
}

.important-note {
    background-color: #fff3cd; /* Màu vàng nhạt */
    border-left: 5px solid #ffc107;
    padding: 15px;
    border-radius: 4px;
    color: #856404;
    font-size: 0.9em;
    margin-bottom: 20px;
}

.important-note p {
    margin: 0;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Điều chỉnh lại cho grid của Bước 2 và 3 */
.form-step[data-step="2"] .form-grid,
.form-step[data-step="3"] .form-grid {
    grid-template-columns: 1fr; /* Trở lại 1 cột cho các bước này */
}
/* ----------------------------------
 * 0. SPLIT-SCREEN TOGGLE PANEL
 * ---------------------------------- */
.action-panel {
    text-align: center;
    padding: 50px 20px;
    display: none;
    animation: fadeIn 0.6s ease-out;
}

.action-panel.active {
    display: block;
}

.panel-title {
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 10px;
}

.panel-subtitle {
    color: #555;
    font-size: 1.1em;
    margin-bottom: 40px;
}

.selection-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.select-btn {
    padding: 25px 40px;
    font-size: 1.3em;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.select-btn i {
    margin-right: 15px;
}

.register-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

.register-btn:hover {
    background-color: #002244;
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.4);
    transform: translateY(-3px);
}

.cancel-btn {
    background-color: #dc3545; /* Màu đỏ cho Hủy */
    color: var(--white);
}

.cancel-btn:hover {
    background-color: #c82333;
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
    transform: translateY(-3px);
}

.policy-reminder {
    background-color: #fffae6;
    border: 1px solid #ffcc00;
    padding: 15px;
    border-radius: 8px;
    color: #856404;
    font-size: 0.95em;
    margin: 0 auto;
    max-width: 500px;
}

.back-to-panel {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    display: block;
    float: left;
    transition: color 0.2s;
}

.back-to-panel:hover {
    color: var(--accent-color);
}

/* Responsive cho Toggle Panel */
@media (max-width: 768px) {
    .action-panel {
        padding: 30px 10px;
    }
    .panel-title {
        font-size: 1.8em;
    }
    .selection-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .select-btn {
        width: 100%;
        min-width: 0;
    }
}