/* ImmoScene Design System — tokens lifted from
   /Users/benjaminm/Projekte/immoscene/web/src/styles/global.css
   (canvas #FAFAF7, surface white, Inter 13px, Forest #0F4C3A accent). */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

.is-app {
  /* tokens */
  --is-canvas:    #FAFAF7;
  --is-surface:   #FFFFFF;
  --is-tag:       #F1EFE8;
  --is-text:      #1F2937;
  --is-text-2:    #444441;
  --is-text-3:    #5F5E5A;
  --is-text-q:    #888780;
  --is-forest:    #0F4C3A;
  --is-forest-s:  #E8F0EC;
  --is-warn:      #BA7517;
  --is-warn-s:    #FAEEDA;
  --is-danger:    #A32D2D;
  --is-danger-s:  #FCEBEB;
  --is-border:    #E0DED5;
  --is-border-s:  #EFEDE5;

  width: 1280px;
  height: 720px;
  background: var(--is-canvas);
  color: var(--is-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  box-sizing: border-box;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  display: grid;
  grid-template-rows: 56px 1fr;
  position: relative;
}

.is-app *, .is-app *::before, .is-app *::after { box-sizing: border-box; }

/* Auto-fit für Browser-Direktansicht (Iframe-Embed bleibt unverändert). */
@media (max-width: 1280px) {
  body > .is-app {
    transform-origin: top left;
    transform: scale(min(100vw / 1280, 100vh / 720));
  }
}

/* Top app header */
.is-header {
  background: var(--is-surface);
  border-bottom: 1px solid var(--is-border);
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
}
.is-brand { display: flex; align-items: center; gap: 10px; }
.is-brand .mark {
  width: 26px; height: 26px;
  border-radius: 4px;
  background: var(--is-forest);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 15px;
  line-height: 1;
}
.is-brand .wm { font-weight: 500; font-size: 15px; letter-spacing: -0.01em; color: var(--is-text); }
.is-brand .sub { font-size: 11px; color: var(--is-text-3); letter-spacing: 0.02em; margin-left: 4px; }

.is-nav { display: flex; gap: 0; align-self: stretch; }
.is-nav .tab {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px;
  font-size: 13px;
  color: var(--is-text-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.is-nav .tab.active { color: var(--is-text); border-bottom-color: var(--is-forest); font-weight: 500; }
.is-nav .tab .badge { font-size: 10px; padding: 1px 5px; border-radius: 3px; background: var(--is-tag); color: var(--is-text-2); }
.is-nav .tab .badge.forest { background: var(--is-forest-s); color: var(--is-forest); }

.is-account { display: flex; align-items: center; gap: 10px; }
.is-account .meta { font-size: 11px; color: var(--is-text-q); }
.is-account .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--is-tag);
  border: 1px solid var(--is-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--is-text-2); font-weight: 500;
}

/* Body */
.is-body { padding: 18px 24px; overflow: hidden; }

/* Page header (h1 + meta row above content) */
.is-page-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.is-page-head .title {
  font-size: 22px; font-weight: 500; letter-spacing: -0.015em; color: var(--is-text);
  font-family: Inter, sans-serif;
}
.is-page-head .meta { font-size: 12px; color: var(--is-text-3); }
.is-page-head .meta strong { color: var(--is-text); font-weight: 500; }

.is-breadcrumb { display: flex; gap: 6px; align-items: baseline; font-size: 12px; color: var(--is-text-3); margin-bottom: 4px; }
.is-breadcrumb a { color: var(--is-text-3); }
.is-breadcrumb .sep { color: var(--is-border); }
.is-breadcrumb .cur { color: var(--is-text); font-weight: 500; }

/* Cards */
.is-card {
  background: var(--is-surface);
  border: 1px solid var(--is-border);
  border-radius: 4px;
  padding: 16px 18px;
}
.is-card .card-title {
  font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--is-text-3); margin-bottom: 10px;
}
.is-card .card-title-row {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px;
}
.is-card .card-title-row .name { font-size: 14px; font-weight: 500; color: var(--is-text); }
.is-card .card-title-row .meta { font-size: 11px; color: var(--is-text-q); }

/* Metrics */
.is-metric {
  background: var(--is-surface);
  border: 1px solid var(--is-border);
  border-radius: 4px;
  padding: 14px 16px;
}
.is-metric .label {
  font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--is-text-3); margin-bottom: 8px;
}
.is-metric .value {
  font-size: 26px; font-weight: 500; line-height: 1.05; letter-spacing: -0.02em;
  color: var(--is-text); white-space: nowrap;
}
.is-metric .value .unit { font-size: 13px; font-weight: 400; color: var(--is-text-3); margin-left: 4px; letter-spacing: 0; }
.is-metric .sub { font-size: 11px; color: var(--is-text-q); margin-top: 6px; }
.is-metric.forest .value { color: var(--is-forest); }
.is-metric.warn .value { color: var(--is-warn); }
.is-metric.danger .value { color: var(--is-danger); }

/* Tag chip */
.is-tag {
  display: inline-block;
  font-size: 11px;
  background: var(--is-tag);
  padding: 2px 8px;
  border-radius: 3px;
  color: var(--is-text-2);
}
.is-tag.forest { background: var(--is-forest-s); color: var(--is-forest); }
.is-tag.warn   { background: var(--is-warn-s);   color: var(--is-warn);   }
.is-tag.danger { background: var(--is-danger-s); color: var(--is-danger); }
.is-tag.new {
  background: var(--is-forest); color: #fff; font-weight: 500; letter-spacing: 0.04em;
}

/* Section divider */
.is-divider { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 10px; }
.is-divider .name { font-size: 13px; font-weight: 500; color: var(--is-text); }
.is-divider .line { flex: 1; height: 1px; background: var(--is-border); }
.is-divider .meta { font-size: 11px; color: var(--is-text-q); }

/* KV row */
.is-kv {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--is-border-s);
  font-size: 13px;
}
.is-kv:last-child { border-bottom: 0; }
.is-kv .k { color: var(--is-text-3); font-size: 12px; }
.is-kv .v { color: var(--is-text); font-variant-numeric: tabular-nums; font-weight: 500; }
.is-kv .v.empty { color: var(--is-text-q); font-weight: 400; }
.is-kv .v .src { font-size: 10px; font-weight: 400; color: var(--is-forest); margin-left: 6px; text-transform: uppercase; letter-spacing: 0.06em; background: var(--is-forest-s); padding: 1px 6px; border-radius: 3px; }

/* Status pills */
.is-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500; padding: 3px 8px;
  border-radius: 3px;
}
.is-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.is-status.done    { background: var(--is-forest-s); color: var(--is-forest); }
.is-status.working { background: var(--is-warn-s);   color: var(--is-warn);   }
.is-status.open    { background: var(--is-tag);      color: var(--is-text-3); }
.is-status.new     { background: var(--is-forest);   color: #fff; }

/* Buttons (visual only) */
.is-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--is-border);
  background: var(--is-surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--is-text-2);
}
.is-btn.primary { background: var(--is-forest); border-color: var(--is-forest); color: #fff; }

/* Filter dropdown chip */
.is-filter {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--is-border);
  background: var(--is-surface);
  font-size: 12px;
  color: var(--is-text-2);
}
.is-filter .k { color: var(--is-text-q); font-size: 11px; }
.is-filter .caret { color: var(--is-text-q); font-size: 9px; }
