:root {
  --bg: #f3f6fb;
  --bg-2: #e8eef8;
  --panel: #ffffff;
  --line: rgba(26, 79, 163, 0.14);
  --text: #152238;
  --muted: #5a6d88;
  --gold: #c9922a;
  --gold-deep: #a8761c;
  --gold-soft: #f4e4b8;
  --blue: #1a4fa3;
  --blue-deep: #0d2d66;
  --blue-soft: #d7e4f7;
  --ember: #c4324a;
  --ok: #2f7a45;
  --danger: #c4324a;
  --font-display: "Chakra Petch", sans-serif;
  --font-body: "IBM Plex Sans Thai", sans-serif;
  --radius: 6px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 10px 28px rgba(21, 48, 96, 0.08);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(232, 184, 74, 0.18), transparent 55%),
    radial-gradient(800px 380px at 0% 10%, rgba(26, 79, 163, 0.12), transparent 50%),
    linear-gradient(180deg, #eaf1fa 0%, var(--bg) 35%, #f7f5ef 100%);
  line-height: 1.65;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); }

img { max-width: 100%; height: auto; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(10, 35, 79, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(8, 20, 40, 0.22);
}

.site-header.is-scrolled .brand-name {
  color: #fff;
}

.site-header.is-scrolled .brand-sub {
  color: rgba(255, 255, 255, 0.72);
}

.site-header.is-scrolled .site-nav a {
  color: rgba(255, 255, 255, 0.82);
}

.site-header.is-scrolled .site-nav .ico {
  color: #e8b84a;
}

.site-header.is-scrolled .site-nav a:hover,
.site-header.is-scrolled .site-nav a.is-active {
  color: var(--gold-soft);
  background: rgba(255, 255, 255, 0.1);
}

.site-header.is-scrolled .site-nav a:hover .ico,
.site-header.is-scrolled .site-nav a.is-active .ico {
  color: var(--gold-soft);
}

.site-header.is-scrolled .nav-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.site-header.is-scrolled .nav-toggle span {
  background: #e8b84a;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  min-width: 0;
}

.brand:hover { color: inherit; }

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--blue-soft);
  border: 1px solid rgba(26, 79, 163, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--blue-deep);
  transition: color 0.3s var(--ease);
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
  transition: color 0.3s var(--ease);
}

.site-nav {
  display: flex;
  gap: 0.25rem;
}

.site-nav a {
  color: var(--muted);
  font-weight: 500;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ico {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.ico-sm {
  width: 0.95em;
  height: 0.95em;
}

.ico-inline {
  margin-right: 0.15rem;
}

.ico-title {
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.25rem;
  color: #e8b84a;
}

.site-nav .ico {
  color: var(--blue);
}

.site-nav a.is-active .ico,
.site-nav a:hover .ico {
  color: var(--gold-deep);
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.admin-nav .ico {
  width: 1.15em;
  height: 1.15em;
  opacity: 0.95;
}

.admin-side-email {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.page-hero h1,
.section-head h2,
.admin-main h1,
.admin-card h2,
.contact-list strong,
.contact-panel h2 {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn .ico {
  margin-right: 0.15rem;
}


.site-nav a:hover,
.site-nav a.is-active {
  color: var(--blue-deep);
  background: var(--blue-soft);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--blue);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.site-main {
  position: relative;
  z-index: 1;
  padding-block: 0 3.5rem;
}

/* Hero / Player — solid banner */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 0;
  background: #0a234f;
  border-bottom: 4px solid #c9922a;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: #0a234f;
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 90% at 100% 0%, rgba(26, 79, 163, 0.55), transparent 55%),
    radial-gradient(ellipse 50% 70% at 0% 100%, rgba(201, 146, 42, 0.18), transparent 50%);
  opacity: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-block: 1.6rem 1.85rem;
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.75rem;
  align-items: center;
}

.hero-logo {
  width: clamp(110px, 18vw, 160px);
  height: auto;
  border-radius: 50%;
  background: #0d2d66;
  border: 3px solid #e8b84a;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  grid-row: 1 / span 2;
  animation: riseIn 0.7s var(--ease) both;
}

.hero-copy {
  min-width: 0;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 0.35rem;
  color: #e8b84a;
  animation: riseIn 0.7s var(--ease) both;
}

.hero-lead {
  max-width: 28rem;
  color: #c5d4ea;
  font-size: 1rem;
  margin: 0;
  animation: riseIn 0.7s 0.08s var(--ease) both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.player {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.1rem;
  padding: 0.95rem 1.1rem;
  background: #061832;
  border: 2px solid #e8b84a;
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  max-width: 560px;
  width: 100%;
  grid-column: 2;
  animation: riseIn 0.7s 0.14s var(--ease) both;
  color: #ffffff;
}

.player-art {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e8b84a;
  flex-shrink: 0;
  background: #1a4fa3;
}

.player-art.is-playing {
  animation: spinSlow 14s linear infinite;
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

.player-meta { flex: 1; min-width: 140px; }

.player-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff8fa0;
  font-weight: 600;
}

.player-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
  animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.player-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.1rem 0 0;
  color: #ffffff;
}

.player-status {
  font-size: 0.85rem;
  color: #c5d4ea;
  margin: 0.1rem 0 0;
}

.btn-play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(145deg, var(--gold), var(--gold-deep));
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease), filter 0.25s;
  box-shadow: 0 6px 16px rgba(201, 146, 42, 0.35);
}

.btn-play:hover { transform: scale(1.06); filter: brightness(1.06); }
.btn-play:active { transform: scale(0.97); }
.btn-play svg { width: 22px; height: 22px; }

.eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  opacity: 0;
  transition: opacity 0.3s;
}

