:root {
  --bg: #f5f8fc;
  --card: #ffffff;
  --text: #102233;
  --muted: #587083;
  --line: #d4e2ee;
  --accent: #0f9d94;
  --accent-2: #ff6b2c;
  --danger: #c23a2b;
  --radius: 14px;
  --shadow: 0 14px 40px rgba(16, 34, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(50rem 20rem at 15% -10%, rgba(15, 157, 148, 0.18), transparent 70%),
    radial-gradient(40rem 20rem at 90% -5%, rgba(255, 107, 44, 0.16), transparent 70%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 248, 252, 0.93);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  background: linear-gradient(125deg, var(--accent), var(--accent-2));
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
}

.nav a:hover {
  background: #e6eff7;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.client-name {
  color: var(--muted);
  font-size: 0.9rem;
}

.layout {
  width: min(1220px, 96vw);
  margin: 1.3rem auto 2rem;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

h1 {
  margin: 0;
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  font-size: clamp(1.4rem, 2vw, 1.95rem);
}

h2 {
  margin: 0;
  font-size: 1.1rem;
}

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

.stack {
  display: grid;
  gap: 0.75rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #bfd2e0;
  border-radius: 10px;
  background: #fbfdff;
  padding: 0.58rem 0.67rem;
  color: var(--text);
}

textarea {
  resize: vertical;
}

button,
.button-link {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #20b9af);
  color: white;
  font-weight: 700;
  padding: 0.58rem 0.82rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
}

button:hover,
.button-link:hover {
  filter: brightness(0.96);
}

button.ghost,
.button-link.ghost,
.ghost {
  background: #e7f0f7;
  color: var(--text);
}

button.danger,
.danger {
  background: linear-gradient(135deg, var(--danger), #d94f3f);
  color: white;
}

.auth-card {
  width: min(520px, 96vw);
  margin: 3rem auto;
}

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

.error {
  color: var(--danger);
  margin: 0;
  min-height: 1.2rem;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  padding: 0.55rem;
  font-size: 0.9rem;
}

th {
  color: #35556d;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid #c7dbe9;
  background: #eef6fb;
  color: #18425a;
}

.hidden {
  display: none;
}

@media (max-width: 920px) {
  .topbar {
    flex-wrap: wrap;
    gap: 0.7rem;
  }

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