﻿:root {
  --bg-1: #0a5c62;
  --bg-2: #0d7f86;
  --paper: #f6f7f3;
  --ink: #15212b;
  --muted: #5e6f78;
  --accent: #e2a23a;
  --accent-2: #d66f3d;
  --line: rgba(16, 42, 54, 0.15);
  --shadow: 0 18px 50px rgba(6, 37, 43, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 12%, #1f9da3 0%, transparent 33%),
    radial-gradient(circle at 85% 88%, #0f6f75 0%, transparent 36%),
    linear-gradient(130deg, var(--bg-1), var(--bg-2));
  position: relative;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.25;
}

.site-header {
  width: min(1100px, 92vw);
  margin: 20px auto 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #eef9f8;
}

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.8);
  padding: 4px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.brand h1 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
}

.brand p {
  margin: 0;
  opacity: 0.9;
}

.user-pill {
  border: 1px solid rgba(255, 255, 255, 0.32);
  padding: 8px 12px;
  border-radius: 999px;
  color: #ebfffd;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  font-size: 0.9rem;
}

.container {
  width: min(1100px, 92vw);
  margin: 14px auto 40px;
}

.hero-card,
.portal-header,
.tiles-grid {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 28px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
}

.hero-left h2,
.portal-header h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.hero-left p {
  margin-top: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-right {
  padding: 14px 16px;
  border-left: 3px solid rgba(19, 138, 99, 0.22);
  background: linear-gradient(130deg, rgba(19, 138, 99, 0.1), rgba(214, 111, 61, 0.09));
  border-radius: 12px;
}

.hero-right ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #0f2221;
  background: linear-gradient(145deg, #35bf9e, #169174);
  box-shadow: 0 14px 28px rgba(16, 109, 82, 0.35);
}

.btn-ghost {
  color: var(--ink);
  border-color: rgba(15, 34, 33, 0.25);
  background: #f3f6f4;
}

.portal-header {
  border-radius: 18px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tiles-grid {
  border-radius: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.tile {
  --tile-accent: #2a9d8f;
  position: relative;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(18, 49, 61, 0.22);
  border-radius: 14px;
  background: linear-gradient(165deg, #ffffff, #f2f7f5);
  padding: 16px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.tile:hover {
  transform: translateY(-4px);
  border-color: var(--tile-accent);
  box-shadow: 0 14px 26px rgba(14, 52, 61, 0.2);
}

.tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 6px;
  background: var(--tile-accent);
  border-radius: 14px 14px 0 0;
}

.tile-index {
  font-weight: 700;
  color: rgba(12, 57, 68, 0.45);
  font-size: 0.82rem;
}

.tile-image {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 46, 58, 0.12);
  padding: 8px;
}

.tile h3 {
  margin: 0;
  font-size: 1.12rem;
  font-family: "Sora", sans-serif;
}

.tile p {
  margin: 0;
  color: var(--muted);
  flex-grow: 1;
  line-height: 1.45;
}

.tile-tag {
  align-self: flex-start;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #ffffff;
  color: var(--tile-accent);
  border: 1px solid var(--tile-accent);
  border-radius: 999px;
  padding: 5px 8px;
  font-weight: 700;
}

.tile-roles {
  color: var(--muted);
  font-size: 0.78rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: revealUp 480ms ease forwards;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notice {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-weight: 600;
}

.notice.success {
  background: rgba(19, 138, 99, 0.14);
  border: 1px solid rgba(19, 138, 99, 0.35);
}

.notice.error {
  background: rgba(190, 52, 52, 0.14);
  border: 1px solid rgba(190, 52, 52, 0.35);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 14px;
}

.admin-card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 16px;
}

.admin-subcard {
  border: 1px solid rgba(16, 42, 54, 0.16);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #f9fbfa;
}

.admin-form {
  display: grid;
  gap: 10px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  border: 1px solid rgba(18, 42, 52, 0.26);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.admin-form fieldset {
  border: 1px solid rgba(18, 42, 52, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-form legend {
  padding: 0 6px;
  font-weight: 700;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.muted-text {
  color: var(--muted);
}

.admin-list {
  margin-top: 10px;
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.btn-danger {
  color: #fff;
  background: linear-gradient(145deg, #cc5454, #ad3535);
}

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

@media (max-width: 860px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-right {
    border-left: none;
    border-top: 3px solid rgba(19, 138, 99, 0.22);
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .brand-logo {
    width: 56px;
    height: 56px;
  }
}