.player.is-on .eq { opacity: 1; }

.eq span {
  width: 3px;
  background: #e8b84a;
  border-radius: 2px;
  height: 30%;
  animation: eq 0.8s ease-in-out infinite alternate;
}

.eq span:nth-child(2) { animation-delay: 0.15s; }
.eq span:nth-child(3) { animation-delay: 0.3s; }
.eq span:nth-child(4) { animation-delay: 0.05s; }
.eq span:nth-child(5) { animation-delay: 0.25s; }

@keyframes eq {
  from { height: 25%; }
  to { height: 100%; }
}

/* Sections */
.section {
  padding-block: 2.5rem 1rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0;
  font-weight: 600;
  color: var(--blue-deep);
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  max-width: 36rem;
}

.link-more {
  font-weight: 500;
  white-space: nowrap;
  color: var(--gold-deep);
}

.link-more:hover { color: var(--blue); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.product-card {
  display: block;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(21, 48, 96, 0.05);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.product-card:hover {
  color: inherit;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-card-media {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-2);
  margin-bottom: 0;
}

.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.product-card:hover .product-card-media img {
  transform: scale(1.04);
}

.product-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
  color: #ffffff;
}

.product-card .price {
  color: #e8b84a;
  font-weight: 600;
  margin: 0;
}

.product-card-body {
  background: #0a234f;
  padding: 0.9rem 1rem 1rem;
  border-top: 2px solid #c9922a;
}

.page-hero {
  padding: 1.35rem 1.35rem;
  margin: 1.5rem 0 1.75rem;
  background: #0a234f;
  background-color: #0a234f;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(10, 35, 79, 0.2);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 0.35rem;
  color: #ffffff;
  font-weight: 700;
}

.page-hero p {
  margin: 0;
  color: #e8b84a;
  font-weight: 500;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.product-detail-media {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 1;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.product-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin: 0 0 0.5rem;
  color: var(--blue-deep);
}

.product-detail .price {
  font-size: 1.35rem;
  color: var(--gold-deep);
  font-weight: 600;
  margin: 0 0 1rem;
}

.product-detail .desc {
  color: var(--muted);
  white-space: pre-wrap;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.25rem 1.25rem;
}

.contact-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.2rem;
}

.contact-list li:last-child { border-bottom: 0; }

.contact-list strong {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--blue);
  font-size: 0.95rem;
}

