/* CF Club - Mobile-First Modern Design System & Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #059669;
  --primary-hover: #047857;
  --primary-dark: #064e3b;
  --primary-light: #ecfdf5;
  --primary-glow: rgba(16, 185, 129, 0.25);
  
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --accent-dark: #b45309;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-focus: #10b981;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.09);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Hind Siliguri', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-family: 'Outfit', 'Hind Siliguri', sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Notice Ticker Bar */
.notice-bar {
  background: linear-gradient(90deg, #064e3b, #047857);
  color: #ffffff;
  padding: 10px 0;
  font-size: 13.5px;
  border-bottom: 2px solid var(--accent);
}

.notice-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notice-badge {
  background: var(--accent);
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 50px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.notice-text {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* Community Notice Card on Homepage */
.community-notice-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.community-notice-card::before {
  content: "📢";
  position: absolute;
  right: -10px;
  bottom: -10px;
  font-size: 80px;
  opacity: 0.12;
  pointer-events: none;
}

.notice-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.notice-card-title {
  font-size: 17px;
  font-weight: 800;
  color: #92400e;
  margin: 0;
}

.notice-card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #78350f;
}

.notice-card-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 10px var(--primary-glow);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
  margin: 0;
  line-height: 1.1;
}

.brand-text span {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
  color: var(--text-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
}

.nav-link {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-body);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  display: inline-block;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  min-height: 44px; /* Touch target */
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary-dark));
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-dark);
  border-color: var(--border-color);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13.5px;
  min-height: 36px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16.5px;
  font-weight: 700;
  border-radius: var(--radius-lg);
  min-height: 50px;
}

.btn-block {
  width: 100%;
}

/* Hero Section */
.hero-banner {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 60%, #047857 100%);
  color: #ffffff;
  padding: 36px 0 54px 0;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--accent);
}

.hero-banner::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 85% 20%, rgba(16, 185, 129, 0.28) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 16px;
  color: #a7f3d0;
  margin-bottom: 16px;
  font-weight: 500;
}

.hero-quote {
  background: rgba(0, 0, 0, 0.25);
  border-left: 4px solid var(--accent);
  padding: 8px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: #f1f5f9;
}

/* Main Form Card */
.form-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  padding: 32px 28px;
  margin-top: -30px;
  position: relative;
  z-index: 10;
}

/* Sections */
.form-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}

.form-section-header:first-of-type {
  margin-top: 0;
}

.section-num {
  width: 30px;
  height: 30px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.section-title-text {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

/* Form Controls - Mobile Touch Optimized */
.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
}

.input-label .required {
  color: var(--danger);
  margin-left: 2px;
}

.input-control {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-dark);
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  outline: none;
  min-height: 48px; /* Large touch target for mobile thumb */
}

.input-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background-color: #fff;
}

.input-control.is-invalid {
  border-color: var(--danger);
  background-color: #fffaf0;
}

textarea.input-control {
  min-height: 75px;
  resize: vertical;
}

.invalid-feedback {
  font-size: 12px;
  color: var(--danger);
  font-weight: 600;
}

.input-help {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Shift Selector Cards - Touch Friendly */
.shift-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.shift-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: var(--bg-card);
  display: block;
}

.shift-card:hover, .shift-card:active {
  border-color: var(--primary);
}

.shift-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.shift-card input[type="radio"] {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.shift-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
  padding-right: 22px;
}

.shift-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Photo Upload Box with Instant Preview */
.photo-uploader-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.photo-preview-box {
  width: 75px;
  height: 90px;
  border-radius: 8px;
  border: 2px solid var(--primary);
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.photo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Guidelines Box */
.guidelines-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 16px 0;
}

.guidelines-box h4 {
  color: var(--primary-dark);
  font-size: 15px;
  margin-bottom: 10px;
}

.guidelines-list {
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-body);
}

.guidelines-list li {
  margin-bottom: 6px;
}

/* Checkbox Consent - Touch Friendly */
.consent-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  padding: 6px 0;
}

.consent-item input[type="checkbox"] {
  margin-top: 3px;
  width: 22px;
  height: 22px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.consent-text {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.4;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50px;
}

.badge-warning { background: #fef3c7; color: #b45309; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 40px 0 20px 0;
  margin-top: 50px;
  font-size: 13.5px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-brand h3 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 16px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

/* Admin Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background: #064e3b;
  color: #fff;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 0 6px;
}

.admin-brand h2 {
  color: #fff;
  font-size: 17px;
}

.admin-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #a7f3d0;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.admin-nav-link:hover, .admin-nav-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.admin-main {
  flex: 1;
  background: #f8fafc;
  padding: 24px;
  overflow-y: auto;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-dark);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.data-table th {
  background: #f8fafc;
  padding: 10px 14px;
  font-weight: 700;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.data-table tr:hover td {
  background-color: #f8fafc;
}

/* =========================================================
   MOBILE RESPONSIVE RULES (Max Width 768px / Smartphones)
   ========================================================= */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .container {
    padding: 0 12px;
  }

  /* Mobile Navbar */
  .mobile-nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 2px solid var(--primary);
    box-shadow: var(--shadow-xl);
    gap: 8px;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
  }

  /* Hero Section Mobile */
  .hero-banner {
    padding: 24px 0 40px 0;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-subtitle {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .hero-quote {
    font-size: 12px;
  }

  /* Form Card Mobile */
  .form-card {
    padding: 20px 14px;
    border-radius: var(--radius-lg);
    margin-top: -20px;
  }

  /* Convert all grid columns to 12 (Full width on Mobile) */
  .col-8, .col-6, .col-4, .col-3 {
    grid-column: span 12 !important;
  }

  .form-grid {
    gap: 12px;
  }

  /* Shift Grid stacked on mobile */
  .shift-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .shift-card {
    padding: 12px 14px;
  }

  /* Notice Bar Mobile */
  .notice-text {
    font-size: 12px;
  }

  .community-notice-card {
    padding: 16px 14px;
  }

  .notice-card-title {
    font-size: 15.5px;
  }

  .notice-card-list {
    font-size: 13px;
  }

  /* Submit Bar Stacked on Mobile */
  .submit-bar-wrap {
    flex-direction: column-reverse;
    gap: 14px;
    align-items: stretch !important;
    text-align: center;
  }

  .btn-lg {
    width: 100%;
    font-size: 16px;
  }

  /* Stat Grid Stacked on Mobile */
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
  }

  .admin-main {
    padding: 14px;
  }
}
