/* Office Manager layout. Colours, fonts and shared components (buttons, inputs, cards,
   tables, pills, chips, control bar) come from aodesk-theme.css — the AODesk Design System. */

/* login */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 1rem;
  background: linear-gradient(160deg, var(--blue-deep) 0%, var(--text-dark) 100%);
}
.login-card { width: min(380px, 100%); padding: 2rem 1.75rem; }
.login-logo { display: block; width: 220px; max-width: 100%; margin: 0 auto 1.5rem; }
.login-card h1 { font-size: 1.5rem; text-align: center; margin-bottom: .25rem; }
.login-card > .muted { text-align: center; margin: 0 0 1rem; }
.login-card button[type=submit] { width: 100%; margin-top: .5rem; padding: .7rem; }

/* app shell (the control bar itself is the design system's .topbar) */
.topbar { position: sticky; top: 0; z-index: 5; }
main { padding: var(--space-7) var(--space-6); max-width: 1140px; margin: 0 auto; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: .6rem; }
.inline-form input { flex: 1; min-width: 160px; }

/* device grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: var(--space-4); }
.device {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.device:hover { border-color: var(--primary); transform: translateY(-1px); }
.device .name { font: 700 15px var(--font-heading); color: var(--heading); margin-bottom: .2rem; }

/* rule suggestions */
.suggest { margin: 1.25rem 0 1.75rem; }
.suggest-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; }
.suggest-head p { margin: 0; }
.suggest-tabs { display: flex; gap: .4rem; margin: .9rem 0 1rem; }
.suggest-tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.suggest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: .9rem; }
.suggest-cat { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem; background: var(--surface); }
.suggest-cat-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.suggest-cat h3 { margin: 0; font-size: 1rem; }
.suggest-cat .why { margin: .3rem 0 .65rem; font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
/* a blocked chip unblocks on click, so its hover says so */
.chip.added:hover { background: var(--red-tint); border-color: var(--danger); color: var(--danger); }
.chip.added:hover::before { content: '\2715  '; }
.btn-pair { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.suggest-cat .link-btn { margin: 0 0 .65rem; }
.link-btn b { color: var(--heading); font-weight: 600; }

/* exceptions editor */
.access-list { border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 50vh; overflow: auto; margin: .8rem 0; }
.access-row {
  display: flex; align-items: center; gap: .75rem; margin: 0; padding: .65rem .9rem; cursor: pointer;
  border-bottom: 1px solid var(--grey-light); font-weight: 400;
}
.access-row:last-child { border-bottom: 0; }
.access-row:hover { background: var(--surface-tint); }
.access-row input { width: 18px; height: 18px; margin: 0; display: inline-block; flex: none; accent-color: var(--primary); }
.access-row > span { display: flex; flex-direction: column; line-height: 1.3; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0, 29, 61, .55); display: grid; place-items: center; z-index: 20; padding: 1rem; }
.modal-card { width: min(720px, 100%); max-height: 88vh; overflow: auto; position: relative; }
.modal-close {
  position: absolute; top: .6rem; right: .6rem; background: transparent; color: var(--muted);
  font-size: 22px; line-height: 1; padding: .2rem .5rem;
}
.modal-close:hover { background: var(--grey-light); color: var(--heading); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.shots img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.btn-row { display: flex; gap: var(--space-2); flex-wrap: wrap; margin: .8rem 0; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: .4rem .8rem; margin: .6rem 0; }
.kv div:nth-child(odd) { color: var(--muted); }

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; height: auto; padding: .6rem 1rem; gap: .5rem 1rem; }
  .topbar nav { order: 3; width: 100%; height: 40px; overflow-x: auto; }
  .brand-name { display: none; }
  main { padding: 1.25rem 1rem; }
  .kv { grid-template-columns: 1fr; }
  .inline-form select { flex: 1 1 28%; min-width: 0; }
  .inline-form input { flex: 1 1 100%; min-width: 0; }
  .inline-form button { flex: 1 1 100%; }
  .card { padding: 1rem; }
  .suggest-cat-head { flex-wrap: wrap; }
}

/* settings tab */
.settings-card { margin-bottom: var(--space-4); }
.settings-card h3 + .table-wrap, .settings-card form + .table-wrap { margin-top: .5rem; }
.settings-card h3:not(:first-child) { margin-top: 1.25rem; }
label.inline { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 500; }
.table input, .table select { width: 100%; min-width: 120px; }
label.inline input { display: inline-block; margin-top: 0; }
