/* ===== Iraq Camping Design System ===== */
:root {
  color-scheme: light;
  --primary: #d97706;
  --primary-hover: #b15f00;
  --secondary: #78350f;
  --surface: #ffffff;
  --bg-sand: #fef3c7;
  --text: #121c2a;
  --text-muted: #554336;
  --outline: #dbc2b0;
}

html {
  font-family: 'Cairo', 'IBM Plex Sans', sans-serif;
  scroll-behavior: smooth;
  background: var(--bg-sand);
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #fef3c7 0%, #f8f9ff 60%, #ffffff 100%);
  color: var(--text);
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-overflow-scrolling: touch;
}

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

button, input, textarea, select {
  font: inherit;
}

main {
  padding: 1.5rem 1rem 4rem;
}

/* ===== Cards ===== */
.card {
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid rgba(219, 194, 176, 0.4);
  box-shadow: 0 2px 8px rgba(120, 53, 15, 0.06);
  padding: 1.5rem;
}

.shadow-soft {
  box-shadow: 0 4px 16px rgba(120, 53, 15, 0.08);
}

/* ===== Input Fields ===== */
input:not([type="file"]), textarea, select {
  border-radius: 0.75rem;
  border: 1.5px solid rgba(219, 194, 176, 0.6);
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
  outline: none;
}

/* ===== Navbar ===== */
.desktop-nav { display: flex; }
.mobile-hamburger { display: none; }

@media (max-width: 639px) {
  .desktop-nav { display: none; }
  .mobile-hamburger { display: block; }
}

/* ===== Footer Grid ===== */
.footer-grid { display: grid; }

/* ===== Admin Layout ===== */
.admin-layout { display: grid; }
@media (min-width: 1024px) {
  .admin-layout { grid-template-columns: 220px 1fr; }
}

/* ===== Table Wrapper ===== */
.table-wrapper { overflow-x: auto; }

/* ===== Responsive ===== */
@media (max-width: 480px) {
  html { font-size: 14px; }
  main { padding: 1rem 0.75rem 3rem; }
  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.25rem !important; }
  h3 { font-size: 1.125rem !important; }
  p, li, div:not([class*="absolute"]):not([class*="fixed"]) { font-size: 0.9375rem; }
  input, textarea, select { font-size: 0.9375rem; padding: 0.5rem 0.75rem; }
  .card { padding: 1rem !important; border-radius: 0.875rem; }
  table { font-size: 0.8125rem; }
  button:not([class*="icon"]) { min-height: 40px; font-size: 0.875rem; padding: 0.5rem 1rem; }

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

@media (min-width: 481px) and (max-width: 767px) {
  html { font-size: 15px; }
  main { padding: 1.25rem 1rem 3.5rem; }
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Animations ===== */
@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* ===== Modal Overlay ===== */
.modal-overlay {
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-content {
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== Pagination ===== */
.hidden-paginated { display: none !important; }

/* ===== Card Menu (3-dot) ===== */
.card-menu-container {
  position: relative;
}
.card-menu {
  min-width: 150px;
}
.card-menu button,
.card-menu form button {
  font-size: 0.875rem;
}

/* ===== File Input Styling ===== */
input[type="file"] {
  cursor: pointer;
}
input[type="file"]::file-selector-button {
  border-radius: 1rem;
  border: none;
  padding: 0.5rem 1rem;
  margin-left: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8125rem;
}

/* ===== Responsive table → card ===== */
@media (max-width: 639px) {
  .admin-layout table { display: none; }
}
