:root {
  --bg: #f3f0ea;
  --bg-alt: #f7f4ef;
  --ink: #1c1b1a;
  --muted: #6b6761;
  --accent: #d9763d;
  --accent-dark: #b8602f;
  --border: #e2dcd2;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  --radius: 16px;
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Space Grotesk", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, #f1e5d6 0%, transparent 40%),
    radial-gradient(circle at 90% 20%, #ead7ff 0%, transparent 45%),
    linear-gradient(145deg, var(--bg) 0%, #efe7dd 100%);
}

.page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 6vw;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
}

.brand {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.button.primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  padding: 48px 6vw 72px;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  margin: 0;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: 28px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-size: 14px;
  color: var(--muted);
}

.field input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 16px;
  background: #fff;
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input {
  width: 100%;
  padding-right: 46px;
}

.eye-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.eye-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--muted);
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0 24px;
}

.footer-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.alert {
  display: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #f2c8b3;
  background: #fff1e8;
  color: #8a3b12;
  font-size: 14px;
  margin-bottom: 16px;
}

.alert.active {
  display: block;
}

.dashboard {
  padding: 48px 6vw;
}

.dashboard h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 8px;
}

.dashboard p {
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 16px;
  font-weight: 600;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
}

.nav a.active {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: inline-flex;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.report-card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.report-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.report-embed {
  margin-top: 12px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  background: #faf7f2;
  overflow: hidden;
}

.report-embed iframe {
  width: 100%;
  height: 320px;
  border: 0;
}

.empty {
  display: none;
  margin-top: 24px;
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  color: var(--muted);
}

.empty.active {
  display: block;
}

.block {
  margin-top: 24px;
}

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

.table {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.table-row:last-child {
  border-bottom: none;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}
