:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f1f5f9;
  color: #0f172a;
}

.chip {
  display: inline-flex;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.auth-shell {
  width: min(980px, 100%);
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.15fr 1fr;
}

.auth-brand,
.auth-card {
  border-radius: 20px;
  padding: 1.5rem;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.auth-brand {
  background: linear-gradient(140deg, #0f172a 0%, #1d4ed8 70%, #0ea5e9 100%);
  color: #f8fafc;
}

.auth-brand h1 {
  margin: 0.75rem 0 0.75rem;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.auth-brand p {
  margin: 0 0 1rem;
  opacity: 0.95;
  line-height: 1.45;
}

.auth-brand ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
  display: grid;
  gap: 0.55rem;
  font-size: 0.95rem;
}

.auth-card h2 {
  margin: 0;
  font-size: 1.8rem;
}

.auth-card > p {
  margin: 0.3rem 0 1rem;
  color: #475569;
}

.alert {
  margin-bottom: 0.9rem;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
}

.auth-form {
  display: grid;
  gap: 0.65rem;
}

label {
  font-weight: 600;
  color: #334155;
}

input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, #1d4ed8, #2563eb);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.apps-body {
  padding: 1.25rem;
}

.apps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto 1rem;
  width: min(1200px, 100%);
}

.apps-header h1 {
  margin: 0.55rem 0 0.2rem;
  font-size: clamp(1.5rem, 2vw, 2.1rem);
}

.subline {
  margin: 0;
  color: #475569;
}

.ghost {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding: 0.65rem 0.9rem;
}

.notice {
  width: min(1200px, 100%);
  margin: 0 auto 1rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
}

.grid {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
}

.card {
  border-radius: 16px;
  border: 1px solid #dbe3f0;
  background: #fff;
  padding: 1rem;
  display: grid;
  gap: 0.65rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon {
  font-size: 1.55rem;
}

.status {
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.status.live {
  background: #dcfce7;
  color: #166534;
}

.status.planned {
  background: #fef3c7;
  color: #92400e;
}

.card h2 {
  margin: 0;
  font-size: 1.06rem;
}

.card p {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.45;
}

.open {
  width: fit-content;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(90deg, #0f172a, #1d4ed8);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.86rem;
  font-weight: 600;
}

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

.workspace-body {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0.85rem;
  gap: 0.85rem;
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  border: 1px solid #dbe3f0;
  border-radius: 16px;
  background: #fff;
  padding: 0.75rem 0.9rem;
}

.workspace-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.workspace-icon {
  font-size: 1.45rem;
}

.workspace-title h1 {
  margin: 0.2rem 0 0;
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workspace-main {
  min-height: 0;
  border: 1px solid #dbe3f0;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.workspace-frame {
  border: 0;
  width: 100%;
  height: calc(100vh - 135px);
  display: block;
}

@media (max-width: 960px) {
  .workspace-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .workspace-actions > * {
    flex: 1;
  }
}