.contact-panel {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(160deg, var(--blue-soft), #fff 55%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-visual {
  margin: 0;
  aspect-ratio: 800 / 560;
  overflow: hidden;
  background: var(--blue-deep);
}

.contact-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.contact-panel h2 {
  font-family: var(--font-display);
  margin: 0;
  padding: 1.15rem 1.35rem 0.35rem;
  font-size: 1.35rem;
  color: var(--blue-deep);
}

.contact-panel p {
  margin: 0;
  padding: 0 1.35rem 1.35rem;
  color: var(--muted);
}

.thumb-preview {
  display: block;
  margin-top: 0.65rem;
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #0a234f;
}

.thumb-contact {
  max-width: 320px;
  aspect-ratio: 800 / 560;
  object-fit: cover;
}

.form-hint {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.empty {
  color: var(--muted);
  padding: 2rem 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.75);
  margin-bottom: 5.5rem;
}

.footer-inner {
  text-align: center;
}

.footer-station {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--blue-deep);
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Floating persistent player */
.float-player {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 80;
  width: min(560px, calc(100% - 1.5rem));
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.7rem 0.85rem;
  background: #0a234f;
  border: 2px solid #e8b84a;
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(8, 28, 61, 0.4);
  color: #fff;
  transition: opacity 0.2s, transform 0.25s ease;
}

.float-player.is-collapsed {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(120%);
}

.float-player.is-disabled {
  opacity: 0.72;
}

.float-player-close {
  position: absolute;
  top: -0.55rem;
  right: -0.45rem;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #e8b84a;
  color: #0a234f;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(8, 28, 61, 0.35);
  padding: 0;
}

.float-player-close svg {
  width: 14px;
  height: 14px;
}

.float-player-close:hover {
  background: #fff;
}

.float-player-art {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e8b84a;
  flex-shrink: 0;
  background: #0d2d66;
}

.float-player-art.is-playing {
  animation: spinSlow 14s linear infinite;
}

.float-player-meta {
  flex: 1;
  min-width: 0;
}

.float-player-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0.1rem 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.float-player-status {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  color: #c5d4ea;
}

.float-player .btn-play {
  width: 46px;
  height: 46px;
}

.float-player .eq {
  margin-top: 0.15rem;
}

.float-player-open {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem 0.4rem 0.4rem;
  border: 2px solid #e8b84a;
  border-radius: 999px;
  background: #0a234f;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(8, 28, 61, 0.4);
}

.float-player-open[hidden] {
  display: none !important;
}

.float-player-open img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e8b84a;
  background: #0d2d66;
}

.float-player-open.is-playing img {
  animation: spinSlow 14s linear infinite;
}

.float-player-open:hover {
  background: #0d2d66;
}

body.has-float-player {
  padding-bottom: 0;
}


/* Admin */
.admin-body {
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
}

.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #0a234f;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 60;
}

