/* src/styles.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
  font-family:
    "Yu Gothic UI",
    "Hiragino Kaku Gothic ProN",
    system-ui,
    sans-serif;
  color: #17202a;
  background: #f5f7f8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f5f7f8;
}
button,
input,
select {
  font: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(51, 118, 164, .22);
  outline-offset: 1px;
}
main {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  min-height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
}
header {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: #17202a;
  background: #f5f7f8;
  border-radius: 0;
  padding: 28px 28px 16px;
  margin: 0;
}
header h1 {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  margin: 3px 0 6px;
  letter-spacing: .01em;
}
header p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}
.eyebrow {
  margin-bottom: 4px !important;
  color: #d64235 !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 0 !important;
}
.status {
  display: inline-flex;
  align-items: center;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.status.mock {
  color: #b45309;
  border-color: #fde68a;
  background: #fffbeb;
}
nav {
  grid-column: 1;
  grid-row: 1 / span 4;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: visible;
  min-height: 100vh;
  padding: 105px 12px 24px;
  background: #17202a;
  margin: 0;
}
nav::before {
  content: "FiCS\a\5165\6821\30a2\30f3\30b1\30fc\30c8\a\5206\6790\30c0\30c3\30b7\30e5\30dc\30fc\30c9";
  white-space: pre-line;
  position: absolute;
  top: 29px;
  width: 190px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.45;
}
nav::after {
  content: "MARKETING ANALYTICS";
  position: absolute;
  top: 88px;
  color: #cbd5e1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}
nav button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #cbd5e1;
  padding: 0 12px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
nav button:hover {
  background: #ffffff1a;
  color: #fff;
}
nav button.active {
  background: #fff;
  color: #17202a;
  font-weight: 800;
}
.filters {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(128px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  padding: 16px 20px;
  margin: 0;
  border-radius: 0;
  font-size: 13px;
}
.filters > b,
.filters > span {
  display: none;
}
.filters label {
  display: block;
  min-width: 0;
}
.filters label span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}
.filters input,
.filters select {
  height: 36px;
  width: 100%;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  background: #fff;
  padding: 0 10px;
  color: #17202a;
  font-size: 12px;
}
.reset {
  height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  background: #fff;
  padding: 0 12px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}
.reset:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.alert {
  grid-column: 2;
  margin: 16px 28px 0;
  border-left: 4px solid #f59e0b;
  border-radius: 5px;
  background: #fff7ed;
  color: #9a3412;
  padding: 11px 14px;
  font-size: 13px;
}
.loading {
  grid-column: 2;
  margin: 28px;
  display: grid;
  place-items: center;
  min-height: 220px;
  color: #64748b;
}
.kpis,
.grid {
  grid-column: 2;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 20px 28px 0;
  margin: 0;
}
.kpi {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(23, 32, 42, .06), 0 10px 28px rgba(23, 32, 42, .05);
}
.kpi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #cbd5e1;
}
.kpi:nth-child(1)::before {
  background: #d64235;
}
.kpi:nth-child(2)::before {
  background: #167d68;
}
.kpi:nth-child(3)::before {
  background: #3376a4;
}
.kpi:nth-child(4)::before {
  background: #f59e0b;
}
.kpi span,
.kpi small {
  display: block;
  color: #64748b;
  font-size: 12px;
}
.kpi span {
  margin-top: 5px;
  font-weight: 700;
}
.kpi strong {
  display: block;
  margin: 4px 0;
  color: #17202a;
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -.04em;
}
.kpi small {
  font-size: 11px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 20px 28px 28px;
}
.panel {
  min-height: 315px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(23, 32, 42, .06), 0 10px 28px rgba(23, 32, 42, .05);
}
.panel.wide {
  grid-column: 1 / -1;
}
.panel h2 {
  margin: 0 0 14px;
  color: #17202a;
  font-size: 15px;
  font-weight: 800;
}
.empty {
  display: grid;
  place-items: center;
  height: 200px;
  color: #94a3b8;
}
.advice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.advice > div {
  border-left: 4px solid #d64235;
  border-radius: 5px;
  background: #f8fafc;
  padding: 13px 15px;
}
.advice b {
  color: #d64235;
  font-size: 12px;
}
.advice p {
  margin: 5px 0 0;
  line-height: 1.65;
  font-size: 14px;
}
.fine {
  color: #64748b;
  font-size: 12px;
  margin-top: 18px;
}
@media (max-width:1180px) {
  .filters {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width:760px) {
  main {
    display: block;
  }
  .status {
    margin-top: 12px;
  }
  header {
    display: block;
    padding: 22px 16px 14px;
  }
  nav {
    position: static;
    min-height: auto;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding: 10px 12px;
  }
  .nav::before,
  nav::after {
    display: none;
  }
  nav button {
    width: auto;
    min-width: max-content;
  }
  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px;
  }
  .kpis {
    grid-template-columns: 1fr;
    padding: 16px 16px 0;
  }
  .grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .panel.wide {
    grid-column: auto;
  }
  .advice {
    grid-template-columns: 1fr;
  }
}
