@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=Source+Serif+4:wght@400;600&display=swap');

:root {
  --bg: #f2efe9;
  --surface: #ffffff;
  --ink: #161616;
  --ink-2: #3f3f3f;
  --muted: #7a7a7a;
  --border: rgba(12, 14, 20, 0.12);
  --accent: #0f6b5f;
  --accent-2: #c7a677;
  --danger: #b9483a;
  --shadow: 0 20px 40px -30px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --font-sans: 'Sora', system-ui, sans-serif;
  --font-serif: 'Source Serif 4', serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(1000px 800px at 10% 0%, rgba(15, 107, 95, 0.08), transparent 60%),
    radial-gradient(900px 700px at 100% 10%, rgba(199, 166, 119, 0.08), transparent 55%),
    linear-gradient(180deg, #f7f4ee 0%, #efebe3 100%);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  margin: 0 0 8px;
}

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

.sidebar {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #1a8a7a);
  box-shadow: var(--shadow);
}

.brand-title {
  font-weight: 600;
  font-size: 16px;
}

.brand-sub {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--ink-2);
}

.nav-link.active,
.nav-link:hover {
  background: rgba(15, 107, 95, 0.08);
  color: var(--ink);
}

.main {
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.topbar-title {
  font-weight: 600;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-meta {
  display: grid;
}

.user-name {
  font-weight: 600;
}

.user-sub {
  color: var(--muted);
  font-size: 12px;
}

.content {
  padding: 28px;
}

.page {
  display: grid;
  gap: 18px;
}

.page-header p {
  color: var(--muted);
  margin: 0;
}

.grid {
  display: grid;
  gap: 18px;
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card.read {
  opacity: 0.7;
}

.card-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.card-content {
  margin: 12px 0;
  color: var(--ink-2);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.form {
  display: grid;
  gap: 12px;
}

.form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
}

input,
select,
textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: var(--font-sans);
  background: #fff;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.inline-input {
  width: 100%;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #f5f5f5;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--ink-2);
}

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

.alert {
  background: #ffe9e5;
  border: 1px solid #f3c1b8;
  padding: 10px 12px;
  border-radius: 12px;
  color: #7a2f25;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11, 28, 25, 0.45) 0%, rgba(11, 28, 25, 0.2) 100%),
    url('/login-bg.jpg');
  background-size: cover;
  background-position: center;
}

.login-page::before,
.login-page::after {
  content: '';
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.5;
  z-index: 0;
}

.login-page::before {
  background: radial-gradient(circle at 30% 30%, rgba(15, 107, 95, 0.4), transparent 60%);
  top: -180px;
  left: -140px;
}

.login-page::after {
  background: radial-gradient(circle at 70% 30%, rgba(199, 166, 119, 0.4), transparent 60%);
  bottom: -200px;
  right: -160px;
}

.login-card {
  width: min(420px, 92vw);
  padding: 28px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 22px;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(15, 107, 95, 0.18);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 1;
}

.login-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  margin-bottom: 16px;
}

.login-brand .brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(140deg, #0f6b5f 0%, #1f8f7f 60%, #c7a677 140%);
  position: relative;
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.6);
}

.login-brand .brand-mark::before {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), transparent 55%);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.login-brand .brand-mark::after {
  content: 'S';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.login-hint {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.login-card .brand-title {
  font-size: 20px;
}

.login-card .brand-sub {
  font-size: 13px;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f1f1;
  font-size: 12px;
}

.list-stagger .list-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  animation: floatIn 0.35s ease both;
}

.list-item.read {
  opacity: 0.6;
}

.list-title {
  font-weight: 600;
}

.list-sub {
  color: var(--muted);
  font-size: 13px;
}

.stat {
  font-size: 32px;
  font-weight: 600;
}

.stat-sub {
  color: var(--muted);
  font-size: 12px;
}

.animate-in {
  animation: fadeUp 0.45s ease both;
}

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

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

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

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cols-2,
  .stats {
    grid-template-columns: 1fr;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
