/* =========================================================
   Vocabulary Online System Theme
   วางท้าย output.css หรือแยกไฟล์แล้ว <link> เพิ่มในแต่ละหน้า
========================================================= */

.vocab-page {
  background: #fbfff2;
  color: #14532d;
}

.vocab-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.vocab-hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 48px;
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.34), transparent 32%),
    linear-gradient(135deg, #14532d 0%, #15803d 62%, #eab308 100%);
  color: #ffffff;
}

.vocab-hero::after {
  content: "VOCABULARY";
  position: absolute;
  right: -20px;
  bottom: -28px;
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.vocab-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 24px;
  align-items: center;
}

.vocab-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(254, 249, 195, 0.18);
  color: #fef9c3;
  font-weight: 900;
  border: 1px solid rgba(254, 249, 195, 0.28);
}

.vocab-title {
  margin-top: 14px;
  font-size: clamp(2.05rem, 4vw, 4rem);
  line-height: 1.08;
  font-weight: 900;
}

.vocab-subtitle {
  margin-top: 14px;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.75;
}

.vocab-hero-card {
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 24px 60px rgba(20, 83, 45, 0.24);
  backdrop-filter: blur(10px);
}

.vocab-hero-card strong {
  display: block;
  color: #fef08a;
  font-size: 2.2rem;
  font-weight: 900;
}

.vocab-hero-card span {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
}

.vocab-toolbar {
  margin-top: -24px;
  position: relative;
  z-index: 4;
}

.vocab-filter-card {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr 0.85fr auto;
  gap: 12px;
  padding: 18px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(21, 128, 61, 0.16);
  box-shadow: 0 18px 45px rgba(20, 83, 45, 0.12);
}

.vocab-input,
.vocab-select {
  min-height: 46px;
  width: 100%;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(21, 128, 61, 0.18);
  background: #f7fee7;
  color: #14532d;
  font-weight: 700;
  outline: none;
}

.vocab-input:focus,
.vocab-select:focus {
  border-color: #facc15;
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.22);
}

.vocab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  background: #15803d;
  color: #ffffff;
  font-weight: 900;
  transition: 0.2s ease;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.vocab-btn:hover {
  background: #14532d;
  transform: translateY(-1px);
}

.vocab-btn-yellow {
  background: #facc15;
  color: #14532d;
}

.vocab-btn-yellow:hover {
  background: #fef08a;
}

.vocab-btn-outline {
  background: #ffffff;
  color: #15803d;
  border: 1px solid rgba(21, 128, 61, 0.25);
}

.vocab-btn-danger {
  background: #dc2626;
  color: #ffffff;
}

.vocab-section {
  padding: 42px 0 64px;
}

.vocab-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.vocab-section-title {
  color: #14532d;
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
  font-weight: 900;
}

.vocab-section-desc {
  margin-top: 4px;
  color: #64748b;
  font-size: 1.05rem;
}

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.vocab-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 20px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(21, 128, 61, 0.16);
  box-shadow: 0 16px 42px rgba(20, 83, 45, 0.09);
}

.vocab-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, #14532d, #15803d, #facc15);
}

.vocab-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.vocab-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid rgba(21, 128, 61, 0.14);
  font-size: 0.84rem;
  font-weight: 900;
}

.vocab-badge-yellow {
  background: #fef9c3;
  color: #854d0e;
  border-color: rgba(234, 179, 8, 0.25);
}

.vocab-card-title {
  color: #14532d;
  font-size: 1.38rem;
  line-height: 1.35;
  font-weight: 900;
}

.vocab-card-desc {
  margin-top: 8px;
  color: #475569;
  font-size: 1rem;
  line-height: 1.65;
}

.vocab-card-meta {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  color: #64748b;
  font-weight: 700;
}

.vocab-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.vocab-view-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #166534;
  font-weight: 900;
}

.vocab-empty {
  padding: 34px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px dashed rgba(21, 128, 61, 0.28);
  color: #64748b;
  text-align: center;
  font-weight: 800;
}

.vocab-login-wrap {
  min-height: 68vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px 16px;
  background: linear-gradient(135deg, #f0fdf4, #fefce8);
}

.vocab-login-card,
.vocab-admin-card {
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(21, 128, 61, 0.16);
  box-shadow: 0 22px 60px rgba(20, 83, 45, 0.12);
}

.vocab-admin-page {
  background: #fbfff2;
}

.vocab-admin-layout {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 22px;
  padding: 38px 0 64px;
}

.vocab-admin-card {
  width: 100%;
}

.vocab-form-grid {
  display: grid;
  gap: 12px;
}

.vocab-form-label {
  display: grid;
  gap: 6px;
  color: #14532d;
  font-weight: 900;
}

.vocab-textarea {
  min-height: 110px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(21, 128, 61, 0.18);
  background: #f7fee7;
  color: #14532d;
  font-weight: 700;
  resize: vertical;
}

.vocab-table-card {
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(21, 128, 61, 0.16);
  box-shadow: 0 16px 42px rgba(20, 83, 45, 0.09);
}

.vocab-table-wrap {
  overflow-x: auto;
}

.vocab-admin-table {
  width: 100%;
  border-collapse: collapse;
}

.vocab-admin-table th,
.vocab-admin-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(21, 128, 61, 0.12);
  text-align: left;
  vertical-align: top;
}

.vocab-admin-table th {
  background: #f0fdf4;
  color: #14532d;
  font-weight: 900;
}

.vocab-alert {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 900;
}

.vocab-alert-success {
  background: #dcfce7;
  color: #166534;
}

.vocab-alert-error {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 1100px) {
  .vocab-hero-grid,
  .vocab-admin-layout {
    grid-template-columns: 1fr;
  }

  .vocab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vocab-filter-card {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .vocab-hero {
    padding: 42px 0 36px;
  }

  .vocab-grid,
  .vocab-filter-card {
    grid-template-columns: 1fr;
  }

  .vocab-section-header,
  .vocab-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
