/* RandomKind V2 Design System — single consolidated stylesheet
   (tokens + base + components + responsive). Every page links this
   instead of writing its own <style> block, so there is one visual
   source of truth across Public + Admin. */

:root {
  --rk-bg: #f4f8f8;
  --rk-surface: #ffffff;

  --rk-text: #173042;
  --rk-text-muted: #6d7c88;

  --rk-green: #1fa66a;
  --rk-green-dark: #108252;
  --rk-green-soft: #dff6ec;

  --rk-blue: #2f7df6;
  --rk-blue-soft: #e8f1ff;

  --rk-orange: #ff9d34;
  --rk-orange-soft: #fff1dd;

  --rk-pink: #ee5a7b;
  --rk-pink-soft: #ffe9ee;

  --rk-red: #e0495a;
  --rk-red-soft: #fde7e9;
  --rk-grey: #8a97a1;
  --rk-grey-soft: #eef1f3;

  --rk-border: #dfe8ec;

  --rk-radius-sm: 10px;
  --rk-radius-md: 14px;
  --rk-radius-lg: 18px;
  --rk-radius-xl: 24px;

  --rk-shadow: 0 12px 30px rgba(23, 48, 66, 0.08);
  --rk-shadow-hover: 0 16px 36px rgba(23, 48, 66, 0.13);

  --rk-container: 1440px;
}

/* ============ base ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--rk-bg);
  color: var(--rk-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", "PingFang HK", "Noto Sans TC", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: "LXGW WenKai TC", "Noto Sans TC", serif; margin: 0; }
img { max-width: 100%; display: block; }

.rk-container {
  width: min(100% - 36px, var(--rk-container));
  margin-inline: auto;
}

.rk-section { padding: 72px 0; }
.rk-section-title { font-size: clamp(28px, 3vw, 42px); margin-bottom: 8px; font-weight: 700; }
.rk-section-subtitle { color: var(--rk-text-muted); max-width: 720px; font-size: 16px; }
.rk-section-head { margin-bottom: 36px; }

/* ============ header / nav ============ */
.rk-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rk-border);
}
.rk-nav a { color: var(--rk-text); font-weight: 600; font-size: 14px; }
.rk-nav a:hover { color: var(--rk-green); }
.rk-nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--rk-green); color: white;
  border-radius: 999px; padding: 11px 20px;
  font-weight: 700; font-size: 14px;
}
.rk-nav-cta:hover { background: var(--rk-green-dark); color: white; }

/* ============ buttons ============ */
.rk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 11px; padding: 12px 18px; font-weight: 700; font-size: 15px;
  cursor: pointer; white-space: nowrap; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.rk-btn-primary { background: var(--rk-green); color: white; border-color: var(--rk-green); }
.rk-btn-primary:hover { background: var(--rk-green-dark); transform: translateY(-1px); color: white; }
.rk-btn-secondary { background: white; color: var(--rk-text); border: 1px solid var(--rk-border); }
.rk-btn-secondary:hover { border-color: var(--rk-green); color: var(--rk-green); }
.rk-btn-block { width: 100%; }

/* ============ cards ============ */
.rk-card {
  background: white;
  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius-lg);
  box-shadow: var(--rk-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.rk-card-hover:hover { transform: translateY(-3px); box-shadow: var(--rk-shadow-hover); }
.rk-card-body { padding: 20px; }

/* ============ hero ============ */
.rk-hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  min-height: 460px;
  border-radius: var(--rk-radius-xl);
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 20%, rgba(31,166,106,.18), transparent 28%),
    linear-gradient(135deg, #ffffff, #eefaf5);
}
.rk-hero-content { padding: 56px 56px 56px 0; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.rk-hero h1 { font-size: clamp(38px, 4.6vw, 62px); line-height: 1.06; letter-spacing: -0.03em; }
.rk-hero p { max-width: 620px; color: var(--rk-text-muted); font-size: 18px; margin: 0; }
.rk-hero-visual { display: flex; align-items: center; justify-content: center; padding: 40px; }

/* ============ impact ============ */
.rk-impact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rk-impact-number { font-size: 32px; font-weight: 800; color: var(--rk-green-dark); }
.rk-impact-label { font-size: 14px; color: var(--rk-text-muted); margin-top: 4px; }
.rk-impact-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }

