/* AGRM identity v1.0. Load after the existing workspace styles.
   Supplied outlined logos are used intact; font OFL notices are bundled. */
@font-face {
  font-family: "Manrope";
  src: url("./fonts/Manrope-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("./fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("./fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --agrm-forest: #163F35;
  --agrm-ink: #17332D;
  --agrm-clay: #E97551;
  --agrm-cream: #F6F3EC;
  --agrm-sage: #DDE7DA;
  --agrm-mist: #EEF2EB;
  --agrm-muted: #53675E;
  --agrm-line: #CFD7CC;
  --agrm-white: #FFFFFF;
  --agrm-clayText: #A53F25;
  --agrm-tint: #FBE4D9;
  --font-ui: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-editorial: "Instrument Serif", Georgia, serif;
  --color-focus: var(--agrm-clayText);
  /* Line is for dividers. Essential controls use the stronger muted boundary. */
  --control-line: var(--agrm-muted);
  --paper: var(--agrm-cream);
  --card: var(--agrm-white);
  --ink: var(--agrm-ink);
  --muted: var(--agrm-muted);
  --quiet: var(--agrm-muted);
  --green: var(--agrm-forest);
  --green-dark: var(--agrm-forest);
  --mint: var(--agrm-sage);
  --line: var(--agrm-line);
  --red: var(--agrm-clayText);
  --soft-red: var(--agrm-tint);
  --amber: var(--agrm-clayText);
  --gold: var(--agrm-clayText);
  color: var(--agrm-ink);
  background: var(--agrm-cream);
  font-family: var(--font-ui);
  font-synthesis: none;
}

body {
  background: var(--agrm-cream);
  color: var(--agrm-ink);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font-family: var(--font-ui); }
.manager-dialog, .media-library-dialog { font-family: var(--font-ui); }
.manager-workspace {
  --mg-ink: var(--agrm-ink);
  --mg-muted: var(--agrm-muted);
  --mg-green: var(--agrm-forest);
  --mg-teal: var(--agrm-forest);
  --mg-line: var(--agrm-line);
  --mg-paper: var(--agrm-cream);
  --mg-white: var(--agrm-white);
  --mg-soft: var(--agrm-mist);
}
.onboarding-workspace {
  --ob-ink: var(--agrm-ink);
  --ob-muted: var(--agrm-muted);
  --ob-line: var(--agrm-line);
  --ob-paper: var(--agrm-white);
}
.media-library {
  --ml-ink: var(--agrm-ink);
  --ml-green: var(--agrm-forest);
  --ml-muted: var(--agrm-muted);
  --ml-line: var(--agrm-line);
  background: var(--agrm-white);
}
.ops-workspace { --ops-ink: var(--agrm-ink); --ops-muted: var(--agrm-muted); }

/* Editorial introductions; data, labels and monetary amounts stay in Manrope. */
.page-heading h1, .manager-workspace .mg-page-heading h1,
.hero h2, .panel h2.serif, .loading-state h1, .dialog-header h2,
.view-empty-main .empty-state h3, .mg-hero-copy h2, .mg-hero-caption strong,
.mg-panel-heading h2, .mg-empty h3, .mg-property-title h3,
.mg-dialog-header h2, .ob-heading h1, .rv-empty h3, .ml-heading h2,
.ml-dropzone h3, .ml-upload-guide h3, .ml-library-heading h3,
.ml-dialog-heading h2, .login-card h1, .team-heading h1,
.team-panel-heading h2, .team-empty h3 {
  font-family: var(--font-editorial);
  font-weight: 400;
}
.date-title, .state-display strong, .insight-number,
.mg-next-arrival > strong, .metric strong, .mg-metric strong,
.rv-metrics strong, .rv-quote-price > strong, .ops-metrics strong,
.team-summary strong, table, .calendar-workspace .date-title .button {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
}

.sidebar { background: var(--agrm-mist); border-color: var(--agrm-line); }
.brand {
  padding: 12px 12px 27px;
  min-width: 0;
  letter-spacing: normal;
}
.brand-logo { display: block; width: 180px; max-width: 100%; height: auto; }
.login-brand, .team-brand { padding: 12px; margin-left: -12px; min-width: 0; }
.login-brand-logo, .team-brand-logo {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}
.loading-mark { display: block; width: 52px; height: 52px; margin: 0 auto 20px; }
.topbar { background: var(--agrm-white); }
.workspace-status-bar, .hero, .calendar-selection { background: var(--agrm-mist); }
.owner-avatar, .property-icon, .empty-symbol { background: var(--agrm-sage); color: var(--agrm-forest); }
.nav-link, .sidebar-help, .sidebar-bottom p, .topbar-left,
.icon-button, .workspace-status-bar, .workspace-status-bar a { color: var(--agrm-muted); }
.nav-link:hover, .icon-button:hover { background: var(--agrm-sage); }
.nav-link.active { background: var(--agrm-forest); color: var(--agrm-cream); }
.nav-link .nav-count { background: var(--agrm-cream); color: var(--agrm-forest); }
.property-selector { background: var(--agrm-white); border-color: var(--control-line); }

.button, .mg-primary, .ml-primary, .team-primary, #login-submit,
.login-local-link { background: var(--agrm-forest); color: var(--agrm-cream); border-color: var(--agrm-forest); }
.button:hover, .mg-primary:hover, .ml-primary:hover, .team-primary:hover,
#login-submit:hover, .login-local-link:hover { background: var(--agrm-ink); border-color: var(--agrm-ink); }
.button.secondary, .button.subtle, .mg-secondary, .mg-quiet,
.ml-secondary, .team-secondary, .login-retry, #team-logout {
  background: var(--agrm-white);
  color: var(--agrm-forest);
  border-color: var(--control-line);
}
.button.secondary:hover, .button.subtle:hover, .mg-secondary:hover,
.mg-quiet:hover, .ml-secondary:hover, .team-secondary:hover,
.login-retry:hover, #team-logout:hover { background: var(--agrm-mist); }
.button.danger { background: var(--agrm-tint); color: var(--agrm-clayText); border-color: var(--agrm-clayText); }
.button.danger:hover { background: var(--agrm-cream); }
.mg-danger { background: var(--agrm-clayText); color: var(--agrm-white); border-color: var(--agrm-clayText); }
.mg-danger:hover { background: var(--agrm-ink); }
.mg-light { background: var(--agrm-cream); color: var(--agrm-forest); border-color: var(--agrm-cream); }
.mg-light:hover { background: var(--agrm-white); }
.mg-tabs button { color: var(--agrm-muted); }
.mg-tabs button[aria-selected=true] { color: var(--agrm-forest); border-bottom-color: var(--agrm-forest); }
.mg-tabs button > span { background: var(--agrm-mist); }
.mg-portfolio-hero { background: var(--agrm-forest); border-color: var(--agrm-forest); --color-focus: var(--agrm-cream); }
.mg-hero-copy, .mg-hero-copy > p, .mg-hero-copy > .mg-kicker,
.mg-hero-link { color: var(--agrm-cream); }
.mg-hero-link:hover { background: transparent; }

.pill, .team-pill, .rv-badge, .ops-state, .ops-priority {
  background: var(--agrm-mist);
  color: var(--agrm-muted);
}
.pill.green, .team-complete { background: var(--agrm-sage); color: var(--agrm-forest); }
.pill.amber, .pill.red, .rv-badge-warn, .priority-urgent .ops-priority,
.priority-high .ops-priority { background: var(--agrm-tint); color: var(--agrm-clayText); }
.pill.blue { background: var(--agrm-mist); color: var(--agrm-forest); }
.form-error, .mg-dialog-error, .rv-error, .rv-alert, .ops-error,
.ml-error, .ml-dialog-error, .login-error, .team-error {
  background: var(--agrm-tint);
  color: var(--agrm-clayText);
  border-color: var(--agrm-clayText);
}

.panel-header p, .section-note, .empty-state p, .list-row p,
.attention-row p, .metric small, .connection small, .note-small,
.property-source, .property-facts span, .profile-banner p, .definition-list dt,
.timeline-item p, .timeline-item time, .task-card p, .task-bottom,
.conversation-header p, .message-bubble small, .requirement p,
.requirement-meta, .setup-checklist p, .builder-controls .hint,
.builder-history .iteration p, .media-info small, .rights-details p,
.provider-row p, .provider-row small, .audit-row time, .audit-row p,
.form-field small, .dialog-header p, .owner-label small, .hero p,
.record-card p, .record-card .record-meta, .provider-mini p,
.provider-detail-note, .provider-steps, .setup-progress, .policy-document p,
.policy-dates span, .provider-technical, .rules-caption, .calendar-navigation p,
.calendar-selection p, .calendar-open-day, .calendar-original p,
.mg-field small, .mg-scope-label > span, .mg-kicker, .ml-kicker,
.login-header-label, .login-eyebrow, .login-intro, .login-status,
.login-field small, .login-help, .login-setup p, .team-account,
.team-eyebrow, .team-heading p, .team-property-bar label,
#team-property-location, .team-status, .team-summary span,
.team-panel-heading p, .team-task-top p, .team-checklist-heading span,
.team-check input:checked + span, .team-task-note, .team-task-footer p,
.team-empty p, .team-history summary span, .team-occupancy-row p {
  color: var(--agrm-muted);
}
.form-field label, .builder-controls label, .mg-field label,
.login-field label, .team-check, .team-checklist-heading strong,
.team-history summary { color: var(--agrm-ink); }
.team-task.is-overdue .team-task-top p { color: var(--agrm-clayText); }
.team-readonly, .team-row-icon, .team-empty > span,
.login-setup-icon { background: var(--agrm-mist); color: var(--agrm-forest); }
.team-property-bar, .team-task-footer { background: var(--agrm-mist); }
.login-card, .team-panel, .team-summary, .team-task { background: var(--agrm-white); border-color: var(--agrm-line); }
.team-summary strong { color: var(--agrm-forest); }
.login-footer, .team-footer { font-family: var(--font-editorial); font-style: italic; color: var(--agrm-muted); }

/* Essential control edges remain distinguishable from every pale surface. */
.form-field input, .form-field select, .form-field textarea,
.site-edit-form .form-field input, .site-edit-form .form-field select,
.site-edit-form .form-field textarea, .mg-field input, .mg-field textarea,
.rv-field input, .rv-field select, .rv-field textarea,
.ops-field input, .ops-field select, .ops-field textarea,
.ops-search input, .ops-filter select, .ml-field input, .ml-field textarea,
.login-field input, .login-field select, #team-property,
.calendar-navigation input, .ob-notes textarea, .builder-controls textarea {
  color: var(--agrm-ink);
  background: var(--agrm-white);
  border-color: var(--control-line);
}
.mg-search, .mg-jump-search, .ml-dropzone { border-color: var(--control-line); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--agrm-forest); }
input::placeholder, textarea::placeholder { color: var(--agrm-muted); opacity: 1; }
.calendar-date { color: var(--agrm-ink); }
.calendar-day.outside .calendar-date { color: var(--agrm-muted); }
.calendar-date:hover, .calendar-day.range-selected { background: var(--agrm-sage); }
.calendar-day.today .calendar-date, .calendar-day.range-start .calendar-date { background: var(--agrm-forest); color: var(--agrm-cream); }
.calendar-day.range-start { box-shadow: inset 3px 0 var(--agrm-forest); }
.calendar-day.range-checkout { box-shadow: inset 0 0 0 2px var(--agrm-muted); }
.skip-link, .login-skip, .team-skip { background: var(--agrm-forest); color: var(--agrm-cream); }

/* Focus is drawn outside controls; dark panels use Linen for their surrounding surface. */
.agrm-on-dark { --color-focus: var(--agrm-cream); }
:focus-visible { outline: 3px solid var(--color-focus) !important; outline-offset: 3px !important; }
@media (max-width: 540px) {
  .login-brand-logo, .team-brand-logo { width: 140px; }
  .brand-logo { width: 180px; }
  .login-card h1, .team-heading h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) { .brand-logo, .loading-mark { animation: none; transition: none; } }
@media (forced-colors: active) { :focus-visible { outline-color: Highlight !important; } }
