:root {
  --shell-bg: #eff2f6;
  --sidebar-bg: #e7edf4;
  --content-bg: #f7f8fb;
  --card-bg: rgba(255, 255, 255, 0.96);
  --line: #d5dce7;
  --text: #1d2430;
  --muted: #5f6b7a;
  --accent: #1f4f82;
  --accent-strong: #163b60;
  --accent-soft: #dce5ef;
  --accent-hover: #cfd9e5;
  --warm: #b86a3a;
  --shadow: 0 22px 48px rgba(31, 52, 71, 0.11);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(31, 79, 130, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(184, 106, 58, 0.14), transparent 24%),
    linear-gradient(180deg, #edf2f7, #f7f8fb);
}

button,
input,
a {
  font: inherit;
}

.hidden {
  display: none !important;
}

.web-app {
  min-height: 100vh;
}

.login-view,
.app-view {
  min-height: 100vh;
}

.login-view {
  padding: 28px;
}

.landing-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 420px);
  gap: 24px;
  align-items: stretch;
  min-height: calc(100vh - 56px);
}

.marketing-panel,
.login-card,
.topbar,
.module-card,
.status-bar,
.sidebar {
  border: 1px solid rgba(213, 220, 231, 0.92);
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.marketing-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 251, 0.95)),
    var(--card-bg);
}

.marketing-badge,
.login-badge,
.release-status-pill,
.server-card-label,
.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marketing-badge,
.login-badge,
.role-badge {
  background: var(--accent-soft);
  color: var(--accent);
}

.marketing-panel h1,
.login-brand h2,
.hero-copy h2,
.module-card-header h3 {
  margin: 0;
}

.marketing-copy,
.login-brand p,
.hero-copy p,
.release-notes,
.server-card p,
.module-card-copy {
  color: var(--muted);
  line-height: 1.7;
}

.module-card-copy p {
  margin: 0 0 10px;
}

.role-summary-block,
.tool-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.marketing-copy {
  max-width: 52ch;
  margin: 16px 0 28px;
  font-size: 18px;
}

.release-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f8fafc;
}

.release-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.release-label {
  color: var(--warm);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.release-card strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.release-status-pill {
  background: #f0e6dc;
  color: #8a4b1f;
}

.release-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.download-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border: 1px solid rgba(213, 220, 231, 0.9);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
}

.download-row + .download-row {
  border-top: 1px solid rgba(213, 220, 231, 0.9);
}

.download-copy {
  min-width: 0;
}

.download-copy strong {
  margin-top: 6px;
  font-size: 17px;
}

.download-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.platform-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef3f9;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.macos-label {
  background: #f3eee9;
  color: #8a4b1f;
}

.download-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.macos-button {
  background: #29435b;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.server-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(244, 247, 251, 0.9);
  border: 1px solid rgba(213, 220, 231, 0.78);
}

.server-card strong {
  display: block;
  margin: 8px 0 10px;
}

.server-card-label {
  background: #eef3f9;
  color: var(--accent);
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: min(420px, 100%);
  padding: 30px;
}

.login-brand p {
  margin: 10px 0 0;
}

.login-form {
  margin-top: 24px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  margin-bottom: 14px;
  border: 1px solid #cad3df;
  border-radius: 12px;
  background: #fff;
}

.login-form input:focus {
  outline: 2px solid rgba(31, 79, 130, 0.14);
  border-color: var(--accent);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
}

.login-status {
  min-height: 22px;
  margin: 12px 0 16px;
  color: #8a4b1f;
}

.primary-button,
.secondary-button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 120ms ease, background-color 120ms ease, opacity 120ms ease;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.login-form .primary-button {
  width: 100%;
}

.secondary-button {
  background: var(--accent-soft);
  color: var(--text);
}

.primary-button:hover,
.secondary-button:hover,
.button-link:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.app-view {
  padding: 16px;
}

.app-shell {
  display: flex;
  min-height: calc(100vh - 32px);
  gap: 16px;
}

.sidebar {
  width: 240px;
  padding: 10px 0 0;
  background: var(--sidebar-bg);
}

.sidebar-title {
  padding: 0 20px 12px;
  font-size: 18px;
  font-weight: 700;
}

.module-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px 8px;
}

.module-button {
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: var(--accent-soft);
  color: #243447;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.module-button:hover {
  background: var(--accent-hover);
}

.module-button.active {
  background: var(--accent);
  color: #fff;
}

.content-shell {
  display: grid;
  flex: 1;
  min-width: 0;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 26px;
}

.hero-copy p {
  margin: 6px 0 0;
  max-width: 72ch;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.language-pill,
.current-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f3f6fa;
  color: var(--muted);
  font-size: 14px;
}

.language-pill strong,
.current-user strong {
  color: var(--text);
}

.page-body {
  min-height: 0;
}

.module-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px 26px;
}

.module-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.module-placeholder {
  flex: 1;
  min-height: 420px;
  margin-top: 18px;
  border: 1px dashed #d5dde8;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(245, 248, 251, 0.92), rgba(248, 250, 252, 0.82)),
    repeating-linear-gradient(
      -45deg,
      rgba(31, 79, 130, 0.035),
      rgba(31, 79, 130, 0.035) 12px,
      rgba(255, 255, 255, 0.18) 12px,
      rgba(255, 255, 255, 0.18) 24px
    );
}

.status-bar {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  color: #243447;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .landing-shell {
    grid-template-columns: 1fr;
  }

  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .module-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .module-button {
    flex: 1 1 180px;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .login-view {
    padding: 14px;
  }

  .marketing-panel,
  .login-card,
  .topbar,
  .module-card {
    padding: 20px;
  }

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

  .release-card-header {
    flex-direction: column;
  }

  .download-row {
    align-items: stretch;
    flex-direction: column;
  }

  .download-actions {
    justify-content: flex-start;
  }

  .app-view {
    padding: 10px;
  }

  .app-shell {
    min-height: calc(100vh - 20px);
    gap: 10px;
  }

  .status-bar {
    min-height: 40px;
    padding: 0 12px;
  }
}

.folder-explorer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}
.folder-explorer-modal {
  width: min(1100px, 96vw);
  max-height: 92vh;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.folder-explorer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.folder-explorer-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
}
.folder-explorer-breadcrumb {
  color: var(--muted);
  font-size: 13px;
  word-break: break-all;
}
.folder-explorer-body {
  padding: 12px 22px 18px;
  overflow: auto;
}
.folder-explorer-table {
  width: 100%;
  border-collapse: collapse;
}
.folder-explorer-table th,
.folder-explorer-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.folder-explorer-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.folder-icon,
.file-icon {
  margin-right: 8px;
}
.folder-explorer-status {
  color: #8a4b1f;
  margin-bottom: 10px;
  min-height: 20px;
}
