@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@500;600&display=swap');

:root {
  --bg: #030506;
  --bg-soft: #06090b;
  --panel: rgba(9, 12, 15, 0.94);
  --panel-soft: rgba(12, 14, 18, 0.9);
  --panel-hover: rgba(15, 19, 24, 0.96);

  --text: #f5f7fa;
  --text-soft: #c9ced8;
  --muted: #7d879b;
  --muted-dark: #596173;

  --cyan: #21d7ff;
  --cyan-soft: rgba(33, 215, 255, 0.18);

  --purple: #885cff;
  --purple-soft: rgba(136, 92, 255, 0.18);

  --pink: #f22ebe;
  --pink-soft: rgba(242, 46, 190, 0.18);

  --success: #60d99b;
  --danger: #ff5b72;
  --warning: #ffca68;

  --line: rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.07);

  --gradient:
    linear-gradient(
      100deg,
      var(--cyan),
      var(--purple),
      var(--pink)
    );

  --gradient-soft:
    linear-gradient(
      135deg,
      rgba(33, 215, 255, 0.08),
      rgba(136, 92, 255, 0.06),
      rgba(242, 46, 190, 0.08)
    );

  --shadow:
    0 24px 70px rgba(0, 0, 0, 0.46);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(
      circle at 8% 4%,
      rgba(33, 215, 255, 0.08),
      transparent 30%
    ),
    radial-gradient(
      circle at 92% 8%,
      rgba(242, 46, 190, 0.07),
      transparent 28%
    ),
    radial-gradient(
      circle at 50% 110%,
      rgba(136, 92, 255, 0.06),
      transparent 35%
    ),
    #030506;
  font-family:
    Inter,
    Arial,
    Helvetica,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.28;
  background:
    linear-gradient(
      rgba(255, 255, 255, 0.008) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.008) 1px,
      transparent 1px
    );
  background-size: 48px 48px;
}

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

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

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

.eyebrow {
  color: #9099ac;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-shell {
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 80px;
}

.page-heading {
  margin: 0 0 28px;
}

.page-heading h1 {
  margin: 8px 0 4px;
  font-family:
    "Playfair Display",
    Georgia,
    serif;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.page-heading p {
  margin: 8px 0 0;
}

.topbar {
  width: min(1440px, calc(100% - 40px));
  min-height: 78px;
  margin: 20px auto 0;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(
      120deg,
      rgba(6, 14, 17, 0.96),
      rgba(11, 8, 14, 0.96)
    );
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.3);
}

.topbar::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 4%;
  right: 4%;
  height: 1px;
  background: var(--gradient);
  opacity: 0.92;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 21px;
  font-weight: 600;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 999px;
  background: var(--gradient);
  box-shadow:
    0 0 14px rgba(33, 215, 255, 0.55),
    0 0 22px rgba(242, 46, 190, 0.3);
}

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

.primary-button,
.secondary-button,
.danger-button,
.small-danger-button {
  border: 0;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition:
    transform 0.17s ease,
    border-color 0.17s ease,
    background 0.17s ease,
    opacity 0.17s ease;
}

.primary-button {
  min-height: 46px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background:
    linear-gradient(
      110deg,
      #1bd6ff,
      #7e61ff 55%,
      #ef2fbd
    );
  color: #fff;
  font-weight: 700;
  box-shadow:
    0 9px 26px rgba(102, 74, 255, 0.2);
}

.primary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.secondary-button {
  min-height: 42px;
  padding: 9px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background:
    rgba(255, 255, 255, 0.035);
  color: #fff;
  font-weight: 600;
}

.secondary-button:hover {
  transform: translateY(-1px);
  border-color:
    rgba(33, 215, 255, 0.3);
  background:
    rgba(255, 255, 255, 0.065);
}

.danger-button {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid
    rgba(255, 91, 114, 0.28);
  border-radius: 11px;
  background:
    rgba(255, 91, 114, 0.08);
  color: #ff8597;
  font-weight: 700;
}

.danger-button:hover {
  background:
    rgba(255, 91, 114, 0.14);
}

.small-danger-button {
  padding: 6px 10px;
  border: 1px solid
    rgba(255, 91, 114, 0.25);
  border-radius: 9px;
  background:
    rgba(255, 91, 114, 0.06);
  color: #ff788e;
  font-size: 12px;
  font-weight: 700;
}

