/* IC_DESIGN_INSTALLCARE_191 - shared visual layer for IC Service Web, Mobile and mapping views.
   Assets are local; no change to backend, roles, forms or navigation. */
:root {
  --ic-brand-orange: #f47721;
  --ic-brand-cyan: #00baf2;
  --ic-brand-blue: #077ee5;
  --ic-brand-navy: #172b43;
  --ic-radius-sm: 9px;
  --ic-radius-md: 13px;
  --ic-radius-lg: 17px;
  --ic-elevation: 0 8px 26px rgba(22, 42, 70, .065);
  --ic-focus: 0 0 0 3px rgba(244, 119, 33, .18);
}
:root[data-ic-theme="dark"] {
  --ic-elevation: 0 10px 30px rgba(0,0,0,.23);
}
/* One prominent InstallCare logo in the existing IC Service Web sidebar. */
.layout .sidebar .brand {
  display: block;
  width: 100%;
  height: 77px;
  min-height: 77px;
  flex: 0 0 77px;
  border-radius: 13px;
  margin: 0 0 7px;
  padding: 0;
  background: #fff url('/ic-brand/installcare-logo.png') center / min(94%, 202px) auto no-repeat;
  box-shadow: 0 7px 22px rgba(2, 10, 25, .16);
  overflow: hidden;
}
.layout .sidebar .brand > * { visibility: hidden; }
.layout .sidebar { background: linear-gradient(180deg,#132338 0%,#142235 65%,#101d2e 100%); }
.layout .sidebar .navbtn { transition: background .14s ease, color .14s ease, box-shadow .14s ease; border-radius: 10px; }
.layout .sidebar .navbtn.active { background: linear-gradient(105deg,#f47721,#e95f1b); box-shadow: 0 4px 16px rgba(234,94,29,.22); }
.layout .sidebar .navtitle { color: #91a4bb; }
/* Login and loading view: full horizontal logo from user's supplied brand pack. */
.authleft .brandlogo,
.loading .brandlogo {
  display: block;
  width: min(290px,100%);
  height: 106px;
  border-radius: 15px;
  padding: 0;
  font-size: 0;
  background: #fff url('/ic-brand/installcare-logo.png') center / 93% auto no-repeat;
  box-shadow: 0 12px 35px rgba(0,0,0,.16);
}
.loading .brandlogo { width: 226px; height: 84px; box-shadow: var(--ic-elevation); }
.authleft { background: radial-gradient(circle at 26% 18%,#26445f 0%,#1a2d42 47%,#111e2d 100%); }
.authleft h1 { letter-spacing: -.045em; }
.authleft p { color: #cfdaeb; }
/* Shared card, spacing and typography refinement. These rules do not change app layout/logic. */
.layout .content .panel,
.layout .content .stat,
.layout .content .doccard,
.layout .content .ftthmodel,
.authcard {
  border-radius: var(--ic-radius-lg);
  box-shadow: var(--ic-elevation);
}
.layout .content .panel,
.layout .content .stat { border-color: var(--border); }
.layout .topbar { background: var(--surface); }
.layout .topbar .topsearch { background: var(--surface2); border-radius: 11px; }
.layout .content .pagehead h1 { letter-spacing: -.035em; }
.layout .content .btn { border-radius: var(--ic-radius-sm); transition: background .15s ease,border-color .15s ease,transform .15s ease; }
.layout .content .btn.primary { background: #f47721; border-color: #f47721; }
.layout .content .btn.primary:hover { background: #e76518; border-color: #e76518; }
.layout .content .panelhead { gap: 14px; }
.layout .content .field,
.authcard .field { border-radius: 10px; background: var(--surface); color: var(--text); border-color: var(--border); }
.layout .content .field:focus,
.authcard .field:focus { box-shadow: var(--ic-focus); outline: 1px solid #f47721; }
.layout .content .formgroup, .layout .content .formsection { color: var(--text); }
.layout .content .table th { background: var(--surface2); color: var(--muted); }
.layout .content .table td { border-color: var(--border); }
.layout .content .table tbody tr:hover td { background: var(--surface2); }
.layout .content .tabs button { white-space: nowrap; }
.layout .content .tabs button.active { color: var(--ic-brand-orange); border-bottom-color: var(--ic-brand-orange); }
/* Light and dark mode should give the same hierarchy to login, forms and badges. */
:root[data-ic-theme="dark"] .layout .content .formgroup,
:root[data-ic-theme="dark"] .layout .content .formsection { color: var(--text); }
:root[data-ic-theme="dark"] .layout .content .table th,
:root[data-ic-theme="dark"] .layout .content .field,
:root[data-ic-theme="dark"] .layout .topbar .topsearch { background: var(--surface2); }
:root[data-ic-theme="dark"] .layout .content .table tbody tr:hover td { background: #283b4e; }
:root[data-ic-theme="dark"] .authleft { background: radial-gradient(circle at 25% 20%,#25435f,#121d2c 64%); }
:root[data-ic-theme="dark"] .layout .content .panel,
:root[data-ic-theme="dark"] .layout .content .stat,
:root[data-ic-theme="dark"] .authcard { box-shadow: var(--ic-elevation); }
/* Full InstallCare logo in Mobile header, while retaining one account menu and tabs. */
.shell header .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0;
  line-height: 1;
  letter-spacing: 0;
}
.shell header .brand .logo { display: none; }
.shell header .brand::before {
  content: '';
  display: block;
  width: 146px;
  height: 49px;
  flex: 0 0 146px;
  background: #fff url('/ic-brand/installcare-logo-small.png') center / 96% auto no-repeat;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,.16);
}
.shell header .brand::after { content: 'Mobile'; color:#cdd8e9; font-size:12px; font-weight:750; }
.shell header { background: linear-gradient(135deg,#14253b,#1b324b); }
.shell .panel,.shell .stat { border-radius: 16px; box-shadow:var(--ic-elevation); }
.shell .btn { border-radius: 11px; font-weight: 750; transition: filter .15s ease,transform .15s ease; }
.shell .btn:not(:disabled):active { transform:scale(.985); }
.shell .btn:not(.secondary) { background:#f47721; }
.shell main h1 { letter-spacing: -.045em; }
.shell .form input,.shell .form textarea,.shell .form select { border-radius: 11px; }
.shell .form input:focus,.shell .form select:focus,.shell .form textarea:focus { outline:1px solid #f47721;box-shadow:var(--ic-focus); }
.shell nav button { border-radius:11px; min-width:0; }
.shell nav button.active { background: #fff0e6; color:#ae4b12; }
.shell .wh-switch { align-items:stretch; }
.shell .mobile-account-dropdown { border-radius:14px;box-shadow:var(--ic-elevation); }
:root[data-ic-theme="dark"] .shell .panel,
:root[data-ic-theme="dark"] .shell .stat { background:#1e2b3a;color:#e9eff7;border-color:#394a5d; }
:root[data-ic-theme="dark"] .shell .form input,
:root[data-ic-theme="dark"] .shell .form select,
:root[data-ic-theme="dark"] .shell .form textarea { background:#27384c;color:#eff5fb;border-color:#4c5e73; }
:root[data-ic-theme="dark"] .shell .muted,
:root[data-ic-theme="dark"] .shell .stat span { color:#bac9db; }
:root[data-ic-theme="dark"] .shell nav button.active { background:#453023;color:#ffc496; }
/* Map and schedule use their own page/CSS: same identity, palette, surfaces and dark theme. */
.app-header .brandmark {
  width: 42px;
  height: 42px;
  background: #fff url('/ic-brand/installcare-icon-192.png') center / 88% auto no-repeat;
  border-radius: 10px;
  font-size:0;
  flex:0 0 42px;
  box-shadow:0 4px 14px rgba(0,0,0,.13);
}
.app-header { background:#16263c; }
.app-header .heading span { color:#a8bdd1; }
.app-header .view-tabs a.selected { background:#f47721; }
.schedule-area,.route-sheet { color:#1b2c40; }
.schedule-area .agenda-item,.schedule-area .week-day,.schedule-area .schedule-stats>div,
.route-sheet .stop-card { border-radius: 13px; }
.schedule-area .agenda-item:hover { border-color:#f47721; }
:root[data-ic-theme="dark"] .schedule-area { background:#111a25;color:#e9eff7; }
:root[data-ic-theme="dark"] .schedule-area .schedule-head h2,
:root[data-ic-theme="dark"] .schedule-area .schedule-subtitle,
:root[data-ic-theme="dark"] .schedule-area .agenda-hour,
:root[data-ic-theme="dark"] .schedule-area .agenda-detail strong,
:root[data-ic-theme="dark"] .schedule-area .schedule-stats strong { color:#edf4ff; }
:root[data-ic-theme="dark"] .schedule-area .week-day,
:root[data-ic-theme="dark"] .schedule-area .schedule-stats>div,
:root[data-ic-theme="dark"] .schedule-area .agenda-item,
:root[data-ic-theme="dark"] .schedule-area .unscheduled-item,
:root[data-ic-theme="dark"] .schedule-area .schedule-empty,
:root[data-ic-theme="dark"] .schedule-area .schedule-switch button,
:root[data-ic-theme="dark"] .schedule-area .schedule-editor,
:root[data-ic-theme="dark"] .route-sheet,
:root[data-ic-theme="dark"] .route-sheet .stop-card,
:root[data-ic-theme="dark"] .route-sheet .secondary-action,
:root[data-ic-theme="dark"] .route-sheet .search-input,
:root[data-ic-theme="dark"] .detail-drawer,
:root[data-ic-theme="dark"] .detail-actions a,
:root[data-ic-theme="dark"] .detail-actions button {
  background:#1e2b3a; color:#e9eff7; border-color:#394a5d;
}
:root[data-ic-theme="dark"] .route-sheet .stop-title,
:root[data-ic-theme="dark"] .detail-drawer h2,
:root[data-ic-theme="dark"] .empty-state strong { color:#f5f9ff; }
:root[data-ic-theme="dark"] .schedule-area .week-day.selected { background:#49321f;color:#ffca99;border-color:#f47721; }
:root[data-ic-theme="dark"] .schedule-area .schedule-editor input { background:#27384c;color:#f1f7ff;border-color:#536579; }
:root[data-ic-theme="dark"] .detail-drawer p { color:#cad6e5; }
:root[data-ic-theme="dark"] .detail-close { background:#27384c;color:#f1f7ff; }
:root[data-ic-theme="dark"] .route-sheet .filters-row button:not(.selected) { color:#e9eff7;border-color:#394a5d;background:#27384c; }
@media(max-width:490px) {
  .shell header .brand::before { width: 120px;height: 43px;flex-basis:120px; }
  .shell header .brand::after { display:none; }
  .shell header { padding: 12px; }
  .shell .headrow { gap: 8px; }
  .shell .mobile-account-trigger { gap:4px; padding:5px 6px; }
  .shell .mobile-avatar { width:25px;height:25px; }
}
@media(max-width:370px) {
  .shell header .brand::before { width:105px;height:40px;flex-basis:105px; }
  .shell .mobile-account-trigger span:not(.mobile-avatar) { font-size:10px; }
}
@media(prefers-reduced-motion:reduce){
  .layout .sidebar .navbtn,.layout .content .btn,.shell .btn{transition:none}
}
