@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Lora:wght@500;700&display=swap');

:root {
  --primary-green: #006a50;
  --light-green-bg: #eef7f4;
  --button-green-light: #4c8c7c;
  --button-grey-light: #e0e0e0;
  --redeem-bg: #d1e2dd;
  --text-dark: #333;
  --text-light: #fff;
  --border-color: #ddd;
  --card-bg: #f8f8f8;
  --sans-serif-font: 'Inter', system-ui, -apple-system, sans-serif;
  --serif-font: 'Lora', serif;
}

/* --- Basic Reset & Defaults --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans-serif-font);
  background-color: #fff;
  color: var(--text-dark);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 80px; /* Space for bottom nav */
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Shared Components --- */

/* Header */
.app-header {
  background-color: var(--primary-green);
  color: var(--text-light);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.app-header .header-title {
  font-family: var(--serif-font);
  font-size: 1.5rem;
  font-weight: 500;
  flex-grow: 1;
  text-align: center;
}

.app-header .menu-icon-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.app-header .menu-icon {
  width: 24px;
  height: 24px;
  stroke: white;
}

/* Bottom Navbar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 1000;
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #aaa;
  transition: all 0.2s;
  padding: 4px 12px;
  border-radius: 12px;
}

.bottom-nav .nav-item svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.bottom-nav .nav-item.active {
  color: var(--primary-green);
  background-color: var(--light-green-bg);
}

.bottom-nav .nav-item.active #profile-icon {
  fill: var(--primary-green);
  stroke: none;
}
.bottom-nav .nav-item.active #chat-icon {
  fill: var(--primary-green);
}

/* --- Button Styles --- */
.btn-primary {
  background-color: var(--primary-green);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  font-family: var(--sans-serif-font);
}

.btn-primary:hover {
  background-color: #055c45;
}

.btn-primary:disabled {
  background-color: #999;
  cursor: not-allowed;
}

/* Main Content Area */
main {
  padding: 1.5rem 1.25rem;
}

/* --- Utility Classes --- */
.section-title {
    font-family: var(--serif-font);
    font-size: 1.25rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

label.section-title {
  display: block;
  text-align: center;
  font-size: 0.95rem;
  color: #666;
  margin: 0.5rem 0 0.5rem;
}

/* --- Login Page (No change) --- */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.login-logo {
  display: block;       /* makes img behave like block to center */
  margin: 30px auto 20px auto;  /* vertical margin and center horizontally */
  max-width: 180px;
  height: auto;
  border-radius: 12px;
  box-shadow: none;
  transition: none;
  pointer-events: none;
  user-select: none;
  cursor: default;
}

.login-logo:hover {
  transform: none;     /* gentle zoom on hover */
  cursor: default;
}
.login-title { font-family: var(--serif-font); font-size: 2rem; color: var(--primary-green); margin-bottom: 2rem; }
.login-form-container { width: 100%; max-width: 350px; background-color: white; padding: 2rem; border-radius: 20px; border: 1px solid var(--primary-green); }
.login-form-container input { width: 100%; padding: 1rem; margin-bottom: 1rem; border: none; background-color: #f5f5f5; border-radius: 12px; font-size: 1rem; }
.login-button { width: 100%; margin-top: 0.5rem; padding: 0.75rem 1.5rem; border: none; border-radius: 50px; font-size: 1rem; font-weight: 600; cursor: pointer; text-align: center; background-color: var(--primary-green); color: var(--text-light); }
.login-button:hover {background-color: #168a4e;}
.signup-link { margin-top: 2rem; color: #777; }
.signup-link a { color: var(--primary-green); text-decoration: underline; font-weight: 600; }

/* --- Index/Events Page Updated Event Card --- */
.event-card {
  position: relative;
  background-color: #fff; /* White background for clarity */
  color: var(--text-dark);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: box-shadow 0.3s ease;
  font-family: var(--sans-serif-font);
}

/* Remove the previous gradient overlay */
.event-card::before {
  content: none;
}

/* On hover, slightly stronger shadow */
.event-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Past event cards: lighter and subtle border */
.event-card.past-event {
  filter: grayscale(60%);
  opacity: 0.7;
  background-color: #fafafa;
  color: #666;
  border: 1px solid #ccc;
  box-shadow: none;
}

/* Headings inside event cards */
.event-card h3 {
  font-family: var(--serif-font);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

/* Paragraph text spacing */
.event-card p {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  line-height: 1.3;
}

/* Buttons */
.event-card button {
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  border: none;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  align-self: flex-start;
  margin-top: 1rem;
}

.event-card button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Join button */
.event-card button {
  background-color: var(--primary-green);
}

/* Leave button override */
.event-card button[style*="#ff6d6d"] {
  background-color: #ff6d6d !important;
}

/* --- Chat Page (No change) --- */
.chat-board { display: flex; flex-direction: column; gap: 1.5rem; }
.chat-message { display: flex; gap: 0.75rem; align-items: flex-start; }
.chat-avatar { background-color: #333; width: 40px; height: 40px; border-radius: 50%; }
.chat-bubble { position: relative; background-color: var(--light-green-bg); border-radius: 12px; padding: 1rem; flex-grow: 1; }
.chat-bubble::before { content: ''; position: absolute; top: 10px; left: -8px; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-right: 8px solid var(--light-green-bg); }
.chat-bubble .message-content { margin-bottom: 1rem; }
.chat-bubble .message-footer { display: flex; justify-content: space-between; align-items: center; }
.group-size { display: flex; align-items: center; gap: 0.5rem; background-color: #d1e2dd; padding: 0.3rem 0.75rem; border-radius: 50px; }
.group-size svg { width: 16px; height: 16px; }
.chat-join-button { background-color: var(--button-grey-light); color: var(--text-dark); border: none; padding: 0.5rem 1.5rem; border-radius: 50px; font-weight: 600; cursor: pointer; }
.chat-username { margin-top: 0.5rem; font-weight: bold; color: var(--primary-green); }
.create-fab { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 100; background-color: var(--primary-green); color: white; border-radius: 50px; padding: 1rem 1.5rem; font-size: 1rem; font-weight: 600; box-shadow: 0 4px 15px rgba(0, 106, 80, 0.4); display: flex; align-items: center; gap: 0.5rem; }
.create-fab svg { width: 20px; height: 20px; }

/* --- Profile Page (No change) --- */
.profile-card { background-color: var(--card-bg); padding: 1.5rem; border-radius: 16px; margin-bottom: 2rem; }
.profile-info { display: grid; grid-template-columns: auto 1fr; gap: 1rem; font-size: 1rem; }
.profile-info dt { font-weight: bold; color: var(--primary-green); }
.profile-info dd { text-align: right; }
.points-section { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding: 0 0.5rem; }
.points-balance { font-size: 1.5rem; font-weight: bold; color: var(--primary-green); }
.redeem-button { background-color: var(--redeem-bg); color: var(--primary-green); border: none; padding: 0.75rem 1.5rem; border-radius: 50px; font-weight: 600; cursor: pointer; }
.profile-divider { border-top: 1px solid var(--border-color); margin-bottom: 1.5rem;}
.membership-card-container img { width: 100%; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.profile-container {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  margin: auto;
}

.fancy-shadow {
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  background: #fff;
  padding: 1.5rem;
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.profile-header {
  text-align: center;
}

.avatar-placeholder {
  width: 70px;
  height: 70px;
  font-size: 36px;
  background: #f1f1f1;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

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

.profile-info {
  display: grid;
  gap: 1rem;
}

.profile-info dt {
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-info dd {
  margin: 0;
  color: #555;
}

.profile-info input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.profile-edit-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.points-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
}

.points-label {
  font-size: 1.2rem;
  font-weight: 600;
}

.points-value {
  font-size: 1.5rem;
  color: #0077cc;
  font-weight: bold;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid #ccc;
  margin-bottom: 0.5rem;
  transition: transform 0.2s ease;
}
.profile-avatar:hover {
  transform: scale(1.05);
}

/* --- Club --- */
.club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.club-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.1);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.3s ease;
}

.club-card:hover {
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.15);
}

.club-header {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #1a1a1a;
}

.club-members {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.75rem;
}

.club-detail {
  font-size: 0.9rem;
  color: #444;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid #eee;
}

.club-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

.club-actions button {
  flex: 1;
  padding: 0.5rem 0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.25s ease;
}

.join-btn {
  background-color: #007bff;
  color: white;
}

.join-btn:hover {
  background-color: #0056b3;
}

.leave-btn {
  background-color: #dc3545;
  color: white;
}

.leave-btn:hover {
  background-color: #a71d2a;
}

.club-card button {
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.club-card button:hover:not(:disabled) {
  background-color: #0056b3;
}

.fab {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 2rem;
  line-height: 56px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 1001; /* Ensure it floats above everything */
}

/* --- Sidebar Menu --- */
.sidebar {
  position: fixed;
  top: 0;
  left: -300px; /* Start off-screen */
  width: 280px;
  height: 100%;
  background-color: #fff;
  z-index: 2000;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  transition: left 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

.sidebar.is-open {
  left: 0; /* Slide in */
}

.sidebar-header {
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header .sidebar-title {
  font-family: var(--serif-font);
  font-size: 1.5rem;
  color: var(--primary-green);
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
}

.close-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-dark);
}

.sidebar-nav {
  padding: 1.5rem 0;
  flex-grow: 1;
}

.sidebar-nav a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--text-dark);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s;
}

.sidebar-nav a:hover {
  background-color: var(--light-green-bg);
}

.nav-accordion .nav-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-accordion .arrow {
  transition: transform 0.2s;
}

.nav-accordion-content {
  display: none; /* Hidden by default */
  padding-left: 1rem;
  background-color: #fafafa;
}

.nav-accordion-content a {
  font-size: 1rem;
  font-weight: 400;
  color: #555;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0s 0.3s;
}

.overlay.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease-in-out;
}

/* --- [NEW] Simple Header for new pages --- */
.simple-header {
  background-color: var(--primary-green);
  color: white;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.simple-header h1 {
    font-size: 1.25rem;
    font-family: var(--serif-font);
}

.simple-header a {
  font-weight: bold;
}

/* Events container adjustments */
#today-events,
#comingup-events,
#past-events {
  margin-bottom: 2rem;
}

/* Section titles already have .section-title style, so no changes needed */

/* Event card styling adapted to your variables */
.event-card {
  position: relative;
  background-color: var(--card-bg);
  color: var(--text-dark);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: box-shadow 0.3s ease;
  font-family: var(--sans-serif-font);
  cursor: default;
}

/* Slightly darker shadow on hover */
.event-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Past event style: grayscale and lighter */
.event-card.past-event {
  filter: grayscale(80%);
  opacity: 0.8;
  background-color: #fafafa;
  color: #666;
  border: 1px solid #ccc;
  box-shadow: none;
  cursor: default;
}

/* Headings inside event cards */
.event-card h3 {
  font-family: var(--serif-font);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

/* Paragraph text spacing */
.event-card p {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  line-height: 1.3;
}

/* Buttons inside event cards */
.event-card button {
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  border: none;
  color: var(--text-light);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  align-self: flex-start;
  margin-top: 1rem;
}

/* Disabled button */
.event-card button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Join button style */
.event-card button.join {
  background-color: var(--primary-green);
}

/* Leave button style */
.event-card button.leave {
  background-color: #ff6d6d;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  main {
    padding: 1rem;
  }
  .event-card {
    padding: 1rem;
  }
}

.logout-btn {
  padding: 0.25rem 0.6rem;
  background-color: #e0e0e0;
  color: #333;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.logout-btn:hover {
  background-color: #cccccc;
}

.placeholder-section {
  max-width: 700px;
  margin: 3rem auto;
  padding: 2rem;
  background-color: #f9f9f9;
  border-radius: 12px;
  text-align: center;
  font-family: var(--sans-serif-font);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.placeholder-section h2 {
  font-family: var(--serif-font);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #333;
}

.placeholder-section p {
  font-size: 1rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.security-note {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #444;
  text-align: center;
  line-height: 1.5;
  max-width: 320px;
  padding: 0 1rem;
}

/* Main content adjustments */
main {
  padding: 1.5rem 1.25rem;
  max-width: 900px;
  margin: auto;
  font-family: var(--sans-serif-font);
  background-color: #fff;
}

/* Recruitment card container */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

/* Recruitment position card (reuse event-card style with tweaks) */
.recruit-card {
  background-color: var(--card-bg);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
  font-family: var(--sans-serif-font);
  color: var(--text-dark);
}

.recruit-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.recruit-card h3 {
  font-family: var(--serif-font);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.recruit-card p {
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 0.8rem;
  color: #555;
}

.recruit-card .vacancy {
  font-weight: 600;
  color: var(--primary-green);
  margin-bottom: 1rem;
}

/* Buttons styled like your event buttons */
.recruit-card button {
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-light);
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

/* Register button */
.recruit-card button.register {
  background-color: var(--primary-green);
}

.recruit-card button.register:hover {
  background-color: #004b37;
}

/* Unregister button */
.recruit-card button.unregister {
  background-color: #ff6d6d;
}

.recruit-card button.unregister:hover {
  background-color: #cc5656;
}

/* Recruit detail page styles */
.recruit-detail-container {
  max-width: 700px;
  margin: 2rem auto;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  font-family: var(--sans-serif-font);
  color: var(--text-dark);
}

.recruit-detail-container h2 {
  font-family: var(--serif-font);
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-green);
}

.recruit-detail-container p {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  color: #555;
}

.recruit-detail-info {
  margin-bottom: 2rem;
}

.recruit-detail-info strong {
  color: var(--primary-green);
}

/* Detail page button */
.recruit-detail-container button {
  background-color: var(--primary-green);
  color: var(--text-light);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.recruit-detail-container button:hover {
  background-color: #004b37;
}

/* Responsive */
@media (max-width: 600px) {
  main {
    padding: 1rem;
  }
  .recruit-detail-container {
    padding: 1.5rem 1rem;
  }
  .card-container {
    gap: 1rem;
  }
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-green);
  margin: 1.5rem 0 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.gradient-underline::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(to right, var(--primary-green), rgba(0, 128, 96, 0.2));
  border-radius: 2px;
}

.section-wrapper {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* --- Disclaimer Modal Styles --- */
.modal-overlay {
  position: fixed;
  z-index: 3000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px); /* Blur the background */
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 1.5rem;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(2px); /* subtle glassmorphism inside */
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--primary-green);
  margin-bottom: 1rem;
}

.modal-section {
  margin-bottom: 1.5rem;
}

.modal-section h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.modal-section ul,
.modal-section ol {
  padding-left: 1.5rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.modal-checkbox {
  display: flex;
  align-items: center;
  margin-top: 1.2rem;
  font-size: 0.95rem;
  color: #333;
}

.modal-checkbox input {
  margin-right: 0.5rem;
}

#close-disclaimer {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  background-color: var(--primary-green);
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#close-disclaimer:hover:not(:disabled) {
  background-color: #2a8c68;
}

#close-disclaimer:disabled {
  background-color: #aaa;
  cursor: not-allowed;
}

.back-btn {
  background-color: var(--primary-green);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease;
}
.back-btn:hover {
  background-color: #2a8c68;
}

.detail-container {
      max-width: 700px;
      margin: auto;
      padding: 1.5rem;
      background: white;
      border-radius: 1rem;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
.position-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
}
.position-detail {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
}
.position-meta {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 2rem;
}
.form-section {
  margin-top: 2rem;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
}
.btn-action {
  background-color: var(--primary-green);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-action:hover {
  background-color: #2a8c68;
}
.form-toggle-btn {
  margin-bottom: 1rem;
}
.hidden {
  display: none;
}

.photo-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.photo-preview-item {
  position: relative;
  width: 100px;
  height: 100px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}
.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-preview-item .remove-btn {
  position: absolute;
  top: 2px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 12px;
  cursor: pointer;
  line-height: 16px;
  text-align: center;
}

#submit-application-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--primary-green);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 1000;
  display: none; /* hidden by default */
}
#submit-application-btn:disabled {
  background-color: #aaa;
  cursor: not-allowed;
}

.floating-submit-button {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #38997b;
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 1000;
}

.btn-submit {
  background-color: var(--primary-green);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.btn-submit:hover {
  background-color: #2a8c68;
}
.btn-submit:active {
  transform: scale(0.98);
}

.btn-cancel {
  background-color: #ccc;
  color: #333;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.btn-cancel:hover {
  background-color: #bbb;
}

/* Responsive Modal Improvements */
@media (max-width: 600px) {
  .modal-content {
    padding: 1.2rem;
    width: 95%;
    max-height: 90vh;
    border-radius: 1rem;
    font-size: 0.95rem;
  }

  .modal-section h3 {
    font-size: 1.1rem;
  }

  .form-group label,
  .form-group input,
  .form-group textarea,
  .modal-select {
    font-size: 0.95rem;
  }

  .modal-buttons {
    flex-direction: column;
    gap: 0.8rem;
    justify-content: center;
    align-items: stretch;
  }

  .btn-submit,
  .btn-cancel {
    width: 100%;
    font-size: 1rem;
  }

  .preview-container .application-preview {
    font-size: 0.9rem;
  }
}

.form-group {
  margin-bottom: 1rem;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}

.input-time-slot {
  flex: 1 1 200px;
  padding: 0.5rem;
  font-size: 1rem;
}
.time-slot-group label {
  font-weight: 500;
}

.position-division {
  font-size: 1rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 1rem;
}

.simple-header .btn-secondary {
  background-color: white;
  color: var(--primary-green);
  font-weight: 600;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.login-form button {
  width: 100%;
  padding: 0.8rem;
  background-color: var(--primary-green);
  color: white;
  font-weight: bold;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-form button:hover {
  background-color: #155d3e;
}