* { box-sizing: border-box; }

:root {
  --ink: #10243d;
  --ink-soft: #4a617f;
  --muted: #7f96b2;
  --panel: #ffffff;
  --line: #cfdae8;
  --line-strong: #b4c4d8;
  --primary-a: #2d5e96;
  --primary-b: #1f456f;
  --accent: #f4bf6a;
  --ok: #0e7a4f;
  --error: #b42318;
  --shadow-lg: 0 18px 36px rgba(21, 39, 65, 0.14);
  --shadow-md: 0 8px 24px rgba(22, 40, 67, 0.1);
}

body {
  margin: 0;
  font-family: "Segoe UI Variable Text", "Bahnschrift", "Candara", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, #f5e7d0 0%, #f3e6d4 17%, transparent 36%),
    radial-gradient(circle at 88% 0%, #dbe9fb 0%, #d6e4f8 24%, transparent 45%),
    linear-gradient(180deg, #eaf0f8 0%, #edf3f9 55%, #e6edf6 100%);
}

.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px;
  display: grid;
  gap: 18px;
}

.app-shell {
  max-width: 1700px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 272px 1fr;
  align-items: start;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 24px 14px;
  background: linear-gradient(180deg, #0f2c4b 0%, #143453 58%, #1a3b60 100%);
  border-radius: 0 24px 24px 0;
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.menu-title {
  margin: 0 0 14px;
  padding-left: 6px;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #d0ddee;
  opacity: 0.95;
}

.menu-main {
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  border-radius: 12px;
  padding: 12px 13px;
  border: 1px solid rgba(214, 228, 243, 0.18);
  background: linear-gradient(180deg, #2a4d73 0%, #244668 100%);
  color: #eff6ff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: block;
}

.menu-main.active {
  background: linear-gradient(180deg, #f7c97d 0%, var(--accent) 100%);
  color: #142f4a;
  border-color: #e5ac4f;
}

.workspace {
  padding: 22px 22px 28px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.workspace-banner {
  background: linear-gradient(124deg, #1f476f 0%, #2c639a 64%, #3e77ad 100%);
  color: #f8fcff;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 8px;
}

.workspace-banner h1 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #f8fcff;
}

.workspace-banner p {
  margin: 0;
  color: #d7e9ff;
  font-size: 14px;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-chips span {
  border: 1px solid rgba(221, 236, 255, 0.38);
  background: rgba(11, 25, 42, 0.28);
  color: #f0f7ff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.center {
  min-height: 100vh;
  place-items: center;
  display: grid;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

h1 {
  margin: 0;
  letter-spacing: -0.02em;
  font-size: clamp(1.7rem, 2.3vw, 2.3rem);
}

h2 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #18365a;
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
}

.eyebrow {
  margin: 0;
  color: #2f4f73;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-md);
  animation: rise 300ms ease-out;
}

.gradient-border {
  border-image: linear-gradient(90deg, #274f7e, #3f7fb8) 1;
}

.panel.compact {
  width: min(460px, 100%);
  box-shadow: var(--shadow-lg);
}

.muted { color: var(--ink-soft); }
.error { color: var(--error); font-weight: 600; }
.ok { color: var(--ok); font-weight: 600; }

.grid { display: grid; gap: 12px; }

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #2c4a69;
}

input, select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #f6f9fd;
  color: #162d49;
}

input:focus,
select:focus {
  border-color: #7e9fc3;
  box-shadow: 0 0 0 3px rgba(123, 160, 199, 0.24);
  outline: none;
}

input[readonly],
input:disabled,
select:disabled {
  background: #e8edf5;
  color: #5f7390;
  border-color: #c3d0e2;
  cursor: not-allowed;
}

button,
.link-btn {
  border: 1px solid #1d4a78;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--primary-a) 0%, var(--primary-b) 100%);
  color: #fff;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover,
.link-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(31, 69, 111, 0.25);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 860px;
}

th, td {
  border-bottom: 1px solid #dce4ef;
  padding: 9px;
  text-align: left;
}

th {
  background: #eef3fa;
  color: #264667;
}

.actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
}

.expiry-inline {
  display: grid;
  grid-template-columns: 88px 132px auto;
  gap: 6px;
  align-items: center;
}

.expiry-inline input {
  min-width: 0;
  padding: 7px 8px;
}

.expiry-inline button {
  padding: 7px 10px;
  font-size: 12px;
}

.pill,
.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
}

.pill {
  background: #dce8f6;
  color: #234364;
}

.status.released {
  background: #d3f1e3;
  color: #0b6941;
}

.status.locked {
  background: #f9e7cb;
  color: #8c571b;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    border-radius: 0;
    padding: 14px;
  }

  .workspace {
    padding: 14px;
  }

  .page {
    padding: 14px;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }
}
