/* ============================================
   TURNERS – Design System (Red/Black Premium)
   ============================================ */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* ── CSS Variables ── */
:root {
  --bg-primary: #0b0b0b;
  --bg-card: rgba(18, 18, 18, 0.9);
  --bg-card-solid: #141414;
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.1);
  --text: #f0f0f0;
  --text-muted: #999;
  --accent: #dc2626;
  --accent-hover: #b91c1c;
  --accent-glow: rgba(220, 38, 38, 0.35);
  --cyan: #9ca3af;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 64px;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.navbar .brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ef4444, #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar .logo-img {
  height: 54px;
  width: auto;
  max-width: 140px;
  cursor: pointer;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  transition: all 0.3s ease;
}
.navbar .logo-img:hover {
  transform: scale(1.08);
  filter: brightness(1.15);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition:
    color var(--transition),
    background var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: var(--bg-glass);
}

.login-button {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
  transition:
    background var(--transition),
    box-shadow var(--transition) !important;
}
.login-button:hover {
  background: var(--accent-hover) !important;
  box-shadow: 0 0 20px var(--accent-glow) !important;
}

.menu-toggle {
  display: none;
  font-size: 1.6rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
}

/* ── Navbar responsive ── */
@media (max-width: 768px) {
  .navbar {
    padding: 10px 16px;
  }
  .menu-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(20px);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-glass);
  }
  .nav-links.show {
    display: flex;
  }
  .nav-links a {
    padding: 12px 24px;
    width: 100%;
    border-radius: 0;
  }
  .navbar .logo-img {
    height: 36px;
  }
}

/* ============================================
   HERO
   ============================================ */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  padding: 80px 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero__content {
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
.hero__media {
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.hero__content h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 0%, #ff4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero__content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 28px;
}

.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__media {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__media img {
  width: 100%;
  max-width: 480px;
  max-height: 320px;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-glass);
}

@media (max-width: 992px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 40px 20px;
    text-align: center;
  }
  .hero__content p {
    margin-left: auto;
    margin-right: auto;
  }
  .hero__cta {
    justify-content: center;
  }
  .hero__media img {
    max-width: 420px;
    max-height: 280px;
  }
}

/* ============================================
   FEATURES (zig-zag sections)
   ============================================ */
.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 60px;
}

.feature {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "text media";
  align-items: center;
  margin-top: 64px;
  opacity: 0;
  transition: none;
}

/* Odd features: slide in from left */
.feature:nth-child(odd) {
  transform: translateX(-90px);
}
/* Even features: slide in from right */
.feature:nth-child(even) {
  transform: translateX(90px);
}

.feature.in-view {
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature .feature__text {
  grid-area: text;
}
.feature .feature__media {
  grid-area: media;
}

.features > .feature:nth-child(even) {
  grid-template-areas: "media text";
}

.feature__text h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}
.feature__text p {
  color: var(--text-muted);
  margin-bottom: 12px;
}
.feature__bullets {
  padding-left: 20px;
  list-style: disc;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.feature__bullets li {
  margin-bottom: 4px;
}
.feature__text .link {
  color: var(--accent);
  font-weight: 600;
  transition: color var(--transition);
}
.feature__text .link:hover {
  color: var(--cyan);
}

.feature__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-glass);
}

@media (min-width: 993px) {
  .feature__media img {
    aspect-ratio: 16/10;
    object-fit: cover;
  }
}

@media (max-width: 992px) {
  .features {
    padding: 0 20px 40px;
  }
  .feature {
    grid-template-columns: 1fr;
    grid-template-areas: "text" "media";
  }
  .features > .feature:nth-child(even) {
    grid-template-areas: "text" "media";
  }
  .feature__media img {
    aspect-ratio: auto;
    object-fit: contain;
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font);
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn-danger:hover {
  background: var(--red);
  color: #fff;
}

.btn-success {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-success:hover {
  background: #16a34a;
  border-color: #16a34a;
}

.btn.sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}
.btn.lg {
  padding: 14px 28px;
  font-size: 1rem;
}

/* ============================================
   GLASS CARD
   ============================================ */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

/* ============================================
   TABLES (modern dark)
   ============================================ */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
thead th {
  text-align: left;
  padding: 12px 14px;
  background: rgba(220, 38, 38, 0.12);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-glass);
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text);
}
tbody tr {
  transition: background var(--transition);
}
tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ============================================
   FORMS (modern dark)
   ============================================ */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

/* Fix dropdown option text (native OS rendering) */
select option {
  background: #fff;
  color: #111;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}
.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 32px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.modal h2 {
  margin-bottom: 20px;
  font-size: 1.3rem;
}
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}
.container h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   UTILITY
   ============================================ */
.muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.text-center {
  text-align: center;
}
.mt-1 {
  margin-top: 1rem;
}
.mt-2 {
  margin-top: 2rem;
}
.gap-12 {
  gap: 12px;
}
.flex-wrap {
  display: flex;
  flex-wrap: wrap;
}

/* ============================================
   BADGE / STATUS
   ============================================ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--orange);
}
.badge-done {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}
.badge-cancel,
.badge-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}
.badge-confirmed {
  background: rgba(156, 163, 175, 0.15);
  color: #d1d5db;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.search-bar input {
  flex: 1;
  max-width: 400px;
}

/* ============================================
   TOAST (custom, replaces Toastify)
   ============================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  animation:
    toastIn 0.3s ease,
    toastOut 0.3s ease 2.7s forwards;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  max-width: 360px;
}
.toast-success {
  background: linear-gradient(135deg, #059669, #22c55e);
}
.toast-error {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}
.toast-info {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes toastOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}