.admin-topbar-brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.admin-topbar-sub {
  font-size: 0.78rem;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-nav-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-nav-toggle span {
  display: block;
  height: 2px;
  background: #e8b84a;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.admin-nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.admin-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.admin-nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.admin-side {
  background: linear-gradient(180deg, #0d2d66 0%, #0a234f 55%, #081c3d 100%);
  color: #e8eef8;
  padding: 1.35rem 1rem 1.5rem;
  border-right: 0;
}

.admin-side-head {
  padding: 0.15rem 0.55rem 1rem;
  border-bottom: 1px solid rgba(232, 184, 74, 0.25);
  margin-bottom: 0.85rem;
}

.admin-side .brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #e8b84a;
}

.admin-side .brand-sub {
  color: rgba(232, 238, 248, 0.72);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.admin-nav {
  display: grid;
  gap: 0.4rem;
}

.admin-nav a {
  color: #d7e4f7;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius);
  font-weight: 500;
  border-left: 3px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.admin-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.admin-nav a.nav-dash.is-active,
.admin-nav a.nav-dash:hover { border-left-color: #5b9dff; }
.admin-nav a.nav-settings.is-active,
.admin-nav a.nav-settings:hover { border-left-color: #e8b84a; }
.admin-nav a.nav-contact.is-active,
.admin-nav a.nav-contact:hover { border-left-color: #7ec8ff; }
.admin-nav a.nav-radio.is-active,
.admin-nav a.nav-radio:hover { border-left-color: #5ad1a6; }
.admin-nav a.nav-products.is-active,
.admin-nav a.nav-products:hover { border-left-color: #ff8fa0; }

.admin-nav a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 600;
}

.admin-nav a.nav-logout {
  margin-top: 0.55rem;
  color: #ffc0c8;
  border-left-color: transparent;
  background: rgba(196, 50, 74, 0.18);
}

.admin-nav a.nav-logout:hover {
  background: rgba(196, 50, 74, 0.32);
  color: #fff;
}

.admin-side-email {
  margin: 1.25rem 0.55rem 0;
  font-size: 0.78rem;
  color: rgba(232, 238, 248, 0.65);
  word-break: break-all;
}

.admin-backdrop {
  display: none;
}

.admin-main {
  padding: 1.5rem;
  min-width: 0;
}

.admin-main h1 {
  font-family: var(--font-display);
  margin: 0 0 1.25rem;
  font-size: 1.6rem;
  color: var(--blue-deep);
}

.admin-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  max-width: 720px;
  box-shadow: 0 4px 16px rgba(21, 48, 96, 0.04);
}

.admin-card h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.85rem;
  color: var(--blue-deep);
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.15rem;
  max-width: 960px;
}

.dash-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: 0 6px 18px rgba(21, 48, 96, 0.05);
  border-top: 3px solid var(--blue);
}

.dash-stat-blue { border-top-color: #1a4fa3; }
.dash-stat-green { border-top-color: #2f9e6b; }
.dash-stat-gold { border-top-color: #c9922a; }
.dash-stat-rose { border-top-color: #c4324a; }

.dash-label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dash-value {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--blue-deep);
  line-height: 1.1;
}

.dash-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 960px;
}

.dash-panel {
  max-width: none;
  margin-bottom: 0;
}

.dash-stream-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.45rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.dash-stream-status.is-ready { color: #2f9e6b; }
.dash-stream-status.is-wait { color: #c9922a; }

.dash-stream-url {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  word-break: break-all;
}

.dash-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.dash-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.dash-list li strong { color: var(--gold-deep); }

.form-row { margin-bottom: 1rem; }
.form-row label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: var(--radius);
  font: inherit;
}
.form-row textarea { min-height: 120px; resize: vertical; }
.form-row input[type="checkbox"],
.form-row input[type="radio"],
.form-row input[type="file"] {
  width: auto;
  padding: 0;
}

.form-row-check {
  margin-top: 0.35rem;
}

.check-inline {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  margin: 0.55rem 0 0 !important;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f9fc;
  color: var(--text) !important;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  width: fit-content;
  max-width: 100%;
}

.check-inline input {
  width: 1rem !important;
  height: 1rem;
  margin: 0;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.check-inline span {
  line-height: 1.2;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  border: none;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(145deg, var(--gold), var(--gold-deep));
  color: #fff;
}
.btn:hover { filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-danger {
  background: #8b2e1f;
  color: #fff;
}

.flash {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.flash.ok { background: #e8f6ec; color: #1f5c32; }
.flash.err { background: #fdeceb; color: #8a2433; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.table th,
.table td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table th { color: var(--muted); font-weight: 500; }
.table img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }

.login-box {
  max-width: 400px;
  margin: 10vh auto;
  padding: 1.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-box h1 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  color: var(--blue-deep);
}
.login-back {
  margin: 1.15rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
.login-back .btn {
  width: 100%;
}
.login-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}
.login-tabs button {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  border-radius: var(--radius);
}
.login-tabs button.is-active {
  color: var(--blue-deep);
  border-color: var(--blue);
  background: var(--blue-soft);
}
.auth-panel { display: none; }
.auth-panel.is-active { display: block; }

.login-otp-hint {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.login-otp-ref {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--text);
}

.login-otp-ref strong {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  color: var(--blue-deep);
}

.thumb-favicon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #0a234f;
  padding: 6px;
}

.admin-confirm {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 20, 40, 0.45);
}

.admin-confirm[hidden] {
  display: none !important;
}

.admin-confirm-card {
  width: min(340px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: 0 16px 40px rgba(8, 28, 61, 0.25);
  animation: riseIn 0.25s var(--ease) both;
}

.admin-confirm-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  color: var(--blue-deep);
}

.admin-confirm-text {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.btn-delete-product {
  padding: 0.2rem 0.45rem;
  font-size: 0.85rem;
  color: #c4324a;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.btn-delete-product:hover {
  color: #8b2e1f;
  text-decoration: underline;
}


@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail,
  .contact-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-panels { grid-template-columns: 1fr; }
  .hero-content {
    grid-template-columns: auto 1fr;
  }
}

@media (max-width: 860px) {
  .admin-shell {
    display: block;
    min-height: 100vh;
  }

  .admin-topbar { display: flex; }

  .admin-side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    z-index: 70;
    transform: translateX(-105%);
    transition: transform 0.3s var(--ease);
    box-shadow: 8px 0 28px rgba(8, 28, 61, 0.35);
    overflow-y: auto;
  }

  .admin-side.is-open {
    transform: translateX(0);
  }

  .admin-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(8, 20, 40, 0.45);
    z-index: 65;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
  }

  .admin-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-body.nav-open {
    overflow: hidden;
  }

  .admin-main { padding: 1.1rem; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; margin-left: auto; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    left: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1rem 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.25s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-header.is-scrolled .site-nav {
    background: rgba(10, 35, 79, 0.98);
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  .site-header.is-scrolled .site-nav a {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .site-nav a {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--line);
  }

  .brand-sub { display: none; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 0.9rem; }

  .hero-content {
    grid-template-columns: 1fr;
    padding-block: 1.1rem 1.4rem;
    gap: 0.85rem;
  }

  .hero-logo {
    width: 88px;
    grid-row: auto;
    justify-self: start;
  }

  .player {
    grid-column: 1;
    max-width: none;
  }

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

@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}
