/* 
 * Tirthbhumi - Jantak Web Portal
 * Strict Color Palette:
 *   #d84315 (Deep Rust / Saffron Orange)
 *   #ffffff (Pure White)
 *   #3e2723 (Dark Earthy Brown)
 */

:root {
  --primary: #d84315;
  --primary-rgb: 216, 67, 21;
  --white: #ffffff;
  --white-rgb: 255, 255, 255;
  --dark: #3e2723;
  --dark-rgb: 62, 39, 35;

  --bg-main: #ffffff;
  --text-main: #3e2723;
  --border-subtle: rgba(62, 39, 35, 0.15);
  --border-strong: #d84315;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(62, 39, 35, 0.08);
  --shadow-md: 0 8px 24px rgba(62, 39, 35, 0.12);
  --shadow-lg: 0 16px 36px rgba(62, 39, 35, 0.16);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  background-color: #ffffff;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background subtle aura strictly using allowed colors */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 10% 20%, rgba(216, 67, 21, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(62, 39, 35, 0.04) 0%, transparent 40%);
  pointer-events: none;
  z-index: -1;
}

/* Main Container - Mobile First (max 720px for high focus and readability) */
.app-container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
  flex: 1;
}

/* Top Navigation Bar */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.nav-brand span {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.btn-nav {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

/* Header Section with Title Asset */
.header-hero {
  text-align: center;
  margin-bottom: 24px;
}

.title-img-wrapper {
  max-width: 320px;
  margin: 0 auto 12px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.title-img {
  width: 100%;
  max-height: 90px;
  object-fit: contain;
  display: block;
}

.sub-tagline {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.spiritual-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(216, 67, 21, 0.08);
  border: 1px solid var(--primary);
  color: var(--dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 8px;
}

/* Opportunity Showcase Card */
.card {
  background: var(--white);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-primary-accent {
  border-top: 4px solid var(--primary);
}

.opportunity-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.form-icon-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(216, 67, 21, 0.05);
  border-radius: var(--radius-sm);
  padding: 6px;
  border: 1px solid rgba(216, 67, 21, 0.2);
}

.opp-title-area h1, .opp-title-area h2 {
  font-size: 1.25rem;
  color: var(--dark);
  font-weight: 800;
  line-height: 1.3;
}

.opp-subtitle {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
}

/* Devotional Note Box */
.devotional-note {
  background: rgba(216, 67, 21, 0.05);
  border-left: 3.5px solid var(--primary);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 18px;
  font-size: 0.88rem;
  color: var(--dark);
}

.devotional-note strong {
  color: var(--primary);
}

/* Work details & rewards grid */
.work-details-section {
  margin-bottom: 18px;
}

.section-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label svg {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

.work-criteria-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.work-criteria-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--dark);
}

.work-criteria-list li svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 3px;
}

/* Reward Tiers Grid */
.reward-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 480px) {
  .reward-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.reward-tier {
  background: var(--white);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.reward-tier.featured {
  border-color: var(--primary);
  background: rgba(216, 67, 21, 0.03);
}

.reward-tier.featured::before {
  content: "RECOMMENDED";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 0;
}

.reward-tier.featured {
  padding-top: 18px;
}

.tier-amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 2px;
}

.tier-condition {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
}

.tier-sub {
  font-size: 0.7rem;
  color: rgba(62, 39, 35, 0.75);
  margin-top: 4px;
}

/* Form Styles */
.form-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.form-label .req {
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--dark);
  background: var(--white);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(216, 67, 21, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

.phone-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.phone-prefix {
  position: absolute;
  left: 12px;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.92rem;
  pointer-events: none;
}

.phone-input-wrap input {
  padding-left: 54px;
}

/* Checkbox confirmation */
.checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0;
  cursor: pointer;
  user-select: none;
}

.checkbox-wrap input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--dark);
  border-radius: 4px;
  outline: none;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: var(--transition);
  background: var(--white);
}

.checkbox-wrap input[type="checkbox"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkbox-wrap input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  font-size: 0.85rem;
  color: var(--dark);
  line-height: 1.4;
}

.checkbox-text strong {
  color: var(--primary);
}

/* Buttons */
.btn-submit {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(216, 67, 21, 0.25);
}

.btn-submit:hover:not(:disabled) {
  background: var(--dark);
  box-shadow: 0 6px 16px rgba(62, 39, 35, 0.3);
}

.btn-submit:disabled {
  background: rgba(62, 39, 35, 0.2);
  color: rgba(62, 39, 35, 0.6);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: var(--white);
  color: var(--dark);
  border: 1.5px solid var(--dark);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--dark);
  color: var(--white);
}

.btn-danger-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-danger-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

.btn-submit.loading .spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Applicant Dashboard / Status Page (Mobile-first) */
.dashboard-view {
  display: none;
}

.welcome-banner {
  background: rgba(216, 67, 21, 0.05);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
}

.welcome-banner h2 {
  font-size: 1.25rem;
  color: var(--dark);
  font-weight: 800;
}

.welcome-banner p {
  font-size: 0.86rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 2px;
}

/* Status Banner Badges */
.status-card {
  text-align: center;
  padding: 20px 16px;
  margin-bottom: 20px;
}

.status-badge-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.status-badge-lg.pending {
  background: var(--white);
  border: 2px solid var(--dark);
  color: var(--dark);
}

