/**
 * REDATUM Dashboard — critical CSS when Tailwind CDN is blocked or slow.
 * Keeps layout, visibility (.hidden), and Business Admin readable without JS.
 */
*, *::before, *::after { box-sizing: border-box; }

.hidden { display: none !important; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.min-h-full { min-height: 100%; }
.h-full { height: 100%; }
.h-2 { height: 0.5rem; }
.h-2\.5 { height: 0.625rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-full { width: 100%; }
.min-w-full { min-width: 100%; }
.max-w-5xl { max-width: 64rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.pb-24 { padding-bottom: 6rem; }
.pr-3 { padding-right: 0.75rem; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }
.font-mono { font-family: ui-monospace, monospace; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-widest { letter-spacing: 0.1em; }
.underline { text-decoration: underline; }
.whitespace-nowrap { white-space: nowrap; }
.shrink-0 { flex-shrink: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.antialiased { -webkit-font-smoothing: antialiased; }

.sticky { position: sticky; }
.top-0 { top: 0; }
.z-10 { z-index: 10; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.border { border-width: 1px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-b-2 { border-bottom-width: 2px; border-bottom-style: solid; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-red-300 { border-color: #fca5a5; }
.border-transparent { border-color: transparent; }
.border-navy { border-color: #001f3f; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }

.bg-white { background-color: #fff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-red-50 { background-color: #fef2f2; }
.bg-navy { background-color: #001f3f; }
.bg-violet-100 { background-color: #ede9fe; }
.bg-indigo-100 { background-color: #e0e7ff; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-teal-100 { background-color: #ccfbf1; }
.bg-green-400 { background-color: #4ade80; }
.bg-emerald-600 { background-color: #059669; }
.bg-amber-500 { background-color: #f59e0b; }
.bg-blue-400 { background-color: #60a5fa; }
.bg-violet-500 { background-color: #8b5cf6; }
.bg-red-400 { background-color: #f87171; }
.bg-slate-400 { background-color: #94a3b8; }

.text-white { color: #fff; }
.text-navy { color: #001f3f; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-900 { color: #0f172a; }
.text-red-600 { color: #dc2626; }
.text-red-800 { color: #991b1b; }
.text-emerald-600 { color: #059669; }
.text-emerald-700 { color: #047857; }
.text-emerald-800 { color: #065f46; }
.text-orange-500 { color: #f97316; }
.text-orange-700 { color: #c2410c; }
.text-violet-600 { color: #7c3aed; }
.text-violet-700 { color: #6d28d9; }
.text-violet-800 { color: #5b21b6; }
.text-blue-600 { color: #2563eb; }
.text-indigo-700 { color: #4338ca; }
.text-indigo-800 { color: #3730a3; }
.text-teal-700 { color: #0f766e; }
.text-teal-800 { color: #115e59; }
.text-amber-800 { color: #92400e; }

.shadow { box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); }
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,.05); }

button, [type="button"], [type="submit"] {
  font-family: inherit;
  cursor: pointer;
}
button.tab-btn {
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
}
input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}
table { border-collapse: collapse; width: 100%; }
thead { border-bottom: 1px solid #e2e8f0; }

a { color: #0f766e; }
a:hover { opacity: 0.85; }

html.no-tailwind body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ── Layout shell (matches base.html; works without Tailwind CDN) ───────── */
.dashboard-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 1rem 6rem;
}
.seller-page-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
.seller-page-shell__main {
  padding: 1rem 0 6rem;
}
.max-w-6xl { max-width: 72rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-xl { max-width: 36rem; }
.max-w-md { max-width: 28rem; }
.max-w-sm { max-width: 24rem; }
.max-w-full { max-width: 100%; }
.min-w-0 { min-width: 0; }

.flex-col { flex-direction: column; }
.items-start { align-items: flex-start; }
.justify-end { justify-content: flex-end; }
.gap-3 { gap: 0.75rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }

@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-center { align-items: center; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .md\:space-y-5 > * + * { margin-top: 1.25rem; }
  .md\:p-4 { padding: 1rem; }
}

.dashboard-topbar {
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.dashboard-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  padding: 1rem;
}

/* Seller Gold & Steel — header + trinity (no Tailwind) */
.seller-header-ks {
  background: linear-gradient(100deg, #2d3436 0%, #1e272e 100%);
  border-bottom: 3px solid #d4af37;
  color: #f8fafc;
}
.seller-header-ks .seller-header-title { color: #f8fafc; }
.seller-header-ks .seller-header-sub { color: #b2bec3; }
.seller-header-ks .seller-header-nav a,
.seller-header-ks .seller-header-nav button {
  text-decoration: none;
}
html.no-tailwind .seller-header-ks .seller-header-nav a.text-indigo-200,
.seller-header-ks .seller-header-nav a.text-indigo-200 { color: #c7d2fe; }
html.no-tailwind .seller-header-ks .seller-header-nav a.text-teal-300,
.seller-header-ks .seller-header-nav a.text-teal-300 { color: #5eead4; }
html.no-tailwind .seller-header-ks .seller-header-nav a.text-emerald-300,
.seller-header-ks .seller-header-nav a.text-emerald-300 { color: #6ee7b7; }
html.no-tailwind .seller-header-ks .seller-header-nav a.text-amber-300,
.seller-header-ks .seller-header-nav a.text-amber-300 { color: #fcd34d; }
html.no-tailwind .seller-header-ks .seller-header-nav a.text-sky-300,
.seller-header-ks .seller-header-nav a.text-sky-300 { color: #7dd3fc; }
html.no-tailwind .seller-header-ks .seller-header-nav a.text-violet-300,
.seller-header-ks .seller-header-nav a.text-violet-300 { color: #c4b5fd; }
html.no-tailwind .seller-header-ks .seller-header-nav a.text-red-300,
.seller-header-ks .seller-header-nav a.text-red-300 { color: #fca5a5; }
html.no-tailwind .seller-header-ks .seller-header-nav a.text-slate-200,
html.no-tailwind .seller-header-ks .seller-header-nav a.text-slate-300,
.seller-header-ks .seller-header-nav a.text-slate-200,
.seller-header-ks .seller-header-nav a.text-slate-300 { color: #cbd5e1; }
.seller-header-ks .seller-header-nav a.hover\:text-white:hover,
.seller-header-ks .seller-header-nav a:hover { color: #ffffff; }
.seller-header-ks .seller-header-nav button.text-slate-300 { color: #cbd5e1; }

#salesTrinityStrip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0;
  background: linear-gradient(90deg, #2d3436 0%, #1e272e 100%);
  border-bottom: 2px solid #d4af37;
}
#salesTrinityStrip a {
  color: #f1f5f9;
  font-weight: 800;
  font-size: 0.78rem;
  text-decoration: none;
  padding: 0.38rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(255, 255, 255, 0.06);
}
#salesTrinityStrip a:hover {
  background: rgba(212, 175, 55, 0.18);
  color: #d4af37;
}

.dashboard-grid-trinity-4 {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
  width: 100%;
}
@media (min-width: 768px) {
  .dashboard-grid-trinity-4 { grid-template-columns: repeat(2, 1fr); }
}
/* 1024px: neljä palstaa mahtuu 1200px-raamiin (ei odota 1280px viewportia) */
@media (min-width: 1024px) {
  .dashboard-grid-trinity-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 639px) {
  .seller-page-shell {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
  #salesTrinityStrip {
    gap: 0.35rem;
    padding: 0.5rem 0;
  }
  #salesTrinityStrip a {
    font-size: 0.72rem;
    padding: 0.5rem 0.85rem;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

html.no-tailwind {
  font-size: 113%;
  color-scheme: light;
  background-color: #f8fafc;
}
html.no-tailwind body {
  background-color: #f8fafc;
  color: #0f172a;
}
html.no-tailwind a:not(.seller-header-ks a):not(#salesTrinityStrip a):not(.tp-btn) {
  color: #0f766e;
}
