/* AceDoors Operations Platform — shared live presentation theme
   Screen-only by design: operational print/customer documents keep their controlled output. */
@media screen {
  :root {
    --nav: #20262b !important;
    --nav-soft: #30373d !important;
    --brand: #ed1c24 !important;
    --brand-dark: #be151b !important;
    --line: #d8dde1 !important;
    --muted: #66717a !important;
    --bg: #f2f4f5 !important;
    --good: #159052 !important;
    --bad: #c51f29 !important;
    --ace-charcoal: #20262b;
    --ace-charcoal-2: #2b3238;
    --ace-red: #ed1c24;
    --ace-red-dark: #be151b;
    --ace-paper: #ffffff;
    --ace-soft: #f4f6f7;
    --ace-shadow: 0 8px 24px rgba(25, 31, 36, .075);
    --ace-shadow-hover: 0 14px 30px rgba(25, 31, 36, .12);
  }

  html.ace-theme-live,
  html.ace-theme-live body {
    background:
      radial-gradient(circle at 96% 0%, rgba(237, 28, 36, .08), transparent 27%),
      linear-gradient(180deg, #f8f9fa 0%, #f2f4f5 58%, #edf0f2 100%) !important;
    color: #1e252a;
  }

  html.ace-theme-live body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
      linear-gradient(118deg, transparent 0 71%, rgba(237,28,36,.018) 71% 82%, transparent 82%),
      radial-gradient(circle at 7% 96%, rgba(32,38,43,.035), transparent 26%);
  }

  /* Brand shell */
  html.ace-theme-live header {
    background:
      linear-gradient(110deg, var(--ace-charcoal) 0 72%, #252c31 72% 100%) !important;
    border-left: 7px solid var(--ace-red) !important;
    box-shadow: 0 4px 18px rgba(17, 22, 26, .2) !important;
  }
  html.ace-theme-live header::after {
    content: "People. Products. Performance.";
    position: absolute;
    right: 25px;
    bottom: 5px;
    color: rgba(255,255,255,.42);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
    pointer-events: none;
  }
  html.ace-theme-live header h1,
  html.ace-theme-live header strong { color: #fff; }
  html.ace-theme-live header small { color: #d3d7da !important; }
  html.ace-theme-live .header-section-context {
    border-color: rgba(255,255,255,.18) !important;
    background: rgba(255,255,255,.055) !important;
    box-shadow: inset 3px 0 0 rgba(237,28,36,.85);
  }

  /* Main surfaces */
  html.ace-theme-live .shell { max-width: 1320px; }
  html.ace-theme-live .card,
  html.ace-theme-live .home-panel,
  html.ace-theme-live .home-register,
  html.ace-theme-live .portal-card,
  html.ace-theme-live .pricing-details,
  html.ace-theme-live .pricing-table-wrap,
  html.ace-theme-live .department-job,
  html.ace-theme-live .job-action-request,
  html.ace-theme-live .job-full-workflow {
    border-color: var(--line) !important;
    background: rgba(255,255,255,.985) !important;
    box-shadow: var(--ace-shadow);
  }
  html.ace-theme-live .card,
  html.ace-theme-live .home-panel,
  html.ace-theme-live .home-register,
  html.ace-theme-live .portal-card { border-radius: 12px !important; }
  html.ace-theme-live .head,
  html.ace-theme-live .home-panel-header {
    border-bottom-color: #e8ebed !important;
    background: linear-gradient(180deg,#fff,#fbfcfc);
  }
  html.ace-theme-live .head h2,
  html.ace-theme-live .head h3,
  html.ace-theme-live .head strong,
  html.ace-theme-live h1,
  html.ace-theme-live h2,
  html.ace-theme-live h3 { color: #171d21; }
  html.ace-theme-live .dashboard-eyebrow {
    color: var(--ace-red) !important;
    letter-spacing: .085em !important;
  }

  /* Controlled notices remain notices, but use the brand line */
  html.ace-theme-live .banner {
    border-color: #e7d69c !important;
    border-left: 4px solid var(--ace-red) !important;
    background: linear-gradient(90deg,#fff9e8,#fffdf6) !important;
    color: #373d42;
  }

  /* Buttons */
  html.ace-theme-live .btn {
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  }
  html.ace-theme-live .btn:not(:disabled):hover { transform: translateY(-1px); }
  html.ace-theme-live .btn.primary,
  html.ace-theme-live .home-primary-action,
  html.ace-theme-live .btn.accent {
    background: var(--ace-red) !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(237,28,36,.18);
  }
  html.ace-theme-live .btn.primary:hover,
  html.ace-theme-live .home-primary-action:hover,
  html.ace-theme-live .btn.accent:hover { background: var(--ace-red-dark) !important; }
  html.ace-theme-live .btn.light,
  html.ace-theme-live .collapse-btn,
  html.ace-theme-live .door-collapse {
    background: #eef1f2 !important;
    color: var(--ace-charcoal) !important;
    border-color: #dde2e5 !important;
  }

  /* Tabs / current state */
  html.ace-theme-live .workflow-tab.active,
  html.ace-theme-live .pricing-section-tabs button.active,
  html.ace-theme-live .workspace-tab.active,
  html.ace-theme-live .step.active {
    background: var(--ace-charcoal) !important;
    border-color: var(--ace-charcoal) !important;
    color: #fff !important;
    box-shadow: inset 4px 0 0 var(--ace-red);
  }
  html.ace-theme-live .workflow-tab:hover,
  html.ace-theme-live .pricing-section-tabs button:hover,
  html.ace-theme-live .workspace-tab:hover {
    border-color: var(--ace-red) !important;
  }

  /* Form controls */
  html.ace-theme-live input,
  html.ace-theme-live select,
  html.ace-theme-live textarea {
    border-color: #cfd6da !important;
    background: #fff !important;
    color: #20272d !important;
  }
  html.ace-theme-live input:focus,
  html.ace-theme-live select:focus,
  html.ace-theme-live textarea:focus {
    outline: 2px solid rgba(237,28,36,.16);
    outline-offset: 1px;
    border-color: var(--ace-red) !important;
  }

  /* Status language stays semantic */
  html.ace-theme-live .good,
  html.ace-theme-live .pill.good,
  html.ace-theme-live .tick-icon.complete,
  html.ace-theme-live .job-status-item.done {
    background: #e5f6ed !important;
    color: #117b46 !important;
  }
  html.ace-theme-live .warn,
  html.ace-theme-live .pill.warn,
  html.ace-theme-live .job-status-item.active { background: #fff3d4 !important; }
  html.ace-theme-live .error,
  html.ace-theme-live .pill.error,
  html.ace-theme-live .job-status-item.blocked { background: #fde7e8 !important; color: #aa1d25 !important; }

  /* Residential dashboard */
  html.ace-theme-live .residential-home { gap: 18px !important; }
  html.ace-theme-live .home-intro {
    position: relative;
    overflow: hidden;
    padding: 17px 18px !important;
    border: 1px solid var(--line);
    border-left: 4px solid var(--ace-red);
    border-radius: 12px;
    background: linear-gradient(100deg,#fff 0 72%,rgba(237,28,36,.045) 72% 100%);
    box-shadow: 0 3px 12px rgba(25,31,36,.04);
  }
  html.ace-theme-live .home-intro::after {
    content: "";
    position: absolute;
    right: -45px;
    top: -70px;
    width: 210px;
    height: 210px;
    border: 32px solid rgba(237,28,36,.035);
    border-radius: 50%;
    pointer-events: none;
  }
  html.ace-theme-live .home-workspaces { background: #dfe4e7 !important; }
  html.ace-theme-live .home-workspace {
    background: #fff !important;
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease !important;
  }
  html.ace-theme-live .home-workspace:hover {
    z-index: 1;
    background: #fff !important;
    box-shadow: inset 0 0 0 2px rgba(237,28,36,.92), 0 8px 22px rgba(25,31,36,.08);
  }
  html.ace-theme-live .workspace-mark {
    background: var(--ace-charcoal) !important;
    color: #fff !important;
    box-shadow: inset 0 -3px 0 rgba(237,28,36,.85);
  }
  html.ace-theme-live .home-workspace::after { color: var(--ace-red) !important; }

  html.ace-theme-live .dashboard-metric {
    border: 1px solid #e2e6e8 !important;
    background: linear-gradient(180deg,#fff,#fafbfb) !important;
    box-shadow: 0 4px 14px rgba(25,34,40,.055) !important;
  }
  html.ace-theme-live .dashboard-metric::before { width: 5px !important; }
  html.ace-theme-live .dashboard-metric:nth-child(1)::before { background: var(--ace-charcoal) !important; }
  html.ace-theme-live .dashboard-metric:nth-child(2)::before { background: var(--ace-red) !important; }

  /* Department and menu cards */
  html.ace-theme-live .department-landing-intro {
    position: relative;
    overflow: hidden;
    border-left-color: var(--ace-red) !important;
    background: linear-gradient(100deg,#fff 0 78%,rgba(32,38,43,.025) 78% 100%) !important;
  }
  html.ace-theme-live .department-job,
  html.ace-theme-live .menu-task-card {
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  }
  html.ace-theme-live .department-job:hover,
  html.ace-theme-live .menu-task-card:hover {
    transform: translateY(-1px);
    border-color: var(--ace-red) !important;
    box-shadow: var(--ace-shadow-hover) !important;
  }
  html.ace-theme-live .menu-task-card strong { color: #1c2328; }

  /* Job workspace */
  html.ace-theme-live .job-workspace-bar {
    position: relative;
    border-left-color: var(--ace-red) !important;
    background: linear-gradient(100deg,#fff,#fafbfb) !important;
    box-shadow: 0 4px 14px rgba(25,31,36,.045);
  }
  html.ace-theme-live .job-operational-card { border-left-color: var(--ace-red) !important; }
  html.ace-theme-live .job-status-item.actionable:hover,
  html.ace-theme-live .job-status-item.actionable:focus {
    outline-color: var(--ace-red) !important;
  }
  html.ace-theme-live .job-dashboard-table tbody tr:hover { background: #fff7f7; }
  html.ace-theme-live .job-dashboard-table tr.active-job { background: #fff1f2 !important; }

  /* Pricing / settings */
  html.ace-theme-live .pricing-region-button.active,
  html.ace-theme-live .travel-direction-card.active {
    border-color: var(--ace-red) !important;
    background: #fff5f5 !important;
    box-shadow: 0 0 0 2px rgba(237,28,36,.07);
  }
  html.ace-theme-live .pricing-region-banner { border-left-color: var(--ace-red) !important; }
  html.ace-theme-live .pricing-table th,
  html.ace-theme-live .staff-table th {
    background: var(--ace-charcoal) !important;
    color: #fff !important;
  }

  /* Shared theme feature artwork. Added by acedoors-platform-theme.js */
  html.ace-theme-live .ace-feature-card {
    position: relative !important;
    overflow: hidden !important;
    isolation: isolate;
  }
  html.ace-theme-live .ace-feature-card > * { position: relative; z-index: 2; }
  html.ace-theme-live .ace-feature-card::before,
  html.ace-theme-live .ace-feature-card::after { pointer-events: none; }
  html.ace-theme-live .ace-feature-card::before {
    content: "";
    position: absolute;
    z-index: 0;
    right: -18px;
    bottom: -24px;
    width: 190px;
    height: 145px;
    opacity: .13;
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    filter: grayscale(1);
  }
  html.ace-theme-live .ace-feature-card::after {
    content: "";
    position: absolute;
    z-index: 1;
    right: -35px;
    bottom: -70px;
    width: 145px;
    height: 190px;
    transform: rotate(16deg);
    background: linear-gradient(90deg,transparent 0 44%,rgba(237,28,36,.12) 44% 68%,rgba(32,38,43,.08) 68% 100%);
  }
  html.ace-theme-live .ace-art-house::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 170'%3E%3Cg fill='none' stroke='%2320262b' stroke-width='8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M28 91 119 24l94 67'/%3E%3Cpath d='M48 81v70h142V80'/%3E%3Cpath d='M103 151v-50h37v50M66 111h25v23H66M153 108h21v25h-21'/%3E%3C/g%3E%3C/svg%3E");
  }
  html.ace-theme-live .ace-art-buildings::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 170'%3E%3Cg fill='none' stroke='%2320262b' stroke-width='7'%3E%3Cpath d='M28 151V57h68v94M96 151V22h74v129M170 151V76h42v75'/%3E%3Cpath d='M45 76h15M68 76h14M45 101h15M68 101h14M45 126h15M68 126h14M116 45h14M141 45h14M116 72h14M141 72h14M116 99h14M141 99h14M116 126h14M141 126h14M185 98h12M185 122h12'/%3E%3C/g%3E%3C/svg%3E");
  }
  html.ace-theme-live .ace-art-hardhat::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 170'%3E%3Cg fill='none' stroke='%2320262b' stroke-width='8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M40 126h163'/%3E%3Cpath d='M55 124c2-48 28-80 65-84 41 4 67 37 69 84'/%3E%3Cpath d='M120 40v57M91 48v43M149 48v43'/%3E%3Cpath d='M31 126c0 12 10 22 22 22h139c12 0 22-10 22-22'/%3E%3C/g%3E%3C/svg%3E");
  }
  html.ace-theme-live .ace-feature-card.ace-art-house { border-top: 4px solid var(--ace-red) !important; }
  html.ace-theme-live .ace-feature-card.ace-art-buildings { border-top: 4px solid #d99a14 !important; }
  html.ace-theme-live .ace-feature-card.ace-art-hardhat { border-top: 4px solid var(--ace-charcoal) !important; }

  /* H&S specific live/test surfaces */
  html.ace-theme-live .workspace-tabs {
    border-radius: 10px;
    padding: 5px;
    background: var(--ace-charcoal) !important;
  }
  html.ace-theme-live .workspace-tab {
    border-color: rgba(255,255,255,.1) !important;
    background: #2b3238 !important;
    color: #f4f6f7 !important;
  }
  html.ace-theme-live .workspace-tab:hover { background: #343c42 !important; }
  html.ace-theme-live .workspace-tab.active {
    background: var(--ace-red) !important;
    border-color: var(--ace-red) !important;
    box-shadow: none !important;
  }
  html.ace-theme-live .progress-wrap,
  html.ace-theme-live .page-intro {
    border-left: 4px solid var(--ace-red) !important;
    background: #fff !important;
    box-shadow: var(--ace-shadow);
  }
  html.ace-theme-live .step.done {
    border-color: #7cc59c !important;
    color: #117b46 !important;
  }
  html.ace-theme-live .tick { background: #e5f6ed !important; color: #117b46 !important; }

  /* Staff portal / area selectors — generic because these are rendered dynamically */
  html.ace-theme-live .ace-theme-area-card {
    position: relative !important;
    overflow: hidden !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,.985) !important;
    box-shadow: var(--ace-shadow) !important;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease !important;
  }
  html.ace-theme-live .ace-theme-area-card:hover {
    transform: translateY(-2px);
    border-color: #c7ced3 !important;
    box-shadow: var(--ace-shadow-hover) !important;
  }

  /* Mobile retains the workflow-first app structure */
  @media (max-width: 760px) {
    html.ace-theme-live header::after { display: none; }
    html.ace-theme-live .ace-feature-card::before { width: 130px; height: 105px; opacity: .085; }
    html.ace-theme-live .ace-feature-card::after { opacity: .7; }
    html.ace-theme-live .home-intro { padding: 14px !important; }
  }
}