/* ============ service / grid cards ============ */
.rk-grid { display: grid; gap: 16px; }
.rk-service-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.rk-service-grid > * { min-width:0; overflow-wrap:anywhere; }
.rk-service-icon { width: 48px; height: 48px; background: var(--rk-green-soft); border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--rk-green-dark); margin-bottom: 14px; }

/* ============ shop product card ============ */
.rk-product-card { display: flex; flex-direction: column; gap: 12px; }
.rk-product-image {
  aspect-ratio: 1 / 1; border-radius: var(--rk-radius-md);
  background: #f1f7f4; display: flex; align-items: center; justify-content: center;
}
.rk-price { font-size: 23px; font-weight: 800; color: var(--rk-green-dark); }

/* ============ B2B section ============ */
.rk-b2b-section { background: linear-gradient(135deg, #edf9f4, #eef5ff); border-radius: var(--rk-radius-xl); }
.rk-b2b-icon { width: 48px; height: 48px; background: white; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--rk-blue); box-shadow: var(--rk-shadow); margin-bottom: 14px; }

/* ============ partner grid ============ */
.rk-partner-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 12px; }
.rk-partner-card {
  background: white; border: 1px solid var(--rk-border); border-radius: var(--rk-radius-md);
  min-height: 110px; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center;
}

/* ============ forms ============ */
.rk-field { display: flex; flex-direction: column; gap: 6px; }
.rk-field label { font-size: 13px; font-weight: 700; color: var(--rk-text); }
.rk-field input, .rk-field select, .rk-field textarea {
  width: 100%; background: white; border: 1px solid #ccd9df; border-radius: 10px;
  padding: 12px 14px; font-family: inherit; font-size: 14px; color: var(--rk-text);
}
.rk-field input:focus, .rk-field select:focus, .rk-field textarea:focus {
  outline: none; border-color: var(--rk-green); box-shadow: 0 0 0 3px rgba(31,166,106,.12);
}
.rk-field-opt { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--rk-text); }
.rk-field-opt input { width: 18px; height: 18px; accent-color: var(--rk-green); }

