@import url('https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

:root {
  --font-sans: 'Sarabun', 'TH Sarabun New', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-content: 'Sarabun', 'TH Sarabun New', sans-serif;
  --font-cert: 'Sarabun', 'TH Sarabun New', sans-serif;
  --font-cert-elegant: 'Sarabun', 'TH Sarabun New', sans-serif;

  --color-primary: #1a4fba;
  --color-primary-dark: #0f3380;
  --color-primary-light: #e8f0fe;
  --color-secondary: #c99316;
  --color-secondary-light: #fef8eb;
  
  --color-success: #10b981;
  --color-success-bg: #ecfdf5;
  --color-danger: #ef4444;
  --color-danger-bg: #fef2f2;
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;

  --color-bg: #f4f7fb;
  --color-card-bg: #ffffff;
  --color-text-main: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* Header & Navbar */
.navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.brand-text h1 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

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

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: #f1f5f9;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
}

.role-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.role-tag.admin {
  background: #fee2e2;
  color: #b91c1c;
}

.role-tag.teacher {
  background: #e0e7ff;
  color: #4338ca;
}

/* Layout container */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

/* Hero Section (Compact) */
.hero-banner {
  background: linear-gradient(135deg, #0d3b84 0%, #1a56db 60%, #2563eb 100%);
  color: white;
  padding: 1.35rem 1.5rem 1.2rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.hero-banner h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  letter-spacing: -0.2px;
}

.hero-banner p {
  font-size: 0.95rem;
  opacity: 0.92;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.4;
  font-weight: 300;
}

/* Search Box (Compact) */
.search-container {
  max-width: 680px;
  margin: -0.85rem auto 1.35rem auto;
  position: relative;
  z-index: 10;
}

.search-card {
  background: white;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 0.4rem;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-left: 0.75rem;
}

.search-icon {
  color: var(--color-text-muted);
  font-size: 1.25rem;
}

.search-input {
  width: 100%;
  border: none;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--color-text-main);
  outline: none;
  padding: 0.35rem 0;
}

.search-input::placeholder {
  color: #94a3b8;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 2px 4px rgba(26, 79, 186, 0.2);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: white;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-gold {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: white;
  box-shadow: 0 2px 4px rgba(184, 134, 11, 0.3);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #c59b27, #996e05);
  color: white;
}

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

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.stat-icon.blue { background: #eff6ff; color: #2563eb; }
.stat-icon.gold { background: #fefce8; color: #ca8a04; }
.stat-icon.green { background: #ecfdf5; color: #059669; }
.stat-icon.purple { background: #faf5ff; color: #9333ea; }

.stat-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-main);
  line-height: 1.1;
}

.stat-info p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Content Cards */
.card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.card-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-body {
  padding: 1rem;
}

/* Table */
.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.custom-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
  vertical-align: middle;
}

.single-row-table th,
.single-row-table td {
  white-space: nowrap !important;
  padding: 0.35rem 0.65rem !important;
  vertical-align: middle !important;
}

.custom-table tbody tr:hover {
  background: #f8fafc;
}

.cert-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.82rem;
  color: #334155;
  font-weight: 600;
  white-space: nowrap;
}

.recipient-name {
  font-weight: 600;
  color: #1e293b;
  display: block;
}

.cert-title {
  color: var(--color-primary-dark);
  font-weight: 500;
}

.cert-meta {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: var(--color-success-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-danger {
  background: var(--color-danger-bg);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-text-main);
  background: white;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 79, 186, 0.15);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

/* Login Card */
.login-container {
  max-width: 440px;
  margin: 3rem auto;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header img {
  width: 75px;
  height: 75px;
  margin-bottom: 1rem;
}

.login-header h2 {
  font-size: 1.4rem;
  color: var(--color-primary-dark);
  font-weight: 700;
}

.login-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.login-tab {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  word-break: keep-all;
}

.login-tab.active {
  background: white;
  color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.page-link {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: white;
  font-size: 0.85rem;
  color: var(--color-text-main);
}

.page-link:hover {
  background: #f8fafc;
}

.page-link.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Footer */
footer {
  background: white;
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: auto;
}

/* =======================================================
   CERTIFICATE TEMPLATE (A4 Landscape)
   ======================================================= */
.certificate-view-container {
  background: #525659;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cert-toolbar {
  background: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1050px;
  width: 100%;
  justify-content: space-between;
}

.certificate-sheet {
  width: 297mm;
  height: 210mm;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: relative;
  padding: 12mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  color: #1e293b;
  overflow: hidden;
  background-image: radial-gradient(circle at center, #ffffff 60%, #faf8f2 100%);
}

/* Double Golden Border with Ornamental Corners */
.cert-outer-border {
  position: absolute;
  top: 7mm;
  left: 7mm;
  right: 7mm;
  bottom: 7mm;
  border: 3px solid #b8860b;
  pointer-events: none;
}

.cert-inner-border {
  position: absolute;
  top: 9mm;
  left: 9mm;
  right: 9mm;
  bottom: 9mm;
  border: 1px solid #d4af37;
  pointer-events: none;
}

.corner-ornament {
  position: absolute;
  width: 35px;
  height: 35px;
  border-color: #b8860b;
  pointer-events: none;
}

.corner-tl { top: 6mm; left: 6mm; border-top: 5px double #b8860b; border-left: 5px double #b8860b; }
.corner-tr { top: 6mm; right: 6mm; border-top: 5px double #b8860b; border-right: 5px double #b8860b; }
.corner-bl { bottom: 6mm; left: 6mm; border-bottom: 5px double #b8860b; border-left: 5px double #b8860b; }
.corner-br { bottom: 6mm; right: 6mm; border-bottom: 5px double #b8860b; border-right: 5px double #b8860b; }

/* Certificate Content Layout */
.cert-content {
  position: relative;
  z-index: 10;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6mm 10mm 4mm 10mm;
}

.cert-header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cert-school-logo {
  width: 105px;
  height: 105px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.cert-school-name {
  font-family: var(--font-sans);
  font-size: 25pt;
  font-weight: 700;
  color: #0d3b84;
  letter-spacing: 0.5px;
  line-height: 1.25;
  margin-top: 10px;
  margin-bottom: 4px;
}

.cert-school-sub {
  font-family: var(--font-content);
  font-size: 15pt;
  color: #475569;
  font-weight: 400;
  margin-top: 10px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.cert-statement {
  font-family: var(--font-content);
  font-size: 13.5pt;
  font-weight: 700;
  color: #1e293b;
  margin-top: 6px;
  margin-bottom: 0;
  line-height: 1.5;
}

.cert-recipient-name {
  font-family: var(--font-sans);
  font-size: 25pt;
  font-weight: 700;
  color: #0f3380;
  margin: 24px 0;
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-color: #d4af37;
  text-underline-offset: 8px;
}

.cert-activity-title {
  font-family: var(--font-sans);
  font-size: 15.5pt;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 12px 0;
  line-height: 1.45;
}

.cert-description {
  font-family: var(--font-content);
  font-size: 13pt;
  color: #475569;
  max-width: 220mm;
  margin: 8px auto 14px auto;
  line-height: 1.75;
}

.cert-date {
  font-family: var(--font-content);
  font-size: 13pt;
  color: #334155;
  margin-top: 14px;
  line-height: 1.5;
}

.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 15mm;
  margin-top: auto;
}

.cert-verify-qr {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.cert-verify-qr img {
  width: 85px;
  height: 85px;
  border: 1.5px solid #cbd5e1;
  padding: 3px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.cert-verify-text {
  font-size: 8.5pt;
  color: #475569;
  line-height: 1.35;
}

.cert-signer-box {
  text-align: center;
  min-width: 60mm;
}

.cert-signature-space {
  height: 35px;
}

.cert-signer-name {
  font-family: var(--font-sans);
  font-size: 12pt;
  font-weight: 600;
  color: #1e293b;
}

.cert-signer-title {
  font-family: var(--font-content);
  font-size: 10pt;
  color: #64748b;
}

.cert-no-tag {
  font-size: 9pt;
  color: #1e293b;
  font-family: monospace;
  font-weight: 700;
}

/* Color Swatches for Design Toolbar */
.color-swatch {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.color-swatch:hover {
  transform: scale(1.18);
}
.color-swatch.active {
  box-shadow: 0 0 0 3px #38bdf8 !important;
  transform: scale(1.15);
}

/* ==========================================================
   Certificate Themes (Colors)
   ========================================================== */
.cert-theme-blue .cert-school-name { color: #0d3b84; }
.cert-theme-blue .cert-recipient-name { color: #0f3380; text-decoration-color: #d4af37; }

.cert-theme-gold .cert-school-name { color: #854d0e; }
.cert-theme-gold .cert-recipient-name { color: #b45309; text-decoration-color: #b45309; }

.cert-theme-red .cert-school-name { color: #991b1b; }
.cert-theme-red .cert-recipient-name { color: #b91c1c; text-decoration-color: #f87171; }

.cert-theme-green .cert-school-name { color: #065f46; }
.cert-theme-green .cert-recipient-name { color: #047857; text-decoration-color: #34d399; }

.cert-theme-purple .cert-school-name { color: #581c87; }
.cert-theme-purple .cert-recipient-name { color: #6b21a8; text-decoration-color: #c084fc; }

.cert-theme-navy .cert-school-name { color: #0f172a; }
.cert-theme-navy .cert-recipient-name { color: #1e293b; text-decoration-color: #94a3b8; }

/* ==========================================================
   Certificate Border Styles
   ========================================================== */
/* 1. gold-double (Default) */
.cert-border-gold-double .cert-outer-border {
  border: 3px solid #b8860b;
}
.cert-border-gold-double .cert-inner-border {
  border: 1px solid #d4af37;
}

/* 2. gold-single */
.cert-border-gold-single .cert-outer-border {
  border: 3.5px solid #d4af37;
}
.cert-border-gold-single .cert-inner-border {
  display: none !important;
}

/* 3. elegant-navy */
.cert-border-elegant-navy .cert-outer-border {
  border: 4px solid #0f2759;
}
.cert-border-elegant-navy .cert-inner-border {
  border: 1.5px solid #b8860b;
}
.cert-border-elegant-navy .corner-ornament {
  border-color: #0f2759 !important;
}

/* 4. vintage-pattern */
.cert-border-vintage-pattern .cert-outer-border {
  border: 6px double #854d0e;
}
.cert-border-vintage-pattern .cert-inner-border {
  border: 1px dashed #d97706;
}
.cert-border-vintage-pattern .corner-ornament {
  border-color: #854d0e !important;
}

/* 5. royal-red */
.cert-border-royal-red .cert-outer-border {
  border: 4px solid #991b1b;
}
.cert-border-royal-red .cert-inner-border {
  border: 1.5px solid #d4af37;
}
.cert-border-royal-red .corner-ornament {
  border-color: #991b1b !important;
}

/* 6. modern-clean */
.cert-border-modern-clean .cert-outer-border {
  border: 2px solid #2563eb;
  border-radius: 8px;
}
.cert-border-modern-clean .cert-inner-border {
  border: 1px solid #93c5fd;
  border-radius: 4px;
}
.cert-border-modern-clean .corner-ornament {
  display: none !important;
}

/* 7. minimal */
.cert-border-minimal .cert-outer-border {
  border: 1.5px solid #64748b;
}
.cert-border-minimal .cert-inner-border {
  display: none !important;
}
.cert-border-minimal .corner-ornament {
  display: none !important;
}

/* 8. none */
.cert-border-none .cert-outer-border,
.cert-border-none .cert-inner-border,
.cert-border-none .corner-ornament {
  display: none !important;
}

/* Media Query for Print */
@page {
  size: A4 landscape;
  margin: 0;
}

@media print {
  html, body {
    width: 297mm;
    height: 210mm;
    margin: 0;
    padding: 0;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .cert-toolbar, header, footer, .navbar {
    display: none !important;
  }

  .certificate-view-container {
    padding: 0 !important;
    background: white !important;
    min-height: auto !important;
  }

  .certificate-sheet {
    box-shadow: none !important;
    margin: 0 !important;
    page-break-after: always !important;
    page-break-inside: avoid !important;
    width: 297mm !important;
    height: 210mm !important;
    position: relative !important;
  }
}

/* Responsiveness */
@media (max-width: 768px) {
  .hero-banner h2 { font-size: 1.6rem; }
  .hero-banner p { font-size: 0.95rem; }
  .search-card { flex-direction: column; }
  .search-card .btn { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .cert-toolbar { flex-direction: column; gap: 0.5rem; }
}

/* Activity List & Detail Views (Compact) */
.activity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.match-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  margin-top: 0.2rem;
}

.activity-title-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  text-decoration: none;
  display: inline-block;
  line-height: 1.35;
}

.activity-title-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.activity-detail-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  border: 1px solid var(--color-border);
}

.back-btn:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}
