:root {
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --border: #e4e8f0;
  --text: #111827;
  --text-muted: #6b7280;
  --primary: #111827;
  --primary-ink: #ffffff;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #059669;
  --line: #06c755;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: 'Prompt', 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(17, 24, 39, 0.04), transparent 24%),
    radial-gradient(circle at top right, rgba(6, 199, 85, 0.05), transparent 18%),
    var(--bg);
  color: var(--text);
}

a {
  color: var(--text);
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(17, 24, 39, 0.14);
  outline-offset: 2px;
}

.app-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px);
  padding: 28px 20px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.08);
  color: var(--primary);
  font-weight: 700;
}

.sidebar-section {
  margin-top: 22px;
}

.sidebar-label {
  margin: 0 0 10px;
  padding: 0 10px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--text);
  background: rgba(17, 24, 39, 0.06);
  border-color: var(--border);
}

.main-wrapper {
  min-width: 0;
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 0;
}

.header-title h1,
.header-title h2,
.header-title p {
  margin: 0;
}

.header-title p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14px;
}

.dashboard-content {
  padding: 24px 28px 40px;
}

.glass-card,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  padding: 22px;
}

.metric .label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.metric .value {
  margin-top: 10px;
  font-size: 34px;
  font-weight: 700;
}

.metric .hint {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.section-card {
  padding: 22px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title h3 {
  margin: 0;
  font-size: 20px;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.btn,
.btn-secondary,
.btn-danger,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn {
  background: var(--primary);
  color: var(--primary-ink);
}

.btn:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.btn-secondary,
.btn-ghost {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border-color: var(--border);
}

.btn-danger {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.18);
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.input::placeholder,
.textarea::placeholder {
  color: #9ca3af;
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(248, 250, 252, 0.98);
  color: #4b5563;
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-open,
.status-approved,
.status-completed {
  background: rgba(5, 150, 105, 0.1);
  color: #047857;
  border-color: rgba(5, 150, 105, 0.16);
}

.status-pending,
.status-reserved {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.16);
}

.status-rejected {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.16);
}

.status-submitted,
.status-active,
.status-announced {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.14);
}

.status-revision_requested {
  background: rgba(234, 88, 12, 0.08);
  color: #c2410c;
  border-color: rgba(234, 88, 12, 0.14);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-banner {
  padding: 28px;
}

.hero-banner h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1.08;
}

.hero-banner p {
  max-width: 760px;
  color: var(--text-muted);
  line-height: 1.75;
}

.notice {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.notice.success {
  background: rgba(5, 150, 105, 0.08);
  color: #065f46;
}

.notice.error {
  background: rgba(220, 38, 38, 0.08);
  color: #991b1b;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(540px, 100%);
  padding: 28px;
}

.bottom-nav {
  position: sticky;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.bottom-nav a {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 54px;
  border-radius: 18px;
  color: var(--text-muted);
  font-size: 12px;
}

.bottom-nav a.active {
  background: var(--primary);
  color: var(--primary-ink);
}

.stack {
  display: grid;
  gap: 16px;
}

@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .form-grid {
    grid-template-columns: 1fr;
  }
}