button:disabled,
.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.status {
  min-height: 20px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.status:empty {
  min-height: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.status.loading {
  color: var(--cyan);
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

.login-shell,
.auth-shell,
.gate-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 20px;
}

.login-card,
.auth-card,
.gate-card {
  width: min(520px, 100%);
  position: relative;
  overflow: hidden;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      145deg,
      rgba(8, 17, 20, 0.96),
      rgba(15, 8, 16, 0.96)
    );
  box-shadow: var(--shadow);
}

.login-card::before,
.auth-card::before,
.gate-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: var(--gradient);
}

.login-card h1,
.auth-card h1,
.gate-card h1 {
  margin: 8px 0;
  font-family:
    "Playfair Display",
    Georgia,
    serif;
  font-size: clamp(38px, 7vw, 58px);
  font-weight: 500;
  line-height: 1.05;
}

.login-card p,
.auth-card p,
.gate-card p {
  color: var(--muted);
}

.google-button,
.google-login-button {
  width: 100%;
  min-height: 54px;
  margin-top: 20px;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid
    rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background:
    rgba(255, 255, 255, 0.045);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.google-button:hover,
.google-login-button:hover {
  border-color:
    rgba(33, 215, 255, 0.35);
  background:
    rgba(255, 255, 255, 0.07);
}

.dashboard-grid,
.tenant-grid,
.project-grid {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(260px, 1fr)
    );
  gap: 18px;
}

.tenant-card,
.project-card,
.dashboard-card {
  min-width: 0;
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(
      145deg,
      rgba(8, 16, 19, 0.94),
      rgba(16, 10, 17, 0.94)
    );
  box-shadow:
    0 15px 34px rgba(0, 0, 0, 0.22);
}

.tenant-card::before,
.project-card::before,
.dashboard-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--gradient);
}

.admin-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.admin-panel {
  min-width: 0;
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(
      145deg,
      rgba(8, 16, 19, 0.95),
      rgba(16, 10, 17, 0.95)
    );
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.24);
}

.admin-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 5%;
  right: 5%;
  height: 1px;
  background: var(--gradient);
  opacity: 0.8;
}

.full-panel {
  margin-top: 22px;
}

.panel-heading {
  min-height: 50px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading h2 {
  margin: 5px 0 0;
  color: #fff;
  font-family:
    "Playfair Display",
    Georgia,
    serif;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.15;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-stack label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.form-stack input,
.form-stack select,
.form-stack textarea {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background:
    rgba(0, 0, 0, 0.34);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  transition:
    border-color 0.17s ease,
    background 0.17s ease,
    box-shadow 0.17s ease;
}

.form-stack textarea {
  min-height: 110px;
  resize: vertical;
}

.form-stack input::placeholder,
.form-stack textarea::placeholder {
  color: #596174;
}

.form-stack input:focus,
.form-stack select:focus,
.form-stack textarea:focus {
  border-color:
    rgba(33, 215, 255, 0.5);
  background:
    rgba(0, 0, 0, 0.45);
  box-shadow:
    0 0 0 3px
    rgba(33, 215, 255, 0.07);
}

.form-stack select option {
  background: #0b0d11;
  color: #fff;
}

.form-stack .muted {
  margin-top: -2px;
  color: #687184;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-row {
  width: 100%;
  min-width: 0;
  padding: 15px 16px;
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(200px, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background:
    rgba(255, 255, 255, 0.025);
}

.admin-row > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-row > div:last-child {
  align-items: flex-end;
  text-align: right;
}

.admin-row strong {
  min-width: 0;
  color: #fff;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.admin-row span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.resource-admin-link {
  display: inline-block;
  max-width: 100%;
  color: var(--cyan);
  font-size: 12px;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.resource-admin-link:hover {
  text-decoration: underline;
}

.state-active {
  color: var(--success) !important;
}

.state-disabled {
  color: var(--danger) !important;
}

.log-row {
  grid-template-columns:
    minmax(0, 1fr)
    minmax(240px, 1.2fr);
}

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

.empty-state.compact {
  padding: 18px;
}

#workspaceHeader {
  width: min(1040px, 100%);
  margin: 0 auto 24px;
}

#workspaceHeader.hidden {
  display: none !important;
}

.workspace-header,
.workspace-heading {
  width: min(1040px, 100%);
  margin: 24px auto 0;
}

.workspace-header h1,
.workspace-heading h1,
#workspaceTitle {
  margin: 4px 0;
  font-family:
    "Playfair Display",
    Georgia,
    serif;
  font-weight: 500;
}

#workspaceDate {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

#workspaceStatus {
  width: min(1040px, 100%);
  margin-left: auto;
  margin-right: auto;
}

