:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #172033;
  --muted: #667085;
  --line: #e4e7ec;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --gray: #667085;
  --gray-soft: #f2f4f7;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px clamp(14px, 3vw, 36px);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(135deg, #0f172a, #1d4ed8);
  color: #fff;
}

.site-header h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.05em;
}

.site-header h1 small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.82;
}

h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 4px;
}

.top-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.nav-link.is-active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
}

.auth-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(14px, 3vw, 36px);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.auth-user strong {
  color: var(--text);
}

.auth-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

main {
  padding: 12px clamp(14px, 3vw, 36px) 36px;
}

label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

select,
input,
textarea,
button {
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

select,
input,
button {
  height: 32px;
}

textarea {
  min-height: 58px;
  padding: 8px 10px;
  resize: vertical;
}

button {
  cursor: pointer;
  font-weight: 700;
  color: var(--blue);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), #4f46e5);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.primary-btn:hover {
  filter: brightness(1.05);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ghost-btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
}

.section-block {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.schedule-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
}

.schedule-modal-backdrop[hidden] {
  display: none;
}

.schedule-modal {
  position: relative;
  width: min(640px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: 20px;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.schedule-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: var(--gray-soft);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

body.schedule-modal-open {
  overflow: hidden;
}

.load-error {
  padding: 24px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fef2f2;
  color: #991b1b;
}

.empty-state {
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.platform-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

body.platform-mounted:not(.platform-prd) {
  padding-top: 56px;
}

body.platform-mounted:not(.platform-prd) .auth-bar {
  position: sticky;
  top: 56px;
  z-index: 90;
}

body.platform-prd .platform-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

body.platform-prd .sidebar,
body.platform-prd .sidebar-toggle,
body.platform-prd section.content,
body.platform-prd .content,
body.platform-prd #right-panel,
body.platform-prd .search {
  top: 56px !important;
}

body.platform-prd .sidebar {
  height: calc(100% - 56px) !important;
}

body.platform-prd #right-panel {
  height: calc(100vh - 56px);
  padding-top: 16px;
}
