:root {
  --bg: #FAFBFC;
  --white: #FFFFFF;
  --ink: #1A1D21;
  --mute: #5C6570;
  --line: #E6E9ED;
  --accent: #1B4F72;
  --accent-soft: #E8F1F7;
  --success: #117A65;
  --warn: #B9770E;
  --danger: #922B21;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(26, 29, 33, 0.04), 0 8px 24px rgba(26, 29, 33, 0.04);
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
[x-cloak] { display: none !important; }

.bg-page { background: var(--bg); }
.bg-white { background: var(--white); }
.text-ink { color: var(--ink); }
.text-mute { color: var(--mute); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-3xl { font-size: 1.875rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.antialiased { -webkit-font-smoothing: antialiased; }

.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-0\.5 { gap: 0.125rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.grid { display: grid; }
.w-full { width: 100%; }
.max-w-md { max-width: 28rem; }
.max-w-6xl { max-width: 72rem; }
.min-w-0 { min-width: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.my-3 { margin-top: 0.75rem; margin-bottom: 0.75rem; }
.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; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-7 { padding-top: 1.75rem; padding-bottom: 1.75rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.pb-6 { padding-bottom: 1.5rem; }
.border-b { border-bottom: 1px solid var(--line); }
.border-t { border-top: 1px solid var(--line); }
.border-r { border-right: 1px solid var(--line); }
.border-line { border-color: var(--line); }
.rounded { border-radius: var(--radius); }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }
.z-10 { z-index: 10; }
.hidden { display: none; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.whitespace-nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 640px) {
  .sm\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:flex { display: flex; }
  .lg\:flex-col { flex-direction: column; }
  .lg\:w-60 { width: 15rem; }
  .lg\:border-r { border-right: 1px solid var(--line); }
  .lg\:hidden { display: none; }
  .lg\:px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.brand-mark {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand-mark:hover { text-decoration: none; color: var(--accent); }

.page-title {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}
.page-sub { color: var(--mute); margin: 0 0 2rem; font-size: 0.95rem; }

.nav-link {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  color: var(--mute);
  font-size: 0.925rem;
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.nav-link:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.nav-link-active { background: var(--accent-soft); color: var(--accent); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: 0 2px 8px rgba(26,29,33,.06), 0 12px 28px rgba(26,29,33,.05); }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-link:hover { text-decoration: none; }

.stat-value {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.stat-label { font-size: 0.8rem; color: var(--mute); text-transform: uppercase; letter-spacing: 0.04em; }

.btn, .btn-primary, .btn-secondary, .btn-ghost, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.55rem 1rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600;
  font-family: inherit; cursor: pointer; border: 1px solid transparent; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #163f5b; text-decoration: none; color: #fff; }
.btn-secondary { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { background: var(--bg); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--mute); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.btn-danger { background: #fdf2f1; color: var(--danger); border-color: #f5d0cd; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }

.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--mute); margin-bottom: 0.35rem; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--white); color: var(--ink); font-family: inherit; font-size: 0.95rem;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: 2px solid var(--accent-soft); border-color: var(--accent);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 0.3rem; }
.form-hint { color: var(--mute); font-size: 0.8rem; margin-top: 0.3rem; }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-row-2 { grid-template-columns: 1fr 1fr; } .form-row-3 { grid-template-columns: 1fr 1fr 1fr; } .form-row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; } }
.form-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th {
  text-align: left; padding: 0.75rem 1rem; background: #F7F8FA; color: var(--mute);
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
table.data td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: #FCFCFD; }

.badge {
  display: inline-flex; align-items: center; padding: 0.15rem 0.5rem; border-radius: 6px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
}
.badge-muted { background: #EEF0F3; color: var(--mute); }
.badge-info { background: var(--accent-soft); color: var(--accent); }
.badge-success { background: #E8F6F2; color: var(--success); }
.badge-danger { background: #fdf2f1; color: var(--danger); }

.color-dot {
  display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 999px;
  margin-right: 0.45rem; vertical-align: middle; flex-shrink: 0;
}
.project-row { display: inline-flex; align-items: center; }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end;
  margin-bottom: 1.25rem; padding: 1rem; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.filter-bar .field { flex: 1 1 140px; min-width: 120px; }
.filter-bar .field-grow { flex: 2 1 200px; }

.flash { padding: 0.85rem 1rem; border-radius: 8px; font-size: 0.9rem; font-weight: 500; }
.flash-success { background: #E8F6F2; color: var(--success); border: 1px solid #c8ebe2; }
.flash-error { background: #fdf2f1; color: var(--danger); border: 1px solid #f5d0cd; }

.login-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 2rem; box-shadow: var(--shadow);
}
.login-atmosphere {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(27,79,114,0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(17,122,101,0.06), transparent 50%),
    linear-gradient(180deg, #F3F6F9 0%, var(--bg) 100%);
}

.service-icon {
  width: 2.5rem; height: 2.5rem; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: 0.85rem;
}

.timeline { border-left: 2px solid var(--line); margin-left: 0.5rem; padding-left: 1.25rem; }
.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-item::before {
  content: ""; position: absolute; left: -1.45rem; top: 0.35rem;
  width: 0.55rem; height: 0.55rem; border-radius: 999px; background: var(--accent);
}
.timeline-item.announcement::before { background: var(--warn); }

.color-swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.color-swatch {
  width: 2rem; height: 2rem; border-radius: 8px; border: 2px solid transparent; cursor: pointer;
}
.color-swatch.selected { border-color: var(--ink); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink); }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.chip {
  padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.8rem; font-weight: 500;
  border: 1px solid var(--line); color: var(--mute); background: var(--white); text-decoration: none;
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.internal-box {
  border: 1px dashed #d4a017; background: #FFFBF0; border-radius: 8px; padding: 0.85rem 1rem;
}
.internal-box .form-label { color: #8a6d1a; }

.stack-mobile { display: grid; gap: 0.75rem; }
@media (min-width: 768px) { .stack-mobile { display: none; } .desk-only { display: block; } }
@media (max-width: 767px) { .desk-only { display: none; } }

.animate-fade { animation: fadeIn .35s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.empty { color: var(--mute); padding: 2rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.header-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
