:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #66736f;
  --soft: #f3f6f2;
  --paper: #ffffff;
  --line: #dce4df;
  --primary: #b31d2b;
  --primary-strong: #881422;
  --accent: #087c7a;
  --amber: #d49219;
  --green: #16825e;
  --blue: #2f67bd;
  --shadow: 0 18px 44px rgba(27, 37, 32, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: #f7f8f4;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px;
  background: #16211f;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 50px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: #f4c445;
  color: #121816;
  font-weight: 900;
}

.brand strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
}

.brand span {
  display: block;
  color: #b8c6c0;
  font-size: 12px;
  margin-top: 3px;
}

.role-tabs,
.view-tabs,
.language-tabs {
  display: grid;
  gap: 6px;
}

.language-tabs {
  grid-template-columns: repeat(3, 1fr);
  margin-top: auto;
}

.nav-button,
.lang-button,
.ghost-button,
.solid-button,
.icon-button {
  border: 0;
  border-radius: var(--radius);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.nav-button {
  justify-content: flex-start;
  padding: 0 12px;
  color: #d8e5df;
  background: transparent;
}

.nav-button:hover,
.nav-button.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.lang-button {
  color: #d8e5df;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.lang-button.active {
  background: #fff;
  color: #16211f;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 72px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 18px;
}

.search {
  flex: 1;
  min-width: 180px;
  position: relative;
}

.search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  width: 18px;
  height: 18px;
}

.search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px 12px 40px;
  background: #fff;
  color: var(--ink);
}

.device-pill,
.status-pill,
.card-pill {
  border-radius: 999px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.device-pill {
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

.content {
  padding: 26px 28px 96px;
  display: grid;
  gap: 22px;
}

.workspace-hero {
  min-height: 238px;
  border-radius: 0;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(20, 23, 20, 0.88), rgba(20, 23, 20, 0.48)),
    url("https://images.unsplash.com/photo-1549719386-74dfcbf7dbed?auto=format&fit=crop&w=1800&q=82");
  background-size: cover;
  background-position: center;
  display: grid;
  align-items: end;
  padding: 34px;
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #f8d762;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 10px;
  font-size: clamp(31px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  margin-top: 12px;
  color: #e8f0eb;
  line-height: 1.6;
}

.hero-actions,
.section-head,
.card-head,
.row-actions,
.filters,
.metric-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 18px;
}

.solid-button {
  background: var(--primary);
  color: #fff;
  padding: 0 16px;
  font-weight: 800;
}

.solid-button:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

.ghost-button {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0 14px;
  font-weight: 750;
}

.hero-actions .ghost-button {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

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

.grid.cols-2 {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

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

.panel,
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(31, 43, 37, 0.06);
}

.panel {
  padding: 20px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head h2,
.panel h2 {
  font-size: 20px;
}

.section-head p,
.muted {
  color: var(--muted);
  line-height: 1.45;
}

.filters {
  margin-bottom: 16px;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
}

.chip.active {
  background: #16211f;
  color: #fff;
  border-color: #16211f;
}

.course-list,
.booking-list,
.member-list {
  display: grid;
  gap: 12px;
}

.card {
  padding: 16px;
}

.card-head {
  justify-content: space-between;
  align-items: flex-start;
}

.course-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.course-title h3 {
  font-size: 17px;
}

.avatar,
.course-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  font-weight: 900;
  background: var(--accent);
}

.avatar {
  border-radius: 50%;
  background: var(--blue);
}

.details {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.detail-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-line i,
.nav-button i,
.solid-button i,
.ghost-button i,
.icon-button i,
.device-pill i,
.status-pill i {
  width: 17px;
  height: 17px;
}

.row-actions {
  margin-top: 14px;
  justify-content: space-between;
}

.status-pill.available {
  background: #e8f7ee;
  color: var(--green);
}

.status-pill.full {
  background: #fff3d5;
  color: #8c5d07;
}

.status-pill.booked {
  background: #e8f0ff;
  color: var(--blue);
}

.status-pill.cancelled {
  background: #fde7e9;
  color: var(--primary);
}

.card-pill {
  background: #eef5f3;
  color: #31514a;
}

.metric-board {
  display: grid;
  gap: 12px;
}

.metric-row {
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.metric-row:last-child {
  border-bottom: 0;
}

.metric strong {
  display: block;
  font-size: 24px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.schedule-table {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  background: #eef3ef;
  color: #42514c;
  font-size: 13px;
}

tr:last-child td {
  border-bottom: 0;
}

.bottom-nav {
  display: none;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #16211f;
  color: #fff;
  box-shadow: var(--shadow);
  z-index: 10;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: #fff;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .sidebar {
    padding: 14px 10px;
    align-items: center;
  }

  .brand div:not(.brand-mark),
  .nav-button span,
  .lang-button span {
    display: none;
  }

  .nav-button {
    justify-content: center;
    width: 52px;
  }

  .language-tabs {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    padding: 12px 14px;
    min-height: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .content {
    padding: 14px 14px 92px;
    gap: 14px;
  }

  .workspace-hero {
    min-height: 216px;
    padding: 22px;
  }

  h1 {
    font-size: 32px;
  }

  .panel {
    padding: 15px;
  }

  .card-head,
  .row-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .solid-button,
  .ghost-button {
    width: 100%;
  }

  .bottom-nav {
    position: fixed;
    z-index: 8;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 70px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
  }

  .bottom-nav .nav-button {
    width: auto;
    min-height: 50px;
    color: var(--muted);
    justify-content: center;
    flex-direction: column;
    font-size: 11px;
    gap: 3px;
  }

  .bottom-nav .nav-button span {
    display: inline;
  }

  .bottom-nav .nav-button.active {
    background: #f4eeee;
    color: var(--primary);
  }
}