.status-badge-lg.accepted {
  background: var(--primary);
  color: var(--white);
  border: 2px solid var(--primary);
}

.status-badge-lg.declined {
  background: var(--dark);
  color: var(--white);
  border: 2px solid var(--dark);
}

.status-explanation {
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 12px;
}

/* Admin Remark Box */
.admin-remark-box {
  background: var(--white);
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 14px;
  text-align: left;
}

.admin-remark-box .remark-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-remark-box .remark-content {
  font-size: 0.9rem;
  color: var(--dark);
  font-weight: 500;
  line-height: 1.5;
}

/* User Info Summary Table */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.86rem;
}

.info-table tr {
  border-bottom: 1px solid var(--border-subtle);
}

.info-table tr:last-child {
  border-bottom: none;
}

.info-table td {
  padding: 10px 6px;
  color: var(--dark);
}

.info-table td.label {
  font-weight: 700;
  width: 38%;
  color: var(--primary);
}

/* Upcoming Opportunities / Guidelines */
.opportunity-box {
  background: rgba(62, 39, 35, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 14px;
}

.opportunity-box h4 {
  font-size: 0.92rem;
  color: var(--dark);
  font-weight: 800;
  margin-bottom: 8px;
}

.opportunity-box p {
  font-size: 0.82rem;
  color: var(--dark);
  line-height: 1.5;
  margin-bottom: 8px;
}

.dashboard-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.dashboard-actions .btn-secondary,
.dashboard-actions .btn-danger-outline {
  flex: 1;
}

/* Modals & Popups */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(62, 39, 35, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--white);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  max-width: 460px;
  width: 100%;
  padding: 24px 20px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  position: relative;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-icon {
  width: 60px;
  height: 60px;
  background: rgba(216, 67, 21, 0.1);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Credentials Box in Modal */
.credentials-box {
  background: rgba(216, 67, 21, 0.05);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
  text-align: left;
}

.cred-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.88rem;
  border-bottom: 1px dashed rgba(216, 67, 21, 0.2);
}

.cred-row:last-child {
  border-bottom: none;
}

.cred-label {
  font-weight: 700;
  color: var(--dark);
}

.cred-val {
  font-weight: 800;
  color: var(--primary);
  font-family: monospace;
  font-size: 0.95rem;
}

/* Countdown bar & timer */
.timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.timer-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(216, 67, 21, 0.1);
  padding: 4px 12px;
  border-radius: 50px;
}

.timer-bar-wrap {
  width: 100%;
  height: 5px;
  background: rgba(62, 39, 35, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.timer-bar {
  width: 100%;
  height: 100%;
  background: var(--primary);
  transition: width 1s linear;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-actions button, .modal-actions a {
  flex: 1;
}

/* Toast Notification (Loadless instant feedback) */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--dark);
  color: var(--white);
  border: 1.5px solid var(--primary);
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Admin Styles (Mobile-first) */
.admin-badge-count {
  background: var(--primary);
  color: var(--white);
  border-radius: 50px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 800;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

@media (max-width: 500px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: var(--white);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.stat-card:hover, .stat-card.active {
  border-color: var(--primary);
  background: rgba(216, 67, 21, 0.04);
}

.stat-card .num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.stat-card .lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--dark);
  text-transform: uppercase;
}

.search-bar-wrap {
  margin-bottom: 16px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  font-size: 0.9rem;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--dark);
}

.search-input:focus {
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
}

/* Application item cards in Admin */
.applicant-card {
  background: var(--white);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.applicant-card:hover {
  border-color: rgba(216, 67, 21, 0.4);
}

.app-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 8px;
}

.app-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark);
}

.app-card-meta {
  font-size: 0.78rem;
  color: rgba(62, 39, 35, 0.7);
  margin-bottom: 8px;
}

.app-card-exp {
  font-size: 0.85rem;
  color: var(--dark);
  background: rgba(62, 39, 35, 0.03);
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 2.5px solid var(--primary);
  margin-bottom: 10px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.app-card-remark {
  font-size: 0.82rem;
  color: var(--dark);
  background: rgba(216, 67, 21, 0.05);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px dashed var(--primary);
  margin-bottom: 10px;
}

.app-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.app-card-actions button, .app-card-actions a {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.btn-accept {
  background: var(--primary);
  color: var(--white);
  border: none;
}

.btn-accept:hover {
  background: var(--dark);
}

.btn-decline {
  background: var(--white);
  color: var(--dark);
  border: 1.5px solid var(--dark);
}

.btn-decline:hover {
  background: var(--dark);
  color: var(--white);
}

.btn-contact {
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-contact:hover {
  background: var(--primary);
  color: var(--white);
}

/* Site Footer */
.site-footer {
  text-align: center;
  padding: 24px 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--white);
  margin-top: auto;
  font-size: 0.88rem;
  color: var(--dark);
}

.footer-link-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  color: var(--dark);
}

.footer-link {
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--dark);
  text-decoration: underline;
}

.footer-link svg {
  width: 14px;
  height: 14px;
}

.footer-admin-link {
  display: block;
  font-size: 0.75rem;
  color: rgba(62, 39, 35, 0.6);
  margin-top: 8px;
  text-decoration: none;
  transition: var(--transition);
}

.footer-admin-link:hover {
  color: var(--primary);
}