#sectionGrid {
  width: min(1040px, 100%);
  margin: 22px auto 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workspace-section {
  width: 100%;
  min-width: 0;
}

.section-button {
  width: 100%;
  min-height: 76px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background:
    rgba(255, 255, 255, 0.025);
  color: #fff !important;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.17s ease,
    background 0.17s ease,
    transform 0.17s ease;
}

.section-button:hover {
  transform: translateY(-1px);
  border-color:
    rgba(255, 255, 255, 0.16);
  background:
    rgba(255, 255, 255, 0.045);
}

.section-button.active {
  border-color:
    rgba(33, 215, 255, 0.2);
  border-bottom-color:
    var(--line-soft);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background:
    rgba(255, 255, 255, 0.045);
}

.section-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.folder-icon {
  width: 30px;
  height: 23px;
  flex: 0 0 30px;
  position: relative;
  border: 1px solid
    rgba(33, 215, 255, 0.28);
  border-radius: 5px;
  background:
    linear-gradient(
      135deg,
      rgba(33, 215, 255, 0.12),
      rgba(136, 92, 255, 0.08),
      rgba(242, 46, 190, 0.09)
    );
}

.folder-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -6px;
  width: 13px;
  height: 7px;
  border: 1px solid
    rgba(33, 215, 255, 0.28);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: #0b1115;
}

.section-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.section-button h2 {
  margin: 0;
  color: #fff !important;
  font-family:
    Inter,
    Arial,
    sans-serif;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.section-count {
  color: #707b8f !important;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.section-chevron {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  margin-right: 4px;
  border-right: 1.5px solid #8d96a7;
  border-bottom: 1.5px solid #8d96a7;
  transform: rotate(45deg);
  transition:
    transform 0.17s ease,
    border-color 0.17s ease;
}

.section-button.active .section-chevron {
  transform: rotate(225deg);
  border-color: #dce2ea;
}

.section-content {
  width: 100%;
  padding: 12px;
  border: 1px solid
    rgba(255, 255, 255, 0.08);
  border-top: 0;
  border-radius: 0 0 15px 15px;
  background:
    rgba(255, 255, 255, 0.012);
}

.section-content.hidden {
  display: none !important;
}

.resource-list {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );
  gap: 9px;
}

.section-empty {
  width: 100%;
  padding: 16px;
  color: #687285;
  font-size: 12px;
  text-align: center;
}

.resource-card {
  width: 100%;
  min-height: 66px;
  margin: 0;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid
    rgba(255, 255, 255, 0.075);
  border-radius: 11px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background:
    rgba(255, 255, 255, 0.025);
  color: #ffffff !important;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.17s ease,
    border-color 0.17s ease,
    background 0.17s ease;
}

.resource-card:hover {
  transform: translateY(-1px);
  border-color:
    rgba(33, 215, 255, 0.22);
  background:
    rgba(255, 255, 255, 0.045);
}

.resource-card:active {
  transform: translateY(0);
}

.resource-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid
    rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background:
    linear-gradient(
      135deg,
      rgba(33, 215, 255, 0.1),
      rgba(136, 92, 255, 0.08),
      rgba(242, 46, 190, 0.09)
    );
  color: #fff !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.resource-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #fff !important;
}