/* ============ multi-step ============ */
.rk-steps { display: flex; align-items: center; gap: 8px; }
.rk-step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--rk-grey); }
.rk-step-dot { width: 26px; height: 26px; border-radius: 999px; background: var(--rk-grey-soft); color: var(--rk-grey); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.rk-step.active { color: var(--rk-green-dark); }
.rk-step.active .rk-step-dot { background: var(--rk-green-soft); color: var(--rk-green-dark); }
.rk-step.done .rk-step-dot { background: var(--rk-green); color: white; }
.rk-step-line { flex: 1; height: 2px; background: var(--rk-border); min-width: 20px; }

/* ============ badges ============ */
.rk-badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.rk-badge-green { background: var(--rk-green-soft); color: var(--rk-green-dark); }
.rk-badge-orange { background: var(--rk-orange-soft); color: #a6631a; }
.rk-badge-blue { background: var(--rk-blue-soft); color: #1c56b3; }
.rk-badge-red { background: var(--rk-red-soft); color: #a5303d; }
.rk-badge-grey { background: var(--rk-grey-soft); color: var(--rk-text-muted); }

/* ============ empty state / alert ============ */
.rk-empty-state { text-align: center; padding: 40px 20px; color: var(--rk-text-muted); font-size: 14px; }
.rk-alert { border-radius: var(--rk-radius-md); padding: 16px 18px; font-size: 14px; display: flex; gap: 12px; align-items: flex-start; }

/* ============ footer ============ */
.rk-footer { background: #102536; color: #dce7ec; }
.rk-footer a { color: #aebfc9; font-size: 13px; }
.rk-footer a:hover { color: white; }
.rk-footer-title { color: white; font-weight: 700; font-size: 13px; margin-bottom: 12px; display: block; }

/* ============ admin shell ============ */
.rk-admin-shell { display: flex; width: 100%; min-height: 100vh; }
.rk-admin-sidebar { width: 250px; flex-shrink: 0; background: #102536; color: #c7d2d9; display: flex; flex-direction: column; padding: 22px 14px; }
.rk-admin-nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 12px; font-size: 14px; color: #97a7b1; }
.rk-admin-nav-item.active { background: #1f4765; color: white; font-weight: 700; }
.rk-admin-main { flex: 1; min-width: 0; background: #eef3f5; min-height: 100vh; display: flex; flex-direction: column; }
.rk-admin-topbar { height: 64px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; background: white; border-bottom: 1px solid var(--rk-border); }
.rk-admin-workspace { flex: 1; padding: 24px 32px; overflow: auto; }
.rk-admin-card { background: white; border: 1px solid var(--rk-border); border-radius: 15px; }
.rk-admin-topbar-toggle { display: none; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; flex-shrink: 0; }
.rk-admin-sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(16,37,54,.5); z-index: 190; }
.rk-admin-sidebar-backdrop.open { display: block; }

.rk-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }

.rk-kpi { border-radius: var(--rk-radius-lg); padding: 20px; color: white; }
.kpi-blue { background: linear-gradient(135deg, #4f8ef7, #2f7df6); }
.kpi-green { background: linear-gradient(135deg, #34c98a, #1fa66a); }
.kpi-orange { background: linear-gradient(135deg, #ffb459, #ff9d34); }
.kpi-pink { background: linear-gradient(135deg, #f27b95, #ee5a7b); }

/* ============ admin table ============ */
.rk-table { width: 100%; border-collapse: collapse; }
.rk-table th { text-align: left; font-size: 12px; color: #71818b; font-weight: 700; padding: 12px 14px; border-bottom: 1px solid #edf1f3; }
.rk-table td { padding: 12px 14px; border-bottom: 1px solid #edf1f3; font-size: 13px; vertical-align: middle; }
.rk-table tbody tr:hover { background: #f8fbfc; }

/* ============ kanban ============ */
.rk-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: 260px; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.rk-kanban-lane { background: #eef1f3; border-radius: var(--rk-radius-md); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.rk-kanban-lane-title { font-size: 12px; font-weight: 700; color: var(--rk-text-muted); letter-spacing: .04em; padding: 0 4px; }
.rk-kanban-card { background: white; border: 1px solid var(--rk-border); border-radius: 10px; padding: 12px; font-size: 13px; box-shadow: var(--rk-shadow); }

/* ============ responsive ============ */
@media (max-width: 1200px) {
  .rk-service-grid { grid-template-columns: repeat(3,1fr); }
  .rk-impact-grid { grid-template-columns: repeat(2,1fr); }
  .rk-partner-grid { grid-template-columns: repeat(4,1fr); }
}
@media (max-width: 992px) {
  .rk-hero { grid-template-columns: 1fr; min-height: unset; }
  .rk-hero-content { padding: 40px 28px; }
  .rk-hero-visual { padding: 0 28px 32px; }
  .rk-service-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .rk-partner-grid { grid-template-columns: repeat(3,1fr); }
  .rk-admin-sidebar { position: fixed; left: -260px; top: 0; bottom: 0; z-index: 200; transition: left .2s ease; }
  .rk-admin-sidebar.open { left: 0 !important; }
  .rk-admin-topbar-toggle { display: flex; }
  .rk-admin-topbar { padding: 0 16px; }
  .rk-admin-workspace { padding: 18px 16px; }
  .rk-kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .rk-section { padding: 44px 0; }
  .rk-service-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .rk-impact-grid { grid-template-columns: 1fr 1fr; }
  .rk-partner-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 480px) {
  .rk-service-grid, .rk-impact-grid, .rk-partner-grid { grid-template-columns: minmax(0,1fr) !important; }
  .rk-kpi-grid { grid-template-columns: 1fr; }
}

/* Preserve the native hidden attribute across styled cards and fields. */
[hidden] { display:none !important; }
.rk-live-select { width:100%;padding:10px;border:1px solid var(--rk-border);border-radius:8px;font:inherit;margin:6px 0 14px; }

.rk-whatsapp-contact{position:fixed;right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));z-index:80;display:inline-flex;align-items:center;gap:9px;min-height:52px;padding:12px 18px;border-radius:999px;background:#147d42;color:#fff!important;text-decoration:none!important;font:700 15px/1.2 system-ui,sans-serif;box-shadow:0 5px 20px #123b2930;border:2px solid #fff}.rk-whatsapp-contact:hover{background:#0d6333}.rk-whatsapp-contact:focus-visible{outline:3px solid #d39b28;outline-offset:4px}.rk-whatsapp-contact svg{flex:none}@media(max-width:600px){.rk-whatsapp-contact{right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));padding:11px 14px;font-size:14px;min-height:48px}}