.resource-info strong {
  display: block;
  margin: 0;
  color: #fff !important;
  font-family:
    Inter,
    Arial,
    sans-serif;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.resource-info span {
  display: block;
  margin: 0;
  color: #717b8e !important;
  font-family:
    Inter,
    Arial,
    sans-serif;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  text-transform: capitalize;
}

.resource-arrow {
  flex: 0 0 auto;
  padding-left: 4px;
  color: #9aa3b2 !important;
  font-family:
    Inter,
    Arial,
    sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 24px;
  display: grid;
  place-items: center;
  background:
    rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(10px);
}

.modal.hidden {
  display: none !important;
}

.modal-card,
.modal-content,
.tenant-login-card {
  width: min(440px, 100%);
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(
      145deg,
      rgba(8, 17, 20, 0.99),
      rgba(18, 10, 18, 0.99)
    );
  box-shadow: var(--shadow);
}

.modal-card::before,
.modal-content::before,
.tenant-login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 7%;
  right: 7%;
  height: 1px;
  background: var(--gradient);
}

.modal-card h2,
.modal-content h2,
.tenant-login-card h2 {
  margin: 0 0 8px;
  color: #fff;
  font-family:
    "Playfair Display",
    Georgia,
    serif;
  font-size: 28px;
  font-weight: 500;
}

#tenantLoginModal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 24px;
  display: grid;
  place-items: center;
  background:
    rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

#tenantLoginModal.hidden {
  display: none !important;
}

#tenantLoginModal > div,
#tenantLoginModal > section,
#tenantLoginModal > article,
#tenantLoginModal form {
  max-width: 100%;
}

#tenantLoginForm {
  width: min(430px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#tenantLoginForm label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

#tenantLoginForm input {
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background:
    rgba(0, 0, 0, 0.4);
  color: #fff;
}

#tenantLoginForm input:focus {
  border-color:
    rgba(33, 215, 255, 0.48);
}

.unauthorized-shell,
.error-shell {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
}

.unauthorized-card,
.error-card {
  width: min(520px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  text-align: center;
  box-shadow: var(--shadow);
}

.unauthorized-card h1,
.error-card h1 {
  margin-top: 0;
  font-family:
    "Playfair Display",
    Georgia,
    serif;
  font-weight: 500;
}

@media (max-width: 1100px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 850px) {
  .page-shell {
    width: min(
      100% - 30px,
      1380px
    );
  }

  .topbar,
  #workspaceHeader {
    width: calc(100% - 30px);
  }

  #sectionGrid,
  #workspaceStatus,
  .workspace-header,
  .workspace-heading {
    width: calc(100% - 30px);
  }

  .admin-row,
  .log-row {
    grid-template-columns: 1fr;
  }

  .admin-row > div:last-child {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .topbar {
    min-height: 68px;
    margin-top: 10px;
    padding: 13px 14px;
    border-radius: 16px;
  }

  .brand-link {
    font-size: 17px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .secondary-button {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 12px;
  }

  .page-shell {
    width: calc(100% - 24px);
    padding-top: 22px;
  }

  #workspaceHeader {
    width: calc(100% - 20px);
    margin-top: 10px;
  }

  #workspaceStatus,
  .workspace-header,
  .workspace-heading {
    width: calc(100% - 24px);
  }

  #sectionGrid {
    width: calc(100% - 24px);
    margin-top: 18px;
    gap: 9px;
  }

  .section-button {
    min-height: 70px;
    padding: 13px 14px;
  }

  .section-main {
    gap: 12px;
  }

  .section-button h2 {
    font-size: 15px;
  }

  .folder-icon {
    width: 27px;
    height: 21px;
    flex-basis: 27px;
  }

  .resource-list {
    grid-template-columns: 1fr;
  }

  .resource-card {
    min-height: 62px;
    padding: 10px 11px;
  }

  .admin-panel {
    padding: 18px;
  }

  .panel-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .login-card,
  .auth-card,
  .gate-card,
  .modal-card,
  .modal-content,
  .tenant-login-card {
    padding: 23px;
  }
}

body.agreement-open {
  overflow: hidden;
}

#agreementModal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  padding: 24px;
  display: grid;
  place-items: center;
  background:
    rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
}

#agreementModal.hidden {
  display: none !important;
}

.agreement-card {
  width: min(820px, 100%);
  max-height: calc(100vh - 48px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(
      145deg,
      rgba(8, 17, 20, 0.995),
      rgba(18, 10, 18, 0.995)
    );
  box-shadow: var(--shadow);
}

.agreement-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: var(--gradient);
}

.agreement-header {
  padding: 26px 28px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.agreement-header h2 {
  margin: 7px 0 0;
  color: #fff;
  font-family:
    "Playfair Display",
    Georgia,
    serif;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 500;
  line-height: 1.12;
}

.agreement-copy {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  color: #c9ced8;
  font-size: 13px;
  line-height: 1.72;
  white-space: pre-wrap;
  scrollbar-width: thin;
  scrollbar-color:
    rgba(255, 255, 255, 0.2)
    transparent;
}

.agreement-copy::-webkit-scrollbar {
  width: 8px;
}

.agreement-copy::-webkit-scrollbar-track {
  background: transparent;
}

.agreement-copy::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background:
    rgba(255, 255, 255, 0.18);
}

.agreement-form {
  padding: 20px 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--line-soft);
  background:
    rgba(0, 0, 0, 0.2);
}

.agreement-checkbox {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 11px;
  align-items: start;
  color: #e7ebf1;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
}

.agreement-checkbox input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--cyan);
}

.agreement-signature {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.agreement-signature input {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background:
    rgba(0, 0, 0, 0.42);
  color: #fff;
}

.agreement-signature input:focus {
  border-color:
    rgba(33, 215, 255, 0.5);
  box-shadow:
    0 0 0 3px
    rgba(33, 215, 255, 0.07);
}

.agreement-record-note {
  margin: 0;
  color: #70798b;
  font-size: 10px;
  line-height: 1.45;
}

#agreementSubmitButton {
  width: 100%;
}

#agreementStatus {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  #agreementModal {
    padding: 10px;
  }

  .agreement-card {
    max-height: calc(100vh - 20px);
    border-radius: 16px;
  }

  .agreement-header {
    padding: 20px 18px 14px;
  }

  .agreement-header h2 {
    font-size: 26px;
  }

  .agreement-copy {
    padding: 18px;
    font-size: 12px;
    line-height: 1.65;
  }

  .agreement-form {
    padding: 16px 18px 18px;
  }
}
body.canva-preview-open {
  overflow: hidden;
}

.canva-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.89);
  backdrop-filter: blur(12px);
}

.canva-preview-dialog {
  width: min(1280px, 100%);
  max-height: calc(100dvh - 32px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #090c11;
  box-shadow: var(--shadow);
}

.canva-preview-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.canva-preview-heading {
  min-width: 0;
}

.canva-preview-heading h2 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: clamp(18px, 2.8vw, 26px);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.canva-preview-header .secondary-button {
  flex-shrink: 0;
}

.canva-preview-stage {
  position: relative;
  width: 100%;
  min-height: 240px;
  height: min(72dvh, 780px);
  overflow: hidden;
  background: #07090d;
  isolation: isolate;
}

#canvaPreviewFrame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #07090d;
}

.canva-preview-watermark {
  position: absolute;
  inset: -14%;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: 14px;
  overflow: hidden;
  transform: rotate(-17deg);
  pointer-events: none;
  user-select: none;
}

.canva-preview-mark {
  max-width: 100%;
  color: rgba(255, 255, 255, 0.28);
  font-size: clamp(10px, 1.15vw, 15px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.78);
  overflow-wrap: anywhere;
}

.canva-preview-banner {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(3, 5, 8, 0.82);
  color: #f5f7fa;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  pointer-events: none;
  user-select: none;
}

.canva-preview-notice {
  margin: 0;
  padding: 12px 20px 16px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 600px) {
  .canva-preview-modal {
    padding: 8px;
  }

  .canva-preview-dialog {
    max-height: calc(100dvh - 16px);
    border-radius: 14px;
  }

  .canva-preview-header {
    padding: 12px;
    align-items: flex-start;
    gap: 10px;
  }

  .canva-preview-heading .eyebrow {
    font-size: 9px;
  }

  .canva-preview-header .secondary-button {
    padding: 8px 10px;
    font-size: 11px;
  }

  .canva-preview-stage {
    height: 68dvh;
  }

  .canva-preview-watermark {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .canva-preview-mark {
    font-size: 9px;
  }

  .canva-preview-banner {
    font-size: 8px;
    padding: 9px 12px;
  }

  .canva-preview-notice {
    padding: 10px 12px 12px;
    font-size: 11px;
  }
}
