@font-face {
  font-family: 'Moadit Brand';
  src: url('./assets/fonts/outfit-700.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #202020;
  --card-bg: #262626;
  --card-border: #3a3a3a;
  --surface-raised: #2e2e2e;
  --surface-inset: #232323;
  --text-main: #ECECEC;
  --text-muted: #A3A3A3;
  --text-dim: #858585;
  --accent: #818cf8;
  --white-op: rgba(255,255,255,0.05);
  --white-op-hover: rgba(255,255,255,0.08);
  --black-op: rgba(0,0,0,0.3);
  --title-grad: linear-gradient(to right, #fff, #a1a1aa);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F8F9FA;
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(0, 0, 0, 0.08);
  --text-main: #18181B;
  --text-muted: #52525B;
  --text-dim: #A1A1AA;
  --accent: #6366f1;
  --white-op: rgba(0,0,0,0.04);
  --white-op-hover: rgba(0,0,0,0.08);
  --black-op: rgba(255,255,255,0.6);
  --title-grad: linear-gradient(to right, #111, #71717A);
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }
body { background: var(--bg); color: var(--text-main); min-height: 100vh; overflow-x: hidden; transition: background 0.3s, color 0.3s; }

body.time-picker-open {
  overflow: hidden;
}

body.overlay-open {
  overflow: hidden;
}

body.date-picker-open {
  overflow: hidden;
}

.desktop-scale-shell {
  position: relative;
  min-height: 100vh;
}

/* Trendy Aurora Background */
.aurora { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; background: var(--bg); }
.aurora::before, .aurora::after {
  content: ""; position: absolute; width: 50vw; height: 50vh; border-radius: 50%; filter: blur(120px); opacity: 0.4; animation: float 20s infinite alternate;
}
.aurora::before { top: 10%; left: -10%; background: #4f46e5; }
.aurora::after { bottom: -10%; right: 10%; background: #9333ea; animation-delay: -10s; }

[data-theme="light"] .aurora::before { background: #818cf8; opacity: 0.15; }
[data-theme="light"] .aurora::after { background: #c084fc; opacity: 0.15; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(10vw, 10vh) scale(1.3); }
}

/* App Layout with Sidebar */
.app-layout {
  display: flex; height: 100vh; gap: 24px; padding: 16px; width: 100%; max-width: 2160px; margin: 0 auto;
}

/* Sidebar Styling */
.sidebar {
  width: 280px; flex-shrink: 0; border-radius: 24px !important; display: flex; flex-direction: column;
}
.sidebar-inner { display: flex; flex: 1; min-height: 0; flex-direction: column; padding: 18px 12px; }
.logo-area { display: flex; align-items: center; justify-content: center; height: 74px; padding: 10px 12px 24px; margin-bottom: 12px; flex-shrink: 0; }
.app-wordmark {
  display: block;
  flex: 0 0 auto;
  color: var(--text-main);
  font-family: 'Moadit Brand', 'Outfit', system-ui, sans-serif;
  font-size: 36px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  letter-spacing: -1.1px;
  white-space: nowrap;
}
.logo-box { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #818cf8, #c084fc); display: flex; justify-content: center; align-items: center; font-size: 18px; color: white; box-shadow: 0 4px 20px rgba(129,140,248,0.4); }
.logo-text { font-size: 24px; font-weight: 600; letter-spacing: -0.5px; color: var(--text-main); }

.gradient-text {
  color: var(--text-main);
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
}

.nav-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
#sidebarNav { display: flex; flex: 1; flex-direction: column; gap: 32px; }
.nav-section--footer { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--card-border); }
.nav-scroll::-webkit-scrollbar { width: 4px; }
.nav-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.nav-section { display: flex; flex-shrink: 0; flex-direction: column; gap: 12px; }
.nav-title { display: flex; align-items: center; gap: 12px; font-size: 10px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1.2px; padding: 0 12px; }
.nav-title::after { content: ''; height: 1px; flex: 1; background: var(--card-border); }

.nav-menu { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-muted);
  min-height: 52px; font-size: 14px; font-weight: 500; padding: 10px 12px; border: 1px solid transparent; border-radius: 14px; transition: background 0.2s, color 0.2s, border-color 0.2s; position: relative;
}
.nav-item:hover { color: var(--text-main); background: var(--white-op); }
.nav-item.active { color: var(--text-main); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.sidebar .nav-item-icon { width: 28px; height: 28px; border-radius: 8px; color: var(--text-muted); transition: background 0.2s, color 0.2s; }
.sidebar .nav-item.active .nav-item-icon { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.sidebar .nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 20%; height: 60%; width: 3px; background: var(--accent); border-radius: 0 4px 4px 0; }
.nav-item i { font-size: 16px; width: 20px; text-align: center; color: var(--accent); opacity: 0.8;}

/* Editable Account Name (B) */
.editable-name { cursor: pointer; border-bottom: 1px dashed transparent; transition: border-color 0.2s; }
.editable-name:hover { border-bottom-color: var(--accent); }

.nav-badge { background: #f43f5e; color: white; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 100px; margin-left: auto; box-shadow: 0 0 10px rgba(244,63,94,0.5);}

/* Main Content Area */
.main-wrapper { flex: 1; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; padding-right: 8px; }
.main-wrapper::-webkit-scrollbar { width: 6px; }
.main-wrapper::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.top-nav { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; flex-wrap: nowrap; }
.nav-left { display: flex; align-items: center; gap: 24px; min-width: 0; flex: 1 1 auto; }
.nav-right, .header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-tools .readonly-btn { min-height: 44px; white-space: nowrap; }
.header-tools .theme-segmented { height: 44px; }
.header-tools .theme-btn { min-height: 36px; min-width: 36px; padding: 0 10px; }
.nav-right .lock-btn { min-height: 44px; white-space: nowrap; }
#actionBar[hidden], #syncBanner:empty { display: none; }
.page-title {
  font-size: clamp(34px, 2.5vw, 42px);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.04em;
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  color: var(--text-main);
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  text-shadow: 0 10px 26px rgba(129,140,248,0.12);
}

[data-theme="light"] .page-title {
  color: #111827;
  text-shadow: 0 8px 22px rgba(129,140,248,0.08);
}

[data-theme="light"] .gradient-text {
  color: #1f2a44;
}

/* Trendy Account Dropdown */
.account-dropdown-wrapper { position: relative; display: flex; align-items: center; }
.trendy-dropdown-btn { 
    background: var(--white-op); border: 1px solid var(--card-border); padding: 6px 16px 6px 6px; 
    border-radius: 100px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: 0.2s;
    color: var(--text-main); font-family: inherit; font-size: 14px; font-weight: 600; outline: none;
}
.trendy-dropdown-btn:hover { background: var(--white-op-hover); border-color: rgba(129,140,248,0.5); }
.acc-mini-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.trendy-dropdown-btn i { font-size: 12px; color: var(--text-muted); transition: 0.3s; }
.trendy-dropdown-btn.open i { transform: rotate(180deg); }

.trendy-dropdown-menu {
    position: absolute; top: calc(100% + 12px); left: 0; width: 240px; background: rgba(20,20,24,0.85);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--card-border);
    border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); padding: 8px;
    opacity: 0; pointer-events: none; transform: translateY(-10px); transition: 0.2s; z-index: 100;
}
[data-theme="light"] .trendy-dropdown-menu { background: rgba(255,255,255,0.85); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.trendy-dropdown-menu.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

.drop-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; cursor: pointer; transition: 0.2s; }
.drop-item:hover { background: var(--white-op); }
.drop-item.active { background: var(--white-op-hover); }
.drop-text { display: flex; flex-direction: column; text-align: left; }
.drop-text strong { font-size: 14px; color: var(--text-main); }
.drop-text span { font-size: 12px; color: var(--text-muted); }
.drop-divider { height: 1px; background: var(--card-border); margin: 6px 0; }
.drop-item.action-item { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 13px; }
.drop-item.action-item:hover { background: rgba(129,140,248,0.1); }

/* Spotlight Component */
.spotlight-wrapper {
  position: relative; background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 20px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
}
.spotlight-wrapper::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(400px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(255,255,255,0.08), transparent 40%);
  z-index: 0; pointer-events: none; opacity: 0; transition: opacity 0.5s;
}
.spotlight-wrapper:hover::before { opacity: 1; }
.spotlight-wrapper:hover { border-color: rgba(255,255,255,0.2); }
.content-z { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; }

.action-bar { padding: 12px 18px; border-radius: 18px; flex-shrink: 0; }
.spotlight-btn { min-height: 46px; padding: 8px 14px; border-radius: 100px; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.03); border: 1px solid var(--card-border); font-size: 13px; color: var(--text-muted); transition: 0.3s; }
[data-theme="light"] .spotlight-btn { background: rgba(0,0,0,0.02); color: var(--text-main); font-weight: 500;}

.toggle { position: relative; width: 36px; height: 20px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255,255,255,0.1); transition: .3s; border-radius: 34px; }
[data-theme="light"] .toggle span { background-color: rgba(0,0,0,0.15); }
.toggle span:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: #a1a1aa; transition: .3s; border-radius: 50%; }
[data-theme="light"] .toggle span:before { background-color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle input:checked + span { background-color: var(--accent); }
.toggle input:checked + span:before { transform: translateX(16px); background-color: #fff; }

.action-bar { padding: 12px 18px; border-radius: 18px; flex-shrink: 0; }
.row-content { flex-direction: row; align-items: center; gap: 12px; }
.input-wrap { display: flex; align-items: center; gap: 12px; background: var(--black-op); padding: 10px 18px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); width: 100%; max-width: 384px; transition: 0.3s; }
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(129,140,248,0.2); }
.input-wrap i { color: var(--text-muted); }
.input-wrap input { background: transparent; border: none; outline: none; color: var(--text-main); width: 100%; font-size: 14px; font-family: inherit; }

.glow-btn {
  margin-left: auto; position: relative; background: #fff; color: #000; border: none; padding: 11px 20px; border-radius: 14px; font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; transition: 0.3s;
}
.glow-btn::before { content:''; position: absolute; top: -2px; left: -2px; right: -2px; bottom: -2px; background: linear-gradient(45deg, #818cf8, #c084fc); z-index: -1; border-radius: 16px; filter: blur(10px); opacity: 0.6; transition: opacity 0.3s;}
.glow-btn:hover { transform: scale(1.02); }
.glow-btn:hover::before { opacity: 1; filter: blur(14px); }

.glow-btn--inspector-save {
  margin-left: 0;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 12px;
}

.divider { width: 1px; height: 24px; background: var(--card-border); }
.ghost-btn { background: transparent; border: none; color: var(--text-main); font-weight: 500; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; transition: 0.2s; }
.ghost-btn:hover { background: var(--white-op); }

.theme-segmented { display: flex; background: var(--black-op); border-radius: 12px; padding: 3px; border: 1px solid var(--card-border); }
.theme-btn { min-width: 40px; min-height: 40px; background: transparent; border: none; color: var(--text-muted); font-size: 14px; padding: 0 11px; border-radius: 10px; cursor: pointer; transition: 0.2s;}
.theme-btn.active { background: rgba(255,255,255,0.1); color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
[data-theme="light"] .theme-btn.active { background: #fff; color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* Views & Grids */
.view-panel { display: none; flex: 1; flex-direction: column; opacity: 0; }
.view-panel.active { display: flex; opacity: 1; animation: fadeIn 0.4s ease forwards; }

.bento-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); auto-rows: minmax(130px, auto); gap: 20px; flex: 1; padding-bottom: 24px;
}
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.row-span-2 { grid-row: span 2; }
.matrix-filters-panel,
.matrix-board-panel,
.matrix-inspector-panel { min-width: 0; }

.matrix-layout {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.matrix-layout .bento-grid {
  min-height: 0;
}

.bento-grid--matrix-panel-swap {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(240px, 0.92fr);
  align-items: stretch;
}

.matrix-summary-stack {
  grid-column: 4;
  grid-row: 1 / span 5;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 20px;
  min-width: 0;
  align-self: stretch;
}

.matrix-summary-card {
  min-height: 0;
}

.matrix-summary-card .content-z {
  min-height: 100%;
}

.matrix-inspector-top-panel {
  grid-column: 1 / span 3;
  grid-row: 1 / span 2;
  min-width: 0;
  min-height: 232px;
}

.matrix-filters-panel--wide {
  grid-column: 1 / span 3;
  grid-row: 3;
}

.matrix-board-panel--wide {
  grid-column: 1 / span 3;
  grid-row: 4 / span 2;
  min-width: 0;
}

.matrix-inspector-panel .content-z,
.matrix-inspector-dock .content-z {
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.matrix-inspector-panel .content-z::-webkit-scrollbar,
.matrix-inspector-dock .content-z::-webkit-scrollbar {
  width: 0;
  height: 0;
  background: transparent;
}

.matrix-inspector-dock-layer {
  position: absolute;
  right: 0;
  bottom: 24px;
  z-index: 14;
  width: min(360px, calc(100% - 20px));
  pointer-events: none;
}

.matrix-inspector-dock {
  width: 100%;
  height: min(74vh, 780px);
  min-height: 460px;
  overflow: hidden;
  pointer-events: auto;
}

html[data-layout-surface-mode="scaled-desktop"] body {
  overflow: hidden;
}

html[data-layout-surface-mode="scaled-desktop"] .desktop-scale-shell {
  position: fixed;
  left: 50%;
  top: 50%;
  width: var(--desktop-layout-width, 1680px);
  height: var(--desktop-layout-height, 1050px);
  min-height: 0;
  transform: translate(-50%, -50%) scale(var(--android-desktop-scale, 1));
  transform-origin: center center;
  overflow: visible;
}

html[data-layout-surface-mode="scaled-desktop"] .app-layout {
  width: var(--desktop-layout-width, 1680px);
  max-width: none;
  height: var(--desktop-layout-height, 1050px);
  margin: 0;
}

html[data-layout-surface-mode="scaled-desktop"] #notePopoverLayer,
html[data-layout-surface-mode="scaled-desktop"] #servicePopoverLayer,
html[data-layout-surface-mode="scaled-desktop"] #datePickerLayer,
html[data-layout-surface-mode="scaled-desktop"] #timePickerLayer {
  width: var(--desktop-layout-width, 1680px);
  height: var(--desktop-layout-height, 1050px);
}

html[data-layout-surface-mode="scaled-desktop"] .table-scroll,
html[data-layout-surface-mode="scaled-desktop"] .service-filter-row,
html[data-layout-surface-mode="scaled-desktop"] .pills {
  -webkit-overflow-scrolling: touch;
}

html[data-layout-surface-mode="scaled-desktop"] .table-scroll {
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}

/* Bento Cards details */
.stats-box { padding: 18px 20px; justify-content: center; display: flex;}
.stat-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--white-op); border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 16px; margin-bottom: 14px; }
.stat-icon.blue { color: #818cf8; background: rgba(129,140,248,0.1); border-color: rgba(129,140,248,0.2); }
.stat-icon.green { color: #34d399; background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.2); }
.stat-icon.orange { color: #fbbf24; background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.2); }
.stats-box h2 { font-size: 32px; font-weight: 600; line-height: 1; margin-bottom: 4px; letter-spacing: -0.04em;}
.h2-gradient { font-size: 32px; font-weight: 600; line-height: 1; margin-bottom: 4px; background: linear-gradient(to right, #fbbf24, #f87171); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.04em;}
.stats-box p { color: var(--text-muted); font-size: 12px; font-weight: 600; }

.filters-box { padding: 16px 24px; }
.flex-row { flex-direction: row; align-items: center; justify-content: space-between; }
.search-wrap { display: flex; align-items: center; gap: 10px; background: var(--black-op); padding: 8px 16px; border-radius: 100px; border: 1px solid var(--card-border); width: 260px; transition: 0.3s;}
.search-wrap:focus-within { border-color: var(--accent); }
.search-wrap input { background: transparent; border: none; outline: none; color: var(--text-main); width: 100%; font-family: inherit; font-size: 13px;}
.pills { display: flex; gap: 8px; }
.pill { padding: 6px 16px; border-radius: 100px; font-size: 13px; font-weight: 500; color: var(--text-muted); border: 1px solid var(--card-border); cursor: pointer; transition: 0.2s;}
.pill:hover { color: var(--text-main); border-color: rgba(129,140,248,0.4); background: var(--white-op);}
.pill.active { background: var(--text-main); color: var(--bg); border-color: var(--text-main); }
[data-theme="light"] .pill.active { color: #fff; }

.table-box { padding: 24px; }
.box-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.box-header h3 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--text-main);}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.actions i { color: var(--text-muted); margin-left: 12px; cursor: pointer; transition: 0.2s; font-size: 14px;}
.actions i:hover { color: white; }

.table-scroll { overflow-x: auto; width: 100%; padding-bottom: 8px; }
.table-scroll::-webkit-scrollbar { height: 6px; }
.table-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); border-radius: 10px; }
.table-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }
.table-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

.matrix-account-column { width: 360px; }
.matrix-lock-column { width: 92px; }
.trendy-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.trendy-table.matrix-table { table-layout: fixed; min-width: calc(452px + var(--matrix-service-count, 6) * 136px); }
.trendy-table th { text-align: left; padding: 0 12px 14px; color: var(--text-muted); font-weight: 500; font-size: 11px; border-bottom: 1px solid var(--card-border); text-transform: uppercase; letter-spacing: 0.5px; }
.trendy-table th.matrix-service-head-cell { text-transform: none; letter-spacing: normal; }
.trendy-table th i { font-size: 14px; margin-right: 4px; vertical-align: -1px; }
.trendy-table td { padding: 12px 12px; border-bottom: 1px solid rgba(255,255,255,0.03); vertical-align: middle; font-size: 14px; }
.matrix-table td.service-cell { padding-right: 6px; padding-left: 6px; }
.matrix-table .service-badge-inline { gap: 6px; }
.matrix-table .service-quota-mini-item { gap: 4px; }
.trendy-table tbody tr { transition: 0.2s;}
.trendy-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.text-center { text-align: center !important; }

.acc-info { display: flex; align-items: center; gap: 12px; }
.acc-avatar img { width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,0.1); padding: 4px;}
.acc-avatar.large img { width: 64px; height: 64px; border-radius: 16px;}
.acc-text { display: flex; flex-direction: column; gap: 4px;}
.acc-name { font-weight: 500; font-size: 14px; color: var(--text-main); }
.acc-text .tag { display: inline-block; width: fit-content; white-space: nowrap; }

/* Subscription Badges */
.sub-badge { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; justify-content: center; align-items: center; font-size: 12px; margin: 0 auto; transition: 0.2s; cursor: pointer; }
.sub-badge:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.sub-badge.active { background: rgba(52,211,153,0.1); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.sub-badge.completed { background: rgba(244,63,94,0.12); color: #fb7185; border: 1px solid rgba(244,63,94,0.34); }
.sub-badge.inactive { background: rgba(255,255,255,0.03); color: var(--text-dim); border: 1px dashed rgba(255,255,255,0.1); }
[data-theme="light"] .sub-badge.inactive { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.15); }
.matrix-table .sub-badge { width: 36px; height: 36px; border-radius: 10px; }
.matrix-table .sub-badge > svg { width: 24px; height: 24px; }
.matrix-table .service-mark--button { width: 30px; height: 30px; }
.matrix-table .service-mark--button > svg { width: 30px; height: 30px; }
.matrix-table .service-mark--chatgpt.service-mark--button > svg > svg { width: 35px; height: 35px; }

.service-badge-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: left;
}

.service-badge-inline .sub-badge {
  margin: 0;
  flex: 0 0 auto;
}

.service-quota-mini {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

.service-quota-mini-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--text-muted);
}

.service-quota-mini-window {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-dim);
}

.service-quota-mini-value {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
}

.service-quota-mini-emoji {
  font-size: 11px;
  line-height: 1;
}

.service-quota-mini-reset {
  font-size: 10px;
  color: var(--text-dim);
}

.service-quota-mini-item[data-level="high"] .service-quota-mini-value {
  color: #34d399;
}

.service-quota-mini-item[data-level="medium"] .service-quota-mini-value {
  color: #fbbf24;
}

.service-quota-mini-item[data-level="low"] .service-quota-mini-value {
  color: #fb7185;
}

.service-quota-mini-item[data-level="empty"] .service-quota-mini-value {
  color: var(--text-dim);
}

.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; }
.status-dot.active { background: #34d399; box-shadow: 0 0 10px #34d399; }
.status-dot.pending { background: #fbbf24; box-shadow: 0 0 10px #fbbf24; }

.tag { background: var(--white-op); border: 1px solid var(--card-border); padding: 2px 8px; border-radius: 6px; font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.text-dim { color: var(--text-dim); }
.text-danger { color: #f43f5e !important; }

.side-box { padding: 24px; }

.empty-state { text-align: center; color: var(--text-dim); font-size: 14px; margin-top: 40px; font-weight: 500; line-height: 1.5; padding: 40px 20px; border: 1px dashed rgba(255,255,255,0.1); border-radius: 16px; background: rgba(0,0,0,0.2);}

/* Custom Panel contents */
.inspector-card { display: flex; flex-direction: column; align-items: center; padding-top: 20px; gap: 12px; }
.inspector-card h4 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.detail-row { width: 100%; display: flex; justify-content: space-between; font-size: 14px; color: var(--text-muted); padding: 12px 0; border-bottom: 1px solid var(--card-border); }
.detail-row span:last-child { color: var(--text-main); font-weight: 500; }
.full-width { width: 100%; justify-content: center; margin-top: 16px; }

/* Custom Form Grid */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.input-block { display: flex; flex-direction: column; gap: 8px; }
.input-block label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.cool-input { background: var(--black-op); border: 1px solid var(--card-border); padding: 12px 16px; border-radius: 12px; color: var(--text-main); font-family: inherit; font-size: 14px; outline: none; transition: 0.3s; }
.cool-input:focus { border-color: var(--accent); }
.cool-input.disabled { opacity: 0.5; cursor: not-allowed; }

/* Custom Form Select (Used in Sync View) */
.custom-select-wrapper { position: relative; width: 100%; }
.custom-select-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
  text-align: left;
  padding-right: 14px;
}
.custom-select-btn:focus-visible {
  border-color: rgba(129,140,248,0.55);
  box-shadow: 0 0 0 3px rgba(129,140,248,0.14);
}
.custom-select-value {
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.custom-select-arrow {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 0.22s ease, color 0.22s ease;
}
.custom-select-wrapper.is-open .custom-select-arrow {
  transform: rotate(180deg);
  color: var(--text-main);
}
.custom-select-menu { 
    position: absolute; top: calc(100% + 10px); left: 0; width: 100%;
    background: rgba(16,16,22,0.96); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(129,140,248,0.2); border-radius: 16px; padding: 8px; z-index: 240;
    opacity: 0; pointer-events: none; transform: translateY(-8px) scale(0.98); transition: 0.2s ease; box-shadow: 0 18px 42px rgba(0,0,0,0.42);
    max-height: 260px; overflow-y: auto;
}
[data-theme="light"] .custom-select-menu { background: rgba(255,255,255,0.94); box-shadow: 0 14px 32px rgba(31,41,55,0.14); }
.custom-select-wrapper.is-open .custom-select-menu,
.custom-select-menu.show { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.cs-item {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-main);
  border-radius: 12px;
  cursor: pointer;
  transition: 0.18s ease;
  text-align: left;
}
.cs-item:hover { background: rgba(255,255,255,0.06); }
.cs-item.active {
  background: rgba(129,140,248,0.16);
  color: #eef2ff;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(129,140,248,0.24);
}
.custom-select-btn,
.cs-item {
  color: var(--text-main);
}
[data-theme="light"] .custom-select-btn {
  background: rgba(255,255,255,0.82);
  border-color: rgba(99,102,241,0.18);
  color: #18181b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
[data-theme="light"] .custom-select-arrow {
  color: #60697a;
}
[data-theme="light"] .cs-item {
  color: #1f2937;
}
[data-theme="light"] .cs-item:hover {
  background: rgba(99,102,241,0.08);
}
[data-theme="light"] .cs-item.active {
  background: rgba(99,102,241,0.12);
  color: #434acf;
  box-shadow: inset 0 0 0 1px rgba(99,102,241,0.18);
}
.custom-select-wrapper.is-disabled .custom-select-btn {
  opacity: 0.56;
  cursor: not-allowed;
}
.custom-select-menu::-webkit-scrollbar {
  width: 8px;
}
.custom-select-menu::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
}
.action-buttons-grid { display: flex; gap: 12px; }

.sync-status { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 20px; text-align: center; padding: 0 20px; }
.pulse-ring { width: 80px; height: 80px; border-radius: 50%; position: relative; }
.pulse-ring.green { background: rgba(52,211,153,0.2); border: 2px solid rgba(52,211,153,0.5); }
.pulse-ring::before { content: ''; position: absolute; inset: -20px; border-radius: 50%; border: 1px solid rgba(52,211,153,0.5); animation: pulse 2s infinite ease-out; }
@keyframes pulse { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(1.2); opacity: 0; } }
.sync-status p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.sync-status strong { color: white; }
[data-theme="light"] .sync-status strong { color: var(--accent); }

/* Calendar View & Widget */
.glass-calendar { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; height: 100%; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; color: var(--text-muted); font-size: 13px; font-weight: 600; padding-bottom: 12px; border-bottom: 1px solid var(--card-border); }
.cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; flex: 1; }
.cal-cell { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 10px 10px; border-radius: 16px; border: 1px solid transparent; background: rgba(255,255,255,0.02); min-height: 132px; transition: 0.2s; cursor: pointer; overflow: hidden; }
[data-theme="light"] .cal-cell { background: #f3f4f6; border-color: rgba(0,0,0,0.05); }
.cal-cell:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); transform: translateY(-2px); }
[data-theme="light"] .cal-cell:hover { background: #e5e7eb; border-color: rgba(0,0,0,0.1); }
.cal-cell.empty { background: transparent; cursor: default; border: none; }
[data-theme="light"] .cal-cell.empty { background: transparent; border: none; }
.cal-cell.empty:hover { transform: none; }
.cal-cell .date { font-size: 14px; font-weight: 600; color: var(--text-muted); align-self: flex-start; margin-bottom: 2px; line-height: 1; }
[data-theme="light"] .cal-cell .date { color: var(--text-main); }
.cal-cell.today { background: rgba(129,140,248,0.1); border-color: rgba(129,140,248,0.2); }
[data-theme="light"] .cal-cell.today { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.2); }
.cal-cell.today .date { color: #fff; background: #818cf8; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; box-shadow: 0 4px 10px rgba(129,140,248,0.4); }

.cal-events { display: flex; flex-direction: column; gap: 6px; min-width: 0; width: 100%; }
.cal-event { width: 100%; max-width: 100%; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 11px; padding: 6px 9px; border-radius: 8px; background: var(--white-op); color: var(--text-main); font-weight: 500; overflow: hidden; border-left: 3px solid transparent; }
.cal-event-account { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event-service { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.cal-event .service-mark--button { width: 18px; height: 18px; border-radius: 8px; }
.cal-event.red { background: rgba(239,68,68,0.1); color: #fca5a5; border-left-color: #ef4444; }
.cal-event.green { background: rgba(52,211,153,0.1); color: #6ee7b7; border-left-color: #34d399; }
.cal-event.blue { background: rgba(59,130,246,0.1); color: #93c5fd; border-left-color: #3b82f6; }
.cal-event.orange { background: rgba(249,115,22,0.1); color: #fdba74; border-left-color: #f97316; }

.upcoming-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.upcoming-item { --upcoming-accent-rgb: 34,197,94; --upcoming-accent-color: #86efac; --upcoming-accent-solid: #22c55e; display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: linear-gradient(180deg, rgba(var(--upcoming-accent-rgb), 0.12), rgba(0,0,0,0.2)); border-radius: 16px; border: 1px solid rgba(var(--upcoming-accent-rgb), 0.32); transition: 0.2s; cursor: pointer; }
.upcoming-item:hover { background: linear-gradient(180deg, rgba(var(--upcoming-accent-rgb), 0.18), rgba(255,255,255,0.05)); }
.upcoming-item[data-urgency="urgent"] { --upcoming-accent-rgb: 239,68,68; --upcoming-accent-color: #fca5a5; --upcoming-accent-solid: #ef4444; }
.upcoming-item[data-urgency="warning"] { --upcoming-accent-rgb: 245,158,11; --upcoming-accent-color: #fcd34d; --upcoming-accent-solid: #f59e0b; }
.upcoming-item[data-urgency="safe"] { --upcoming-accent-rgb: 34,197,94; --upcoming-accent-color: #86efac; --upcoming-accent-solid: #22c55e; }
.upcoming-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; min-width: 64px; height: 64px; padding: 6px 4px; background: rgba(var(--upcoming-accent-rgb), 0.12); border-radius: 16px; color: var(--upcoming-accent-color); line-height: 1.05; border: 1px solid rgba(var(--upcoming-accent-rgb), 0.22); flex-shrink: 0; }
.upcoming-date span:first-child { font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 0.02em; }
.upcoming-date span:last-child { font-size: 19px; font-weight: 800; }
.upcoming-details { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; min-width: 0; overflow: hidden; }
.upcoming-details strong { font-size: 15px; color: var(--text-main); font-weight: 600; }
.upcoming-title { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; }
.upcoming-account { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-service-icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.upcoming-title .service-mark--button { width: 20px; height: 20px; border-radius: 9px; }
.upcoming-kind { flex: 0 0 auto; white-space: nowrap; color: var(--upcoming-accent-color); }
.upcoming-details span { font-size: 12px; color: var(--text-muted); }
.upcoming-countdown { flex: 0 0 auto; min-width: 72px; padding: 8px 10px; border-radius: 999px; border: 1px solid rgba(var(--upcoming-accent-rgb), 0.24); background: rgba(var(--upcoming-accent-rgb), 0.12); color: var(--upcoming-accent-color); font-size: 11px; font-weight: 700; text-align: center; white-space: nowrap; }

/* Glass Popover (Original App Native Style blended with Magic UI) */
.glass-popover { position: absolute; z-index: 9999; width: 320px; background: rgba(22, 22, 25, 0.85); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px); border: 1px solid var(--card-border); border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05) inset; padding: 16px; display: flex; flex-direction: column; gap: 12px; transform-origin: top left; transform: scale(0.95); opacity: 0; transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1); pointer-events: none; }
[data-theme="light"] .glass-popover { background: rgba(255, 255, 255, 0.95); box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05) inset; }
.glass-popover.show { transform: scale(1); opacity: 1; pointer-events: auto; }
.popover-header { display: flex; justify-content: space-between; align-items: center; }

/* Centered Hero Section per screenshot */
.popover-hero { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; margin-top: -20px; margin-bottom: 8px; }
.service-logo-large { width: 48px; height: 48px; border-radius: 14px; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; border: 1px solid rgba(255,255,255,0.05); }
[data-theme="light"] .service-logo-large { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
.service-logo-large i { font-size: 24px; }
.pop-account-name { font-size: 14px; color: var(--text-muted); font-weight: 500; margin-bottom: 12px; }

.status-toggles { display: flex; gap: 6px; background: rgba(0,0,0,0.4); padding: 4px; border-radius: 12px; border: 1px solid var(--card-border); width: 100%; }
[data-theme="light"] .status-toggles { background: rgba(0,0,0,0.03); }
.status-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: transparent; border: 1px solid transparent; font-size: 11px; font-weight: 500; color: var(--text-muted); padding: 10px 4px; border-radius: 10px; transition: 0.2s; cursor: pointer; }
.status-btn i { font-size: 14px; }
.status-btn:hover { background: rgba(255,255,255,0.05); }
[data-theme="light"] .status-btn:hover { background: rgba(0,0,0,0.06); }
.status-btn[data-status="active"].active { background: rgba(52,211,153,0.15); color: #34d399; border-color: rgba(52,211,153,0.3); }
.status-btn[data-status="completed"].active { background: rgba(244,63,94,0.14); color: #fb7185; border-color: rgba(244,63,94,0.3); }
.status-btn[data-status="inactive"].active { background: rgba(255,255,255,0.1); color: var(--text-main); border-color: rgba(255,255,255,0.2); }
[data-theme="light"] .status-btn[data-status="inactive"].active { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.15); }

/* Custom Date Selector Matching Screenshot */
.date-section { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 20px;}
.date-section label { font-size: 15px; font-weight: 600; color: var(--text-muted); }
.custom-date-trigger { position: relative; width: 100%; display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 14px 20px; transition: 0.2s; cursor: pointer; }
[data-theme="light"] .custom-date-trigger { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
.custom-date-trigger:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
[data-theme="light"] .custom-date-trigger:hover { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.15); }
.date-display { color: var(--text-main); font-size: 15px; font-weight: 600; }
.custom-date-trigger i { color: var(--text-muted); font-size: 18px; }

.hidden-date-input { position: absolute; width: 0; height: 0; top: 50%; left: 50%; opacity: 0; pointer-events: none; border: none; z-index: -1;}
.hidden-date-input::-webkit-calendar-picker-indicator { display: none; }

.popover-body { display: flex; flex-direction: column; padding: 0 12px;}
.popover-footer { margin-top: 4px; }

/* Usage Bar Styles */
.usage-bar-bg { width: 100%; height: 8px; background: rgba(0,0,0,0.5); border-radius: 10px; overflow: hidden; border: 1px solid var(--card-border); box-shadow: inset 0 1px 4px rgba(0,0,0,0.3); }
[data-theme="light"] .usage-bar-bg { background: rgba(0,0,0,0.05); }
.usage-bar-fill { width: 0%; height: 100%; background: linear-gradient(90deg, #34d399, #818cf8); border-radius: 10px; transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s; box-shadow: 0 0 10px rgba(129,140,248,0.3); }

/* Payment Card Styles */
.card-section { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px;}
.card-section label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.payment-card-box { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.2); border: 1px solid var(--card-border); padding: 12px 16px; border-radius: 14px; position:relative; }
[data-theme="light"] .payment-card-box { background: rgba(255,255,255,0.4); }
.card-details { display: flex; flex-direction: column; gap: 0px; flex: 1; }
.card-name { font-size: 13px; font-weight: 600; color: var(--text-main); }
.card-number { font-size: 11px; font-weight: 500; color: var(--text-dim); }
.edit-card-btn { margin-left: auto; font-size: 12px; padding: 6px 10px; color: var(--accent); }

/* In-Popover Editable Usage Number Input */
.usage-input { width: 50px; padding: 4px; text-align: center; background: rgba(0,0,0,0.4); border: 1px solid var(--card-border); border-radius: 6px; font-size: 13px; font-weight: 700; color: var(--accent); outline: none; transition: 0.2s; font-family: inherit;}
[data-theme="light"] .usage-input { background: rgba(255,255,255,0.5); }
.usage-input:focus { border-color: rgba(129,140,248,0.5); box-shadow: 0 0 10px rgba(129,140,248,0.2); }
.usage-input::-webkit-outer-spin-button, .usage-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.usage-input { -moz-appearance: textfield; }

.usage-reset-input { background: rgba(0,0,0,0.4); border: 1px solid var(--card-border); border-radius: 6px; font-size: 12px; color: var(--text-muted); outline: none; padding: 4px 8px; font-family: inherit; transition: 0.2s; cursor: pointer; width: auto; min-width: 80px; text-align: center; white-space: nowrap; }
[data-theme="light"] .usage-reset-input { background: rgba(255,255,255,0.5); border-color: rgba(0,0,0,0.1); }
.usage-reset-input:focus { border-color: var(--accent); color: var(--text-main); }
.usage-reset-input::-webkit-calendar-picker-indicator { cursor: pointer; filter: invert(0.6); font-size: 10px; padding: 0;}
[data-theme="light"] .usage-reset-input::-webkit-calendar-picker-indicator { filter: invert(0.2); }

/* Stunning Custom JS Calendar Picker (To replace Native Browser UI) */
.stunning-picker {
    position: fixed; z-index: 10000; width: 310px;
    background: linear-gradient(145deg, rgba(40,40,48,0.95), rgba(20,20,25,0.95));
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 24px;
    box-shadow: 0 24px 50px rgba(0,0,0,0.6), inset 0 0 20px rgba(129,140,248,0.05);
    padding: 20px; display: flex; flex-direction: column; gap: 12px;
    opacity: 0; pointer-events: none; transform: scale(0.95) translateY(10px);
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="light"] .stunning-picker { background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(245,245,250,0.95)); border-color: rgba(0,0,0,0.08); box-shadow: 0 10px 40px rgba(0,0,0,0.1); }
.stunning-picker.show { opacity: 1; pointer-events: auto; transform: scale(1) translateY(0); }

.stunning-picker .cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;}
.stunning-picker .cal-header strong { font-size: 16px; font-weight: 600; text-shadow: 0 2px 10px rgba(255,255,255,0.2); }
[data-theme="light"] .stunning-picker .cal-header strong { text-shadow: none; color: var(--text-main); }
.stunning-picker .ghost-btn { padding: 6px; border-radius: 12px; }

.sp-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; border: none; padding: 0;}
.sp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }

.sp-cell {
    min-height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 12px; font-size: 14px; font-weight: 500; cursor: pointer; transition: 0.2s;
    background: transparent; color: var(--text-main); border: 1px solid transparent;
}
.sp-cell:hover { background: rgba(255,255,255,0.08); transform: scale(1.1); box-shadow: 0 4px 12px rgba(0,0,0,0.2);}
[data-theme="light"] .sp-cell:hover { background: rgba(0,0,0,0.05); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.sp-cell.empty { cursor: default; }
.sp-cell.empty:hover { background: transparent; transform: none; box-shadow: none;}
.sp-cell.dim { color: rgba(255,255,255,0.3); }
[data-theme="light"] .sp-cell.dim { color: rgba(0,0,0,0.3); }
.sp-cell.today { background: rgba(129,140,248,0.15); color: #818cf8; font-weight: 700; border-color: rgba(129,140,248,0.3); }
.sp-cell.selected { background: linear-gradient(135deg, #818cf8, #c084fc); color: #fff; font-weight: 700; box-shadow: 0 8px 20px rgba(129,140,248,0.4); border:none; transform: scale(1.05);}

.stunning-picker .cal-footer { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 12px; margin-top: 8px; }
.stunning-picker .cal-footer button { font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 10px; background: rgba(255,255,255,0.05);}
.stunning-picker .cal-footer button:hover { background: rgba(255,255,255,0.1); }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

/* Time Picker Specific Styles */
.tp-body { display: flex; gap: 8px; justify-content: center; align-items: center; height: 140px; background: rgba(0,0,0,0.2); border-radius: 12px; padding: 8px; border: 1px solid rgba(255,255,255,0.05); }
[data-theme="light"] .tp-body { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }
.tp-colon { font-weight: 600; color: var(--text-muted); padding-bottom: 4px; }
[data-theme="light"] .stunning-picker .cal-footer { border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .stunning-picker .cal-footer button { background: rgba(0,0,0,0.03); color: var(--accent); }
[data-theme="light"] .stunning-picker .cal-footer button:hover { background: rgba(0,0,0,0.07); }
.time-col { height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; flex: none; width: 50px; padding-right: 0; -ms-overflow-style: none; scrollbar-width: none; align-items: center;}
.time-col::-webkit-scrollbar { display: none; }
.time-cell { width: 44px; height: 36px; display: flex; justify-content: center; align-items: center; padding: 0; font-size: 15px; font-weight: 500; border-radius: 8px; cursor: pointer; transition: 0.2s; color: var(--text-muted); border: 1px solid transparent; flex-shrink: 0;}
.time-cell:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
[data-theme="light"] .time-cell:hover { background: rgba(0,0,0,0.05); }
.time-cell.selected { background: linear-gradient(135deg, rgba(129,140,248,0.2), rgba(192,132,252,0.2)); color: var(--accent); font-weight: 700; border-color: rgba(129,140,248,0.3); box-shadow: 0 4px 10px rgba(129,140,248,0.1); transform: scale(1.05); }

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: none;
  background: transparent;
  color: inherit;
}

input,
select,
textarea {
  color: var(--text-main);
}

textarea {
  resize: vertical;
}

body {
  position: relative;
}

html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition: none !important;
}

html.theme-transitioning::view-transition {
  pointer-events: none;
}

html.theme-transitioning::view-transition-group(root) {
  animation: none;
}

html.theme-transitioning::view-transition-old(root) {
  animation: none;
  opacity: 1;
  mix-blend-mode: normal;
}

html.theme-transitioning::view-transition-new(root) {
  animation: theme-fade-in 280ms cubic-bezier(0.4, 0, 0.2, 1) both;
  mix-blend-mode: normal;
}

html.theme-native-transition::view-transition-new(root) {
  animation: none;
  opacity: 0;
}

@keyframes theme-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Color interpolation for WebViews without the View Transition API. */
html.theme-color-transition body,
html.theme-color-transition body * {
  transition-property: background-color, color, border-color, box-shadow, fill, stroke !important;
  transition-duration: 280ms !important;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@media (prefers-reduced-motion: reduce) {
  html.theme-transitioning::view-transition-new(root) {
    animation: none;
  }
}

.logo-box-mark {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #fff, rgba(255,255,255,0.18));
  box-shadow: 0 0 24px rgba(255,255,255,0.28);
}

.main-wrapper {
  min-width: 0;
}

body.time-picker-open .main-wrapper {
  overflow: hidden;
}

body.overlay-open .main-wrapper {
  overflow: hidden;
}

body.date-picker-open .main-wrapper {
  overflow: hidden;
}

#datePickerLayer {
  position: fixed;
  inset: 0;
  z-index: 10015;
  pointer-events: none;
}

#datePickerLayer.open {
  pointer-events: auto;
}

#servicePopoverLayer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}

#servicePopoverLayer.open {
  pointer-events: auto;
}

#timePickerLayer {
  position: fixed;
  inset: 0;
  z-index: 10020;
  pointer-events: none;
}

#timePickerLayer.open {
  pointer-events: auto;
}

.service-popover-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
}

.time-picker-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
}

.date-picker-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
}

.view-stack {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.view-panel {
  min-height: 0;
}

.nav-item,
.drop-item,
.icon-action,
.pill,
.service-filter-chip,
.ghost-btn,
.theme-btn,
.spotlight-btn {
  cursor: pointer;
}

.nav-item,
.drop-item {
  width: 100%;
  text-align: left;
}

.nav-item-icon,
.button-icon,
.dropdown-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-item-icon svg,
.button-icon svg,
.theme-btn svg,
.dropdown-chevron svg,
.icon-action svg,
.ghost-btn svg,
.service-mark svg,
.stat-icon svg,
.lock-pill svg,
.sub-badge svg {
  width: 18px;
  height: 18px;
}

.nav-item-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.scope-chip {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(129,140,248,0.18), rgba(192,132,252,0.2));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.action-bar {
  padding: 12px 18px;
}

.add-account-form {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.action-bar-side {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-icon {
  color: var(--text-muted);
  font-weight: 700;
}

.add-account-form .input-wrap {
  flex: 0 1 64%;
  max-width: 64%;
  min-width: 0;
  height: 50px;
  padding: 0 18px;
  border-radius: 16px;
}

.add-account-form .input-wrap input {
  font-size: 14px;
}

.glow-btn--add-account {
  min-width: 164px;
  height: 50px;
  padding: 0 18px;
  margin-left: auto;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  box-shadow: 0 0 28px rgba(129,140,248,0.26);
}

.glow-btn--add-account::before {
  border-radius: 18px;
  filter: blur(12px);
  opacity: 0.72;
}

.readonly-btn.active,
.lock-btn.active {
  background: rgba(129,140,248,0.14);
  color: var(--text-main);
  border-color: rgba(129,140,248,0.3);
}

.toggle-visual {
  width: 38px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  margin-left: auto;
  transition: background 0.2s ease;
}

[data-theme="light"] .toggle-visual {
  background: rgba(0,0,0,0.08);
}

.toggle-knob {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(0);
  transition: transform 0.2s ease;
}

.lock-btn.active .toggle-visual {
  background: var(--accent);
}

.lock-btn.active .toggle-knob {
  transform: translateX(16px);
}

#accountScopeDropdown[hidden] {
  display: none !important;
}

.stats-box,
.filters-box,
.table-box,
.side-box {
  min-width: 0;
}

.bento-box {
  min-height: 0;
}

.box-allow-overflow {
  overflow: visible;
}

.stats-box .content-z {
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

.filters-box .content-z {
  gap: 0;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.filter-row--matrix {
  flex-wrap: nowrap;
  gap: 18px;
}

.filter-row--advanced {
  align-items: flex-end;
}

.cool-select {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 140px;
}

.cool-select span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.cool-select select,
.inspector-form input,
.inspector-form select,
.inspector-form textarea {
  background: var(--black-op);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
}

.cool-select select:focus,
.inspector-form input:focus,
.inspector-form select:focus,
.inspector-form textarea:focus {
  border-color: rgba(129,140,248,0.45);
  box-shadow: 0 0 0 3px rgba(129,140,248,0.14);
}

.service-filter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
}

.service-filter-row::-webkit-scrollbar {
  display: none;
}

.service-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--white-op);
  color: var(--text-muted);
  white-space: nowrap;
  flex: 0 0 auto;
}

.service-filter-chip.active {
  border-color: rgba(129,140,248,0.4);
  color: var(--text-main);
  background: rgba(129,140,248,0.12);
}

.service-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.service-mark--chip {
  width: 26px;
  height: 26px;
}

.service-mark--frame {
  width: 32px;
  height: 32px;
  vertical-align: middle;
}

.service-mark--button {
  width: 22px;
  height: 22px;
}

.service-mark--emerald {
  background: rgba(16,185,129,0.16);
}

.service-mark--youtube {
  background: rgba(239,68,68,0.16);
}

.service-mark--spotify {
  background: rgba(52,211,153,0.16);
}

.service-mark--chatgpt {
  background: rgba(16,185,129,0.16);
}

.service-mark--netflix {
  background: rgba(225,29,72,0.18);
}

.service-mark--gemini {
  background: rgba(130,114,249,0.16);
}

.service-mark--claude {
  background: rgba(217,119,87,0.18);
}

.service-mark--red {
  background: rgba(239,68,68,0.16);
}

.service-mark--green {
  background: rgba(52,211,153,0.16);
}

.service-mark--slate,
.service-mark--indigo,
.service-mark--neutral {
  background: rgba(129,140,248,0.16);
}

.box-copy {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.icon-action {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--white-op);
  color: var(--text-muted);
}

.icon-action:hover {
  color: var(--text-main);
  background: var(--white-op-hover);
}

.matrix-sync-trigger {
  --sync-color: #a3a3a3;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  height: 36px;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--sync-color) 65%, var(--card-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--sync-color) 9%, var(--card-bg));
  color: var(--sync-color);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}

.matrix-sync-trigger[data-sync-state="ready"] { --sync-color: #83e5b5; }
.matrix-sync-trigger:is([data-sync-state="pending"], [data-sync-state="stale"]) { --sync-color: #ffc15c; }
.matrix-sync-trigger:is([data-sync-state="working"], [data-sync-state="connecting"]) { --sync-color: #9ba7ff; }
.matrix-sync-trigger[data-sync-state="error"] { --sync-color: #ff8585; }
.matrix-sync-trigger[data-sync-state="waiting"] { --sync-color: #b8b8bd; border-style: dashed; }
.matrix-sync-trigger[data-sync-state="off"] { --sync-color: #b0b0b7; }

.matrix-sync-trigger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--sync-color) 16%, var(--card-bg));
  border-color: var(--sync-color);
}
.matrix-sync-trigger:focus-visible { outline: 2px solid var(--sync-color); outline-offset: 3px; }
.matrix-sync-trigger:disabled { opacity: 1; cursor: progress; }
.sync-state-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex-shrink: 0; }
.sync-state-icon svg { width: 100%; height: 100%; }
.sync-state-label { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; line-height: 16px; }
.matrix-sync-trigger[data-sync-state="working"] .sync-state-icon { animation: sync-state-spin 1s linear infinite; }
.sync-state-progress {
  position: absolute;
  height: 3px;
  bottom: 0;
  left: 0;
  width: 40%;
  border-radius: 3px;
  background: var(--sync-color);
  animation: sync-state-slide 1.4s ease-in-out infinite;
}
@keyframes sync-state-spin { to { transform: rotate(360deg); } }
@keyframes sync-state-slide { from { transform: translateX(-100%); } to { transform: translateX(350%); } }

[data-theme="light"] .matrix-sync-trigger[data-sync-state="ready"] { --sync-color: #167445; }
[data-theme="light"] .matrix-sync-trigger:is([data-sync-state="pending"], [data-sync-state="stale"]) { --sync-color: #905700; }
[data-theme="light"] .matrix-sync-trigger:is([data-sync-state="working"], [data-sync-state="connecting"]) { --sync-color: #515bc2; }
[data-theme="light"] .matrix-sync-trigger[data-sync-state="error"] { --sync-color: #bd3434; }
[data-theme="light"] .matrix-sync-trigger:is([data-sync-state="waiting"], [data-sync-state="off"]) { --sync-color: #606068; }

@media (prefers-reduced-motion: reduce) {
  .matrix-sync-trigger, .matrix-sync-trigger .sync-state-icon, .sync-state-progress { animation: none !important; transition: none; }
  .sync-state-progress { left: 20%; width: 60%; }
}

.matrix-scroll {
  max-height: 100%;
  overflow: auto;
}

/* Keep enough space for an account row when the Inspector occupies a row. */
.matrix-board-panel {
  min-height: 300px;
}

.matrix-board-panel .matrix-scroll {
  min-height: 160px;
}

.matrix-table th span {
  vertical-align: middle;
}

.matrix-service-head-cell {
  white-space: nowrap;
}

.matrix-service-head-cell.is-focused {
  color: var(--text-main);
}

.matrix-service-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
}

.matrix-service-head-label {
  display: inline-block;
  vertical-align: middle;
}

.matrix-row.is-selected {
  background: rgba(129,140,248,0.08);
}

.matrix-row.is-active {
  outline: 1px solid rgba(129,140,248,0.2);
}

.matrix-row.is-focused {
  outline: 1px solid rgba(129,140,248,0.4);
  background: rgba(129,140,248,0.05);
}

.matrix-row td {
  background: transparent;
}

.service-cell.is-focused,
.matrix-service-head-cell.is-focused {
  box-shadow: inset 0 -2px 0 rgba(129,140,248,0.42);
}

.account-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.selection-pill {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  flex-shrink: 0;
}

[data-theme="light"] .selection-pill {
  border-color: rgba(0,0,0,0.18);
}

.selection-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(129,140,248,0.16);
}

.drag-handle--inline {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.drag-handle--inline:hover {
  border-color: var(--card-border);
  background: var(--white-op);
  color: var(--text-main);
}

.avatar-chip {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
  background: linear-gradient(135deg, hsla(var(--avatar-hue), 76%, 62%, 0.24), hsla(calc(var(--avatar-hue) + 38), 82%, 58%, 0.4));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.avatar-chip--sm {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 11px;
}

.account-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.account-meta strong,
.account-meta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-meta span {
  font-size: 12px;
  color: var(--text-muted);
}

.tag-row.inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  flex: 0 1 168px;
  max-width: 168px;
  justify-content: flex-end;
  overflow: hidden;
}

.tag-row.inline:empty {
  display: none;
}

.lock-pill {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
  background: var(--white-op);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lock-pill:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
  color: var(--text-main);
}

.lock-pill:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.lock-pill.locked {
  color: #fca5a5;
  border-color: rgba(239,68,68,0.24);
  background: rgba(239,68,68,0.1);
}

.sub-badge.is-open {
  box-shadow: 0 0 0 3px rgba(129,140,248,0.16);
}

.panel-empty {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 28px 20px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--card-border);
  border-radius: 18px;
  background: rgba(255,255,255,0.02);
}

.selection-summary {
  min-height: 140px;
}

.inspector-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(172px, 188px);
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.inspector-hero-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.inspector-hero-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.inspector-hero-title-wrap {
  display: block;
  min-width: 0;
}

.inspector-hero-title-input {
  width: 100%;
  padding: 0 0 2px;
  border: none;
  border-bottom: 1px dashed transparent;
  background: transparent;
  color: var(--text-main);
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  outline: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.inspector-hero-title-input:hover,
.inspector-hero-title-input:focus {
  border-bottom-color: rgba(129,140,248,0.42);
}

.inspector-hero-title-input::placeholder {
  color: var(--text-dim);
}

.inspector-hero p {
  color: var(--text-muted);
  font-size: 13px;
}

.inspector-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-self: start;
}

.inspector-strip-main {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(280px, 1.05fr) minmax(320px, 1.4fr);
  gap: 16px;
  align-items: center;
}

.inspector-actions-grid--matrix-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-self: center;
}

.inspector-actions-grid .ghost-btn {
  min-width: 0;
  min-height: 38px;
  padding: 7px 10px;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  font-size: 12px;
  font-weight: 700;
}

.inspector-actions-grid .ghost-btn svg {
  width: 13px;
  height: 13px;
}

.inspector-actions-grid .ghost-btn span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--white-op);
  color: var(--text-main);
}

.ghost-btn.subtle {
  background: transparent;
}

.ghost-btn.active {
  border-color: rgba(129,140,248,0.38);
  background: rgba(129,140,248,0.12);
}

.ghost-btn.danger {
  color: #fca5a5;
}

.copy-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.copy-preview {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 16px;
  word-break: break-all;
}

[data-theme="light"] .copy-preview {
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(244,244,251,0.9));
  border-color: rgba(99,102,241,0.12);
  color: #5f6778;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.94),
    0 10px 24px rgba(129,140,248,0.06);
}

.inspector-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.input-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-block > span {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.input-block--full {
  grid-column: 1 / -1;
}

.inspector-footer {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.box-header--inspector {
  align-items: center;
  gap: 12px;
}

.inspector-shell {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.inspector-shell--dock {
  gap: 0;
}

.inspector-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.inspector-account-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inspector-account-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.inspector-account-nav-count {
  min-width: 66px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.inspector-layout-toggle {
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.inspector-services-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.inspector-services-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inspector-services-head h5 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.inspector-services-head span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.inspector-service-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inspector-services-section--matrix-strip {
  min-width: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.matrix-inspector-top-panel .inspector-footer {
  justify-content: flex-end;
  margin-top: 12px;
}

.inspector-services-section--matrix-strip .inspector-service-list {
  flex-direction: row;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
  overflow: visible;
  padding-bottom: 0;
  scrollbar-width: none;
}

.inspector-services-section--matrix-strip .inspector-service-list::-webkit-scrollbar {
  display: none;
}

.inspector-service-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
  white-space: nowrap;
}

.inspector-service-pill.is-open {
  border-color: rgba(129,140,248,0.3);
  background: rgba(99,102,241,0.12);
}

.inspector-service-pill .service-mark--button {
  flex: 0 0 auto;
}

.inspector-service-pill-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(129,140,248,0.12);
  color: #aeb6ff;
  font-size: 11px;
  font-weight: 700;
}

.inspector-service-card {
  padding: 0;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}

.inspector-service-card.is-open {
  border-color: rgba(129,140,248,0.24);
  background: rgba(99,102,241,0.12);
  box-shadow: inset 0 0 0 1px rgba(129,140,248,0.14);
}

.inspector-service-card-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
}

.inspector-service-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.inspector-service-card-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.05);
}

.inspector-service-card-title .service-mark--chip {
  width: 28px;
  height: 28px;
}

.inspector-service-summary {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.inspector-service-summary::-webkit-scrollbar {
  display: none;
}

.inspector-service-summary-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: nowrap;
  width: max-content;
}

.inspector-service-metric {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.18);
  min-width: 0;
}

.inspector-service-metric--payment {
  width: fit-content;
  max-width: 170px;
}

.inspector-service-metric strong {
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  white-space: nowrap;
}

.inspector-service-metric--payment strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.inspector-service-metric--payment .payment-card-brand {
  width: 38px;
  height: 20px;
  padding: 3px 6px;
  border-radius: 8px;
  box-shadow: none;
}

.inspector-service-metric--payment .payment-card-brand--compact {
  width: 38px;
  height: 20px;
  padding: 3px 6px;
}

.inspector-service-metric--payment .payment-card-brand--placeholder svg {
  width: 12px;
  height: 12px;
}

.inspector-service-metric-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 0 5px;
  height: 16px;
  border-radius: 999px;
  background: rgba(129,140,248,0.14);
  color: #aeb6ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.inspector-service-metric--quota {
  flex: 0 0 auto;
}

.inspector-service-metric--quota strong {
  overflow: visible;
}

.inspector-service-metric-emoji {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1;
}

.inspector-service-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(129,140,248,0.16);
  background: rgba(129,140,248,0.08);
  font-size: 11px;
  font-weight: 700;
  color: #9aa3ff;
  white-space: nowrap;
}

.inspector-service-card.is-open .inspector-service-card-cta {
  background: rgba(129,140,248,0.16);
  border-color: rgba(129,140,248,0.28);
}

.inspector-service-metric--payment strong,
.inspector-service-metric--billing strong,
.inspector-service-metric--expiry strong,
.inspector-service-metric--quota strong {
  color: var(--text-main);
}

.inspector-service-empty {
  min-height: 108px;
}

.inspector-shell--dock .inspector-hero {
  grid-template-columns: 1fr;
  margin-bottom: 16px;
}

.inspector-shell--dock .inspector-actions-grid {
  width: 100%;
}

.inspector-shell--dock .inspector-service-card-header {
  align-items: flex-start;
}

.inspector-shell--dock .inspector-footer {
  flex-direction: column;
}

.inspector-shell--dock .copy-preview {
  font-size: 12px;
}

.inspector-shell--dock .template-stack {
  margin-top: 16px;
}

.template-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.template-stack--matrix-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.template-stack--matrix-strip h5 {
  grid-column: 1 / -1;
}

.template-stack--matrix-strip .template-suggestion {
  align-items: flex-start;
  min-width: 0;
}

.template-stack h5 {
  font-size: 13px;
  color: var(--text-muted);
}

.template-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
}

.template-suggestion span,
.template-suggestion small,
.queue-card p,
.issue-card p,
.template-card p,
.template-card small {
  color: var(--text-muted);
}

.stack-list,
.template-grid {
  display: grid;
  gap: 14px;
}

.issues-list {
  margin-top: 18px;
}

.issues-compose-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.04);
}

.issues-compose-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.issues-compose-head strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}

.issues-compose-head p,
.issue-fix-hint {
  color: var(--text-muted);
}

.issues-compose-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.issues-textarea {
  min-height: 104px;
  background: var(--black-op);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 16px;
  outline: none;
  transition: 0.2s ease;
}

.issues-textarea:focus {
  border-color: rgba(129,140,248,0.45);
  box-shadow: 0 0 0 3px rgba(129,140,248,0.14);
}

.issues-submit-btn {
  margin-left: 0;
  min-width: 132px;
  align-self: center;
}

.queue-card,
.issue-card,
.template-card,
.heatmap-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.03);
}

.queue-card,
.upcoming-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.review-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.review-stat-card,
.review-target-card,
.review-analysis-card,
.review-log-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.03);
}

.review-stat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-stat-card span,
.review-analysis-label,
.review-target-identity p,
.review-target-meta,
.review-log-meta,
.review-log-head p,
.review-service-pill small {
  color: var(--text-muted);
}

.review-stat-card span,
.review-analysis-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.review-stat-card strong {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.review-stat-card[data-tone="blue"] {
  border-color: rgba(96,165,250,0.18);
  background: linear-gradient(180deg, rgba(59,130,246,0.12), rgba(255,255,255,0.02));
}

.review-stat-card[data-tone="red"] {
  border-color: rgba(239,68,68,0.18);
  background: linear-gradient(180deg, rgba(239,68,68,0.12), rgba(255,255,255,0.02));
}

.review-stat-card[data-tone="amber"] {
  border-color: rgba(245,158,11,0.18);
  background: linear-gradient(180deg, rgba(245,158,11,0.12), rgba(255,255,255,0.02));
}

.review-stat-card[data-tone="safe"] {
  border-color: rgba(34,197,94,0.18);
  background: linear-gradient(180deg, rgba(34,197,94,0.12), rgba(255,255,255,0.02));
}

.review-stat-card[data-tone="warning"] {
  border-color: rgba(244,114,182,0.18);
  background: linear-gradient(180deg, rgba(244,114,182,0.12), rgba(255,255,255,0.02));
}

.review-target-list,
.review-analysis-stack,
.review-log-list {
  display: grid;
  gap: 14px;
}

.review-target-head,
.review-log-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.review-target-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-target-identity strong,
.review-analysis-card strong,
.review-log-head strong,
.review-service-pill strong {
  color: var(--text-main);
}

.review-target-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.review-reason-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(129,140,248,0.18);
  background: rgba(129,140,248,0.1);
  color: #c7d2fe;
  font-size: 11px;
  font-weight: 700;
}

.review-target-meta,
.review-log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  font-size: 12px;
}

.review-analysis-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.review-analysis-card p {
  color: var(--text-muted);
  line-height: 1.55;
}

.review-analysis-card small {
  color: var(--text-dim);
  font-size: 12px;
}

.review-service-pulse {
  display: grid;
  gap: 10px;
}

.review-service-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.18);
}

.review-service-pill strong {
  flex: 1 1 auto;
}

.review-log-head p {
  margin-top: 8px;
}

.review-log-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.review-log-service {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.review-log-service em {
  font-style: normal;
}

.review-log-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.issue-head,
.issue-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.issue-head {
  align-items: flex-start;
}

.issue-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 14px;
  margin-bottom: 0;
}

.issue-head-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.issue-source-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(129,140,248,0.16);
  color: #c7d2fe;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.severity-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(251,191,36,0.16);
  color: #fdba74;
  font-size: 11px;
  text-transform: uppercase;
}

.severity-critical .severity-badge {
  background: rgba(239,68,68,0.16);
  color: #fca5a5;
}

.severity-info .severity-badge {
  background: rgba(59,130,246,0.16);
  color: #93c5fd;
}

.review-log-card.severity-warning {
  box-shadow: inset 0 0 0 1px rgba(245,158,11,0.08);
}

.review-log-card.severity-critical {
  box-shadow: inset 0 0 0 1px rgba(239,68,68,0.1);
}

.review-log-card.severity-info {
  box-shadow: inset 0 0 0 1px rgba(59,130,246,0.08);
}

.issue-card--manual {
  box-shadow: inset 0 0 0 1px rgba(129,140,248,0.08);
}

.issue-remove-btn {
  color: #fca5a5;
}

.issue-remove-btn:hover {
  background: rgba(239,68,68,0.12);
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.heatmap-card-top,
.heatmap-service,
.heatmap-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.heatmap-metrics div {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.16);
  border: 1px solid var(--card-border);
}

.heatmap-metrics span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.template-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sync-banner-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 8px;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.04);
}

.sync-banner-card--stale {
  border-color: rgba(251,191,36,0.32);
}

.sync-banner-card--error {
  border-color: rgba(239,68,68,0.32);
}

.sync-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.date-trigger,
.time-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(0,0,0,0.18);
  color: var(--text-main);
}

[data-theme="light"] .input-wrap,
[data-theme="light"] .search-wrap,
[data-theme="light"] .cool-input,
[data-theme="light"] .inspector-form input,
[data-theme="light"] .inspector-form select,
[data-theme="light"] .inspector-form textarea,
[data-theme="light"] .date-trigger,
[data-theme="light"] .time-trigger,
[data-theme="light"] .queue-card,
[data-theme="light"] .review-stat-card,
[data-theme="light"] .review-target-card,
[data-theme="light"] .review-analysis-card,
[data-theme="light"] .review-log-card,
[data-theme="light"] .issue-card,
[data-theme="light"] .template-card,
[data-theme="light"] .heatmap-card,
[data-theme="light"] .upcoming-item {
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(244,244,251,0.9));
  border-color: rgba(99,102,241,0.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.94),
    0 10px 24px rgba(129,140,248,0.06);
}

[data-theme="light"] .input-wrap:focus-within,
[data-theme="light"] .search-wrap:focus-within,
[data-theme="light"] .cool-input:focus,
[data-theme="light"] .inspector-form input:focus,
[data-theme="light"] .inspector-form select:focus,
[data-theme="light"] .inspector-form textarea:focus,
[data-theme="light"] .date-trigger:focus-visible,
[data-theme="light"] .time-trigger:focus-visible {
  border-color: rgba(99,102,241,0.26);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.96),
    0 0 0 3px rgba(99,102,241,0.12),
    0 12px 28px rgba(129,140,248,0.08);
}

[data-theme="light"] .upcoming-item:hover,
[data-theme="light"] .queue-card:hover,
[data-theme="light"] .issue-card:hover,
[data-theme="light"] .template-card:hover,
[data-theme="light"] .heatmap-card:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(240,241,252,0.94));
}

[data-theme="light"] .upcoming-date,
[data-theme="light"] .heatmap-metrics div {
  background: rgba(99,102,241,0.06);
  border-color: rgba(99,102,241,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
}

[data-theme="light"] .upcoming-item {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(var(--upcoming-accent-rgb), 0.08));
  border-color: rgba(var(--upcoming-accent-rgb), 0.22);
}

[data-theme="light"] .upcoming-item:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(var(--upcoming-accent-rgb), 0.12));
}

[data-theme="light"] .upcoming-date,
[data-theme="light"] .upcoming-countdown {
  background: rgba(var(--upcoming-accent-rgb), 0.1);
  border-color: rgba(var(--upcoming-accent-rgb), 0.18);
  color: var(--upcoming-accent-solid);
}

[data-theme="light"] .upcoming-details strong,
[data-theme="light"] .heatmap-service strong,
[data-theme="light"] .queue-card strong,
[data-theme="light"] .issue-head strong {
  color: #20263a;
}

[data-theme="light"] .upcoming-details span,
[data-theme="light"] .heatmap-metrics span,
[data-theme="light"] .queue-card p,
[data-theme="light"] .review-stat-card span,
[data-theme="light"] .review-target-identity p,
[data-theme="light"] .review-target-meta,
[data-theme="light"] .review-log-meta,
[data-theme="light"] .review-log-head p,
[data-theme="light"] .review-analysis-card p,
[data-theme="light"] .review-analysis-card small,
[data-theme="light"] .review-service-pill small,
[data-theme="light"] .issue-card p,
[data-theme="light"] .template-card p,
[data-theme="light"] .template-card small,
[data-theme="light"] .service-field-card-hint,
[data-theme="light"] .service-field-card-header,
[data-theme="light"] .input-block > span {
  color: #667085;
}

[data-theme="light"] .inspector-account-nav-count,
[data-theme="light"] .inspector-service-card,
[data-theme="light"] .inspector-service-metric {
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(244,244,251,0.9));
  border-color: rgba(99,102,241,0.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.94),
    0 10px 24px rgba(129,140,248,0.06);
}

[data-theme="light"] .inspector-services-section {
  border-top-color: rgba(15,23,42,0.08);
}

[data-theme="light"] .inspector-actions-grid .ghost-btn,
[data-theme="light"] .inspector-service-card-title,
[data-theme="light"] .inspector-service-card-cta {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(244,244,251,0.88));
  border-color: rgba(99,102,241,0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.96),
    0 8px 18px rgba(129,140,248,0.06);
}

[data-theme="light"] .inspector-service-card.is-open {
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(99,102,241,0.12));
  border-color: rgba(99,102,241,0.18);
}

[data-theme="light"] .review-reason-badge {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.14);
  color: #6366f1;
}

[data-theme="light"] .review-service-pill {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.07);
}

[data-theme="light"] .inspector-account-nav-count {
  color: #667085;
}

[data-theme="light"] .inspector-services-head span,
[data-theme="light"] .inspector-service-card-cta {
  color: #6366f1;
}

[data-theme="light"] .inspector-service-metric strong,
[data-theme="light"] .review-stat-card strong,
[data-theme="light"] .review-analysis-card strong,
[data-theme="light"] .review-log-head strong,
[data-theme="light"] .review-target-identity strong,
[data-theme="light"] .review-service-pill strong {
  color: #20263a;
}

.date-trigger--compact {
  padding: 11px 13px;
}

.date-trigger-icon,
.time-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.popover-title {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.popover-header .ghost-btn {
  width: 36px;
  height: 36px;
  padding: 0;
}

.popover-body {
  gap: 10px;
}

.glass-popover {
  position: fixed;
}

.service-editor-popover {
  z-index: 10010;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 16px 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(24, 22, 29, 0.95), rgba(22, 18, 28, 0.97)),
    radial-gradient(circle at 50% 100%, rgba(129,140,248,0.12), transparent 48%);
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    0 24px 54px rgba(0,0,0,0.46),
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 0 20px rgba(129,140,248,0.08);
  gap: 14px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.service-editor-popover::-webkit-scrollbar {
  display: none;
}

[data-theme="light"] .service-editor-popover {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,244,252,0.98)),
    radial-gradient(circle at 50% 100%, rgba(129,140,248,0.1), transparent 48%);
  border-color: rgba(15,23,42,0.08);
  box-shadow:
    0 24px 64px rgba(15,23,42,0.16),
    inset 0 1px 0 rgba(255,255,255,0.88);
}

.service-editor-header {
  display: flex;
  justify-content: flex-end;
}

.service-editor-close {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-main);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

[data-theme="light"] .service-editor-close {
  border-color: rgba(15,23,42,0.08);
  background: rgba(15,23,42,0.03);
}

.service-editor-close:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
}

[data-theme="light"] .service-editor-close:hover {
  background: rgba(15,23,42,0.08);
}

.service-editor-close svg {
  width: 18px;
  height: 18px;
}

.service-editor-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: -2px;
}

.service-editor-popover .service-logo-large {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #0c0b0f;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 24px rgba(0,0,0,0.2);
}

[data-theme="light"] .service-editor-popover .service-logo-large {
  background: #f7f7fb;
  border-color: rgba(15,23,42,0.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 18px 34px rgba(15,23,42,0.08);
}

.service-editor-popover .service-logo-large .service-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
}

.service-editor-popover .service-logo-large .service-mark svg {
  width: 32px;
  height: 32px;
}

.service-editor-account {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}

.service-editor-statuses {
  gap: 0;
  padding: 4px;
  border-radius: 14px;
  background: rgba(7,7,10,0.7);
  border-color: rgba(255,255,255,0.06);
}

[data-theme="light"] .service-editor-statuses {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.08);
}

.service-editor-popover .status-btn {
  min-height: 72px;
  gap: 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.service-editor-popover .status-btn-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.service-editor-popover .status-btn svg {
  width: 18px;
  height: 18px;
}

.service-editor-popover .status-btn[data-status="active"].active {
  background: rgba(17, 54, 42, 0.98);
  color: #35e6b0;
  border-color: rgba(53,230,176,0.3);
}

.service-editor-popover .status-btn[data-status="completed"].active {
  background: rgba(68, 14, 26, 0.98);
  color: #fda4af;
  border-color: rgba(244,63,94,0.34);
}

.service-editor-popover .status-btn[data-status="inactive"].active {
  background: rgba(255,255,255,0.04);
  color: rgba(225,228,238,0.9);
  border-color: rgba(255,255,255,0.08);
}

[data-theme="light"] .service-editor-popover .status-btn[data-status="active"].active {
  background: rgba(16,185,129,0.14);
  color: #0f9f73;
  border-color: rgba(16,185,129,0.22);
}

[data-theme="light"] .service-editor-popover .status-btn[data-status="completed"].active {
  background: rgba(244,63,94,0.12);
  color: #e11d48;
  border-color: rgba(244,63,94,0.24);
}

[data-theme="light"] .service-editor-popover .status-btn[data-status="inactive"].active {
  background: rgba(15,23,42,0.05);
  color: #485062;
  border-color: rgba(15,23,42,0.09);
}

.service-editor-body {
  gap: 18px;
  padding: 0 8px;
}

.usage-section,
.service-editor-payment,
.service-editor-date-stack {
  display: flex;
  flex-direction: column;
}

.usage-section {
  gap: 10px;
}

.usage-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.usage-split-panel {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.usage-split-panel + .usage-split-panel {
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.08);
}

[data-theme="light"] .usage-split-panel + .usage-split-panel {
  border-left-color: rgba(15,23,42,0.08);
}

.usage-split-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.usage-window-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.usage-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.service-section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(225,228,238,0.76);
}

[data-theme="light"] .service-section-label {
  color: #5b6476;
}

.service-section-label svg {
  width: 16px;
  height: 16px;
}

.usage-section-controls,
.usage-editor {
  display: flex;
  align-items: center;
}

.usage-section-controls {
  gap: 8px;
}

.usage-split-panel .usage-section-controls {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.usage-editor {
  gap: 8px;
}

.usage-badge-low {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(244,63,94,0.16);
  border: 1px solid rgba(244,63,94,0.26);
  color: #ff5f81;
  font-size: 10px;
  font-weight: 800;
}

.usage-badge-low.is-hidden,
.usage-badge-low[hidden] {
  display: none;
}

.usage-badge-low svg {
  width: 12px;
  height: 12px;
}

.service-editor-popover .usage-input {
  width: 50px;
  height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,9,14,0.92);
  color: #8890ff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

[data-theme="light"] .service-editor-popover .usage-input::-webkit-outer-spin-button,
[data-theme="light"] .service-editor-popover .usage-input::-webkit-inner-spin-button,
.service-editor-popover .usage-input::-webkit-outer-spin-button,
.service-editor-popover .usage-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.service-editor-popover .usage-input {
  -moz-appearance: textfield;
}

[data-theme="light"] .service-editor-popover .usage-input {
  border-color: rgba(15,23,42,0.08);
  background: rgba(15,23,42,0.04);
  color: #5f67df;
}

.service-editor-popover .usage-input:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.service-editor-popover .usage-input:not(:disabled):focus {
  border-color: rgba(129,140,248,0.42);
  box-shadow: 0 0 0 3px rgba(129,140,248,0.12);
}

.usage-editor[data-level="low"] .usage-input {
  color: #ff5f81;
}

.usage-editor[data-level="medium"] .usage-input {
  color: #ffb547;
}

.usage-editor[data-level="high"] .usage-input {
  color: #7f8fff;
}

.usage-unit {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.service-editor-popover .usage-bar-bg {
  height: 8px;
  border: none;
  background: rgba(0,0,0,0.42);
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.34);
}

[data-theme="light"] .service-editor-popover .usage-bar-bg {
  background: rgba(15,23,42,0.08);
}

.service-editor-popover .usage-bar-fill.low {
  background: linear-gradient(90deg, #ff4b6d, #ffb547);
  box-shadow: 0 0 16px rgba(255,91,114,0.26);
}

.service-editor-popover .usage-bar-fill.medium {
  background: linear-gradient(90deg, #ffb547, #f8df72);
  box-shadow: 0 0 16px rgba(255,181,71,0.24);
}

.service-editor-popover .usage-bar-fill.high {
  background: linear-gradient(90deg, #2bdc9d, #8f9bff);
  box-shadow: 0 0 16px rgba(129,140,248,0.24);
}

.service-editor-usage-reset {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--text-dim);
}

.service-editor-usage-reset-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(225,228,238,0.56);
}

[data-theme="light"] .service-editor-usage-reset-label {
  color: #7a8292;
}

.service-editor-usage-reset .time-trigger {
  position: relative;
  width: auto;
  min-width: 108px;
  min-height: 30px;
  padding: 0 34px 0 12px;
  border-radius: 8px;
  background: rgba(10,9,14,0.92);
  border-color: rgba(255,255,255,0.08);
  justify-content: center;
}

[data-theme="light"] .service-editor-usage-reset .time-trigger {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.08);
}

.service-editor-usage-reset .time-trigger span:first-child {
  flex: 0 1 auto;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.service-editor-usage-reset .time-trigger-icon {
  position: absolute;
  right: 10px;
}

.time-picker-popup {
  padding: 16px;
  border-radius: 20px;
  gap: 14px;
}

.time-picker-header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 2px;
  min-height: 40px;
}

.time-picker-header strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.time-picker-close {
  position: absolute;
  top: 0;
  right: 0;
}

.time-picker-popup {
  z-index: 10000;
}

.date-picker-popup {
  z-index: 10016;
}

.date-picker-popup .cal-header {
  position: relative;
  justify-content: center;
  min-height: 40px;
}

.date-picker-popup .cal-header strong {
  text-align: center;
}

.date-picker-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
}

.date-picker-footer {
  margin-top: 2px;
}

.date-picker-apply {
  width: 100%;
}

.time-picker-popup .tp-body {
  gap: 12px;
  height: 180px;
  padding: 14px 14px;
  border-radius: 18px;
  overflow: visible;
}

.time-picker-popup .time-col {
  width: 54px;
  align-items: stretch;
}

.time-picker-popup .time-col:first-child {
  width: 60px;
}

.time-picker-popup .time-cell {
  width: 100%;
  min-height: 40px;
  font-size: 15px;
  border-radius: 16px;
}

.time-picker-popup .time-cell.selected {
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(129,140,248,0.28), 0 6px 14px rgba(129,140,248,0.12);
}

.time-picker-popup .tp-colon {
  font-size: 22px;
  font-weight: 700;
  padding-bottom: 0;
}

.time-picker-footer {
  margin-top: 2px;
}

.time-picker-apply {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.time-picker-apply:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(129,140,248,0.2);
  transform: translateY(-1px);
}

[data-theme="light"] .time-picker-apply {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.07);
}

[data-theme="light"] .time-picker-apply:hover {
  background: rgba(15,23,42,0.08);
  border-color: rgba(129,140,248,0.16);
}

.service-editor-payment {
  gap: 8px;
}

.service-editor-popover .payment-card-box {
  min-height: 58px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(10,9,14,0.52);
  border-color: rgba(255,255,255,0.07);
}

[data-theme="light"] .service-editor-popover .payment-card-box {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.08);
}

.payment-card-brand {
  flex: 0 0 auto;
  width: 86px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow:
    0 10px 20px rgba(15,23,42,0.10),
    inset 0 1px 0 rgba(255,255,255,0.88);
}

.payment-card-brand-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.payment-card-brand--placeholder {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
  color: rgba(225,228,238,0.76);
  box-shadow: none;
}

.payment-card-brand--placeholder svg {
  width: 20px;
  height: 20px;
}

.payment-card-brand--compact {
  width: 74px;
  height: 36px;
  padding: 6px 10px;
  border-radius: 12px;
  box-shadow: none;
}

[data-theme="light"] .payment-card-brand {
  background: #ffffff;
  border-color: rgba(15,23,42,0.08);
  box-shadow:
    0 10px 18px rgba(15,23,42,0.08),
    inset 0 1px 0 rgba(255,255,255,0.92);
}

[data-theme="light"] .payment-card-brand--placeholder {
  background: rgba(15,23,42,0.04);
  color: rgba(48,56,69,0.52);
}

.service-editor-popover .card-details {
  min-width: 0;
  justify-content: center;
  gap: 2px;
}

.service-editor-popover .card-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-editor-popover .card-name.is-empty {
  color: var(--text-muted);
}

.service-editor-date-stack {
  gap: 16px;
}

.service-editor-popover .date-section {
  align-items: stretch;
  gap: 8px;
  margin-bottom: 0;
}

.service-editor-popover .date-section label {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: rgba(225,228,238,0.72);
}

[data-theme="light"] .service-editor-popover .date-section label {
  color: #60697a;
}

.service-editor-popover .date-trigger {
  min-height: 56px;
  padding: 0 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

[data-theme="light"] .service-editor-popover .date-trigger {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.service-editor-popover .date-trigger-copy {
  font-size: 15px;
  font-weight: 600;
  color: rgba(225,228,238,0.38);
}

[data-theme="light"] .service-editor-popover .date-trigger-copy {
  color: rgba(48,56,69,0.34);
}

.service-editor-popover .date-trigger.has-value .date-trigger-copy {
  color: var(--text-main);
}

.service-editor-popover .date-trigger-icon {
  color: rgba(225,228,238,0.64);
}

[data-theme="light"] .service-editor-popover .date-trigger-icon {
  color: rgba(48,56,69,0.52);
}

.service-editor-popover .date-trigger:disabled,
.service-editor-popover .time-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.service-editor-popover .popover-footer {
  margin-top: 2px;
}

.service-editor-save {
  width: 100%;
  min-height: 46px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.service-popover-backdrop {
  background: rgba(2, 6, 23, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.service-editor-popover {
  overflow: hidden;
  overscroll-behavior: none;
  padding: 14px;
  border-radius: 28px;
}

.service-editor-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
}

.service-editor-aside,
.service-editor-main {
  min-width: 0;
  min-height: 0;
}

.service-editor-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 2px;
}

.service-editor-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.service-editor-main--centered {
  grid-template-rows: auto auto;
  align-content: center;
}

.service-editor-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.service-editor-top-grid--centered {
  width: min(100%, 920px);
  margin: 0 auto;
}

.service-editor-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.service-editor-workspace--resting {
  grid-template-rows: auto;
  align-content: center;
  justify-items: center;
}

.service-editor-workspace--resting .service-editor-field-strip {
  width: min(100%, 760px);
  margin: 0 auto;
}

.service-editor-field-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.service-editor-hero {
  align-items: flex-start;
  gap: 14px;
  margin-top: 0;
  padding: 0 4px;
}

.service-editor-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.service-editor-service-name {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.service-editor-account {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.service-editor-popover .service-logo-large {
  width: 64px;
  height: 64px;
  border-radius: 20px;
}

.service-editor-popover .service-logo-large .service-mark,
.service-editor-popover .service-logo-large .service-mark svg {
  width: 34px;
  height: 34px;
}

.service-editor-statuses--stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(7, 7, 10, 0.72);
  border: 1px solid rgba(255,255,255,0.06);
}

.service-editor-statuses--stack .status-btn {
  min-height: 52px;
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 13px;
  letter-spacing: -0.02em;
}

.service-editor-statuses--stack .status-btn-icon,
.service-editor-statuses--stack .status-btn svg {
  width: 18px;
  height: 18px;
}

.service-editor-aside-note {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 13px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.service-editor-aside-note strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.service-editor-aside-note p {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.service-editor-aside-footer {
  margin-top: auto;
}

.service-dashboard-card,
.service-field-card,
.service-editor-stage-card {
  background: rgba(10, 9, 14, 0.58);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.service-dashboard-card {
  min-height: 102px;
  padding: 13px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.service-dashboard-card--payment {
  justify-content: space-between;
}

.payment-card-trigger {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.payment-card-trigger:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(129,140,248,0.22);
  background: rgba(255,255,255,0.06);
}

.payment-card-trigger.is-active {
  border-color: rgba(129,140,248,0.32);
  background: rgba(99,102,241,0.12);
  box-shadow: 0 0 0 1px rgba(129,140,248,0.16) inset;
}

.payment-card-trigger:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.service-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.service-inline-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.service-inline-trigger:hover:not(:disabled),
.service-field-card:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(129,140,248,0.22);
  background: rgba(255,255,255,0.06);
}

.payment-card-trigger:focus-visible,
.service-payment-select:focus-visible,
.service-payment-input:focus-visible {
  outline: none;
  border-color: rgba(129,140,248,0.32);
  box-shadow: 0 0 0 3px rgba(129,140,248,0.14);
}

.service-inline-trigger.is-active,
.service-field-card.is-active {
  border-color: rgba(129,140,248,0.32);
  background: rgba(99,102,241,0.12);
  box-shadow: 0 0 0 1px rgba(129,140,248,0.16) inset;
}

.service-inline-trigger:disabled,
.service-field-card:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.service-inline-trigger-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  text-align: left;
}

.service-inline-trigger-label,
.service-editor-stage-preview-item span,
.service-summary-item span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.service-inline-trigger-copy strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.service-inline-trigger-icon {
  color: rgba(225,228,238,0.72);
}

.service-summary-status {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-main);
}

.service-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: auto;
}

.service-summary-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
}

.service-summary-item strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.service-field-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  min-height: 68px;
  padding: 12px 14px;
  border-radius: 18px;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.service-field-card-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.service-field-card-header,
.service-editor-stage-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.service-field-card-header {
  width: 100%;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.service-field-card-header span:last-child {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-field-card-header svg,
.service-editor-stage-title-icon svg {
  width: 18px;
  height: 18px;
  flex: none;
  display: block;
}

.service-field-card-value {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.service-field-card-value.is-empty,
.service-field-card-hint {
  color: var(--text-muted);
}

.service-field-card-hint {
  font-size: 12px;
  line-height: 1.45;
}

.service-editor-stage-card {
  min-height: 0;
  padding: 16px;
  border-radius: 22px;
  display: flex;
  min-width: 0;
  overflow: hidden;
}

.service-editor-stage-card.is-open {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(129,140,248,0.1);
}

.service-editor-stage-card.is-payment-stage,
.service-editor-stage-card.is-payment-stage .service-editor-stage-panel,
.service-editor-stage-card.is-payment-stage .service-editor-stage-body--payment {
  overflow: visible;
}

.service-editor-stage-panel,
.service-editor-stage-placeholder {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  flex: 1;
  height: 100%;
  min-height: 0;
}

.service-editor-stage-placeholder {
  grid-template-rows: 1fr;
  align-content: center;
  justify-items: start;
}

.service-editor-stage-copy {
  max-width: 500px;
}

.service-editor-stage-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 440px;
}

.service-editor-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.service-editor-stage-header--date {
  align-items: flex-start;
}

.service-editor-stage-header-tools {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
}

.service-editor-stage-title {
  min-width: 0;
}

.service-editor-stage-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: rgba(129,140,248,0.9);
}

.service-editor-stage-title strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.service-editor-stage-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(129,140,248,0.78);
}

.service-editor-stage-close {
  width: 36px;
  height: 36px;
  border-radius: 14px;
}

.service-editor-stage-body {
  flex: 1;
  min-height: 0;
}

.service-editor-stage-body--date {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 6px;
  min-height: 0;
  overflow: hidden;
  align-content: start;
}

.service-editor-stage-body--time {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.service-editor-stage-body--payment {
  display: block;
  min-height: 0;
  overflow: visible;
  padding-bottom: 4px;
}

.service-editor-stage-card .date-picker-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.service-editor-stage-card .date-picker-month-pill {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
  text-align: center;
}

.service-inline-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  margin-bottom: 0;
  padding: 0;
}

.service-inline-weekdays span {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.service-inline-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 2px;
  min-height: 0;
  height: 100%;
  align-content: stretch;
}

.service-inline-days .sp-cell {
  min-height: 0;
  height: 100%;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
  transform: none;
}

.service-inline-days .sp-cell.today {
  border-color: rgba(129,140,248,0.26);
}

.service-inline-days .sp-cell.selected {
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 6px 18px rgba(129,140,248,0.22);
}

.service-inline-days .sp-cell:hover {
  transform: none;
}

.service-inline-time-body {
  display: grid;
  grid-template-columns: minmax(112px, 0.85fr) repeat(2, minmax(0, 1fr));
  align-items: stretch;
  justify-content: stretch;
  height: 100%;
  min-height: 0;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  overflow: hidden;
}

.service-inline-time-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.service-time-preview-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 0;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.service-time-preview-card strong {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-main);
}

.service-time-preview-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.service-inline-edit-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.service-inline-edit-field--header {
  flex: 0 1 280px;
  margin-top: 0;
  gap: 6px;
}

.service-inline-edit-field--date {
  margin-bottom: 8px;
}

.service-inline-edit-field > span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.service-inline-edit-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-main);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.service-inline-edit-input--header {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 13px;
}

.service-inline-edit-input:focus {
  border-color: rgba(129,140,248,0.44);
  box-shadow: 0 0 0 3px rgba(129,140,248,0.14);
}

.service-payment-panel-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 1.16fr);
  align-items: start;
  gap: 14px;
  min-height: 0;
}

.service-payment-preview-card {
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  gap: 14px;
  min-height: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.service-payment-preview-shell {
  display: grid;
  grid-template-columns: minmax(118px, 132px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 100%;
}

.payment-card-brand--stage {
  width: 124px;
  height: 60px;
  padding: 10px 16px;
  border-radius: 18px;
}

.service-payment-preview-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  min-width: 0;
}

.service-payment-preview-copy strong {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.service-payment-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.service-payment-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.service-payment-select,
.service-payment-input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  color: var(--text-main);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.service-payment-select {
  min-height: 56px;
}

.service-payment-select:focus-visible,
.service-payment-input:focus {
  border-color: rgba(129,140,248,0.44);
  box-shadow: 0 0 0 3px rgba(129,140,248,0.14);
}

.service-payment-input::placeholder {
  color: rgba(225,228,238,0.34);
  font-weight: 500;
}

.service-payment-input:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.payment-provider-select .custom-select-value {
  display: flex;
  align-items: center;
}

.payment-provider-select-content {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.payment-provider-select-content--placeholder .payment-provider-select-text {
  color: var(--text-muted);
}

.payment-provider-select-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 600;
}

.payment-provider-select-menu {
  top: calc(100% + 8px);
  max-height: min(336px, 56vh);
}

.payment-provider-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 12px;
}

.service-time-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  gap: 10px;
}

.service-time-column-label {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.service-inline-time-body .time-col {
  width: auto;
  flex: 1;
  height: 100%;
  min-width: 0;
  min-height: 0;
  gap: 6px;
  overflow-y: auto;
  padding-right: 0;
  align-items: stretch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.service-inline-time-body .service-time-column--meridiem .time-col {
  overflow-y: auto;
}

.service-inline-time-body .time-cell {
  width: 100%;
  min-height: 46px;
  border-radius: 16px;
}

.service-inline-time-body .time-cell.selected {
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 4px 14px rgba(129,140,248,0.18);
}

.service-inline-time-body .time-col::-webkit-scrollbar {
  display: none;
}

.service-inline-time-body .tp-colon {
  font-size: 24px;
  font-weight: 700;
  padding-bottom: 0;
}

.service-editor-stage-footer {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.service-editor-stage-footer--single {
  grid-template-columns: 1fr;
}

.service-editor-stage-footer--payment {
  grid-template-columns: auto minmax(0, 1fr);
}

.service-stage-secondary {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.service-stage-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(129,140,248,0.16);
  transform: translateY(-1px);
}

.service-stage-apply {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
}

.service-editor-top-grid .payment-card-box {
  flex: 1;
  min-height: 84px;
}

.payment-card-cta {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #9aa3ff;
}

[data-theme="light"] .service-editor-stage-footer {
  border-top-color: rgba(15,23,42,0.08);
}

[data-theme="light"] .service-editor-popover,
[data-theme="light"] .service-dashboard-card,
[data-theme="light"] .service-field-card,
[data-theme="light"] .service-editor-stage-card,
[data-theme="light"] .service-editor-aside-note,
[data-theme="light"] .service-editor-statuses--stack,
[data-theme="light"] .service-time-preview-card,
[data-theme="light"] .service-summary-item,
[data-theme="light"] .service-editor-stage-preview-item {
  border-color: rgba(15,23,42,0.08);
}

[data-theme="light"] .service-popover-backdrop {
  background: rgba(241,245,249,0.34);
}

[data-theme="light"] .service-dashboard-card,
[data-theme="light"] .service-field-card,
[data-theme="light"] .service-editor-stage-card,
[data-theme="light"] .service-editor-aside-note,
[data-theme="light"] .service-time-preview-card,
[data-theme="light"] .service-summary-item,
[data-theme="light"] .service-editor-stage-preview-item {
  background: rgba(255,255,255,0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

[data-theme="light"] .service-editor-statuses--stack {
  background: rgba(15,23,42,0.04);
}

[data-theme="light"] .service-inline-trigger,
[data-theme="light"] .service-summary-item,
[data-theme="light"] .service-stage-secondary {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.07);
}

[data-theme="light"] .service-inline-trigger:hover:not(:disabled),
[data-theme="light"] .service-field-card:hover:not(:disabled),
[data-theme="light"] .service-stage-secondary:hover {
  background: rgba(15,23,42,0.07);
}

[data-theme="light"] .payment-card-trigger:hover:not(:disabled),
[data-theme="light"] .payment-provider-option:hover {
  background: rgba(15,23,42,0.07);
}

[data-theme="light"] .service-inline-trigger.is-active,
[data-theme="light"] .service-field-card.is-active {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.18);
}

[data-theme="light"] .payment-card-trigger.is-active,
[data-theme="light"] .payment-provider-option.active {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.18);
}

[data-theme="light"] .service-inline-trigger-icon {
  color: rgba(48,56,69,0.64);
}

[data-theme="light"] .service-payment-preview-card,
[data-theme="light"] .service-payment-footnote {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.07);
}

[data-theme="light"] .service-payment-select,
[data-theme="light"] .service-payment-input {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.07);
}

[data-theme="light"] .service-payment-input::placeholder {
  color: rgba(48,56,69,0.34);
}

@media (max-width: 1280px) {
  .service-editor-popover {
    overflow: auto;
  }

  .service-editor-shell {
    grid-template-columns: 1fr;
  }

  .service-editor-top-grid,
  .service-editor-field-strip {
    grid-template-columns: 1fr;
  }

  .service-inline-time-layout {
    grid-template-columns: 1fr;
  }

  .service-payment-panel-layout {
    grid-template-columns: 1fr;
  }

  .service-inline-time-body {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-editor-stage-header--date {
    flex-wrap: wrap;
  }

  .service-editor-stage-header-tools {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .service-inline-edit-field--header {
    flex: 1 1 240px;
  }

  .service-editor-aside-footer {
    margin-top: 0;
  }
}

@media (max-width: 900px) {
  .usage-split-grid {
    grid-template-columns: 1fr;
  }

  .usage-split-panel + .usage-split-panel {
    padding-left: 0;
    padding-top: 12px;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  [data-theme="light"] .usage-split-panel + .usage-split-panel {
    border-top-color: rgba(15,23,42,0.08);
  }
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(18px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(15,23,42,0.88);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10020;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.filter-row--matrix .search-wrap {
  flex: 0 1 430px;
  width: 430px;
  max-width: 430px;
  min-width: 320px;
  height: 58px;
  padding: 0 18px;
  gap: 12px;
  border-radius: 18px;
}

.matrix-filters-panel {
  padding-inline: 18px;
}

.action-bar .input-icon,
.filter-row--matrix .nav-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  line-height: 18px;
}

.filter-row--matrix .search-wrap input {
  font-size: 15px;
}

.filter-row--matrix .pills {
  flex: 0 0 auto;
  margin-left: auto;
  flex-wrap: nowrap;
}

.matrix-drop-slot {
  display: table-row;
  background: rgba(129,140,248,0.12);
  outline: 1px dashed rgba(129,140,248,0.38);
}

.is-floating-drag {
  box-shadow: 0 20px 50px rgba(0,0,0,0.38);
}

.action-bar .row-content {
  width: 100%;
}

.add-account-form {
  flex-wrap: wrap;
  gap: 12px;
}

.add-account-form .input-wrap {
  flex: 1 1 420px;
  max-width: none;
}

.action-bar-inline-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.glow-btn--add-account {
  margin-left: 0;
}

.bento-grid--matrix-stack {
  grid-template-columns: 1fr;
  grid-auto-rows: max-content;
  align-content: start;
  flex: 0 0 auto;
}

.matrix-inspector-top-panel {
  min-height: 232px;
}

.matrix-inspector-top-panel > .content-z {
  height: auto;
}

.main-wrapper,
.matrix-scroll {
  overflow-anchor: none;
}

.matrix-panel-row {
  grid-column: 1 / -1;
}

.matrix-inspector-top-panel,
.matrix-filters-panel--wide,
.matrix-board-panel--wide {
  grid-column: auto;
  grid-row: auto;
}

.actions--matrix {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.matrix-header-stats {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  width: max-content;
}

.matrix-summary-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
}

.matrix-summary-chip-icon {
  display: inline-flex;
  color: var(--text-muted);
}

.matrix-summary-chip-icon svg {
  width: 16px;
  height: 16px;
}

.matrix-summary-chip-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}

.matrix-summary-chip-copy em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.matrix-summary-chip-copy strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.matrix-summary-chip[data-tone="green"] {
  border-color: rgba(52,211,153,0.22);
}

.matrix-summary-chip[data-tone="orange"] {
  border-color: rgba(251,191,36,0.22);
}

.matrix-summary-chip[data-tone="pink"] {
  border-color: rgba(244,63,94,0.22);
}

.inspector-strip-main {
  grid-template-columns: minmax(220px, 0.95fr) minmax(320px, 1.1fr) minmax(0, 2fr);
  align-items: start;
}

.matrix-inspector-top-panel .inspector-services-section--matrix-strip .inspector-service-list {
  flex-direction: column;
  gap: 10px;
  flex-wrap: nowrap;
  max-height: 200px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.inspector-services-section--matrix-strip .inspector-service-list > * {
  flex-shrink: 0;
}

.service-detail-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  color: var(--text-main);
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.service-detail-row:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(129,140,248,0.24);
  background: rgba(129,140,248,0.08);
}

.service-detail-row.is-open {
  border-color: rgba(129,140,248,0.34);
  background: rgba(99,102,241,0.12);
}

.service-detail-row:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.service-detail-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.service-detail-platform {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 170px;
}

.service-detail-platform .service-mark {
  flex: 0 0 auto;
}

.service-detail-platform strong {
  font-size: 14px;
  font-weight: 700;
}

.service-detail-platform-emoji {
  font-size: 18px;
  line-height: 1;
}

.service-detail-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.05);
}

.service-detail-meta small {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.service-detail-meta strong {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.service-detail-meta--payment {
  min-width: 0;
}

.service-detail-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.service-detail-card strong {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-detail-usage {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.service-detail-usage-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid rgba(129,140,248,0.16);
  background: rgba(129,140,248,0.08);
}

.service-detail-usage-chip em {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.service-detail-usage-chip strong {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.service-detail-usage-chip[data-level="low"] {
  border-color: rgba(244,63,94,0.24);
  background: rgba(244,63,94,0.1);
  color: #ff96ab;
}

.service-detail-usage-chip[data-level="medium"] {
  border-color: rgba(251,191,36,0.22);
  background: rgba(251,191,36,0.12);
}

.panel-empty--compact {
  min-height: 0;
  padding: 16px;
}

.ops-surface-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.ops-surface-copy {
  max-width: 560px;
}

.ops-surface-copy h3 {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.ops-surface-copy p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.ops-kpi-grid,
.my-account-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: min(720px, 100%);
}

.ops-kpi-card {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.ops-kpi-card span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.ops-kpi-card strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  letter-spacing: -0.04em;
  color: var(--text-main);
}

.ops-kpi-card p {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.ops-kpi-card[data-tone="red"] strong {
  color: #ff96ab;
}

.ops-kpi-card[data-tone="amber"] strong {
  color: #ffca67;
}

.ops-kpi-card[data-tone="green"] strong {
  color: #5ee5b2;
}

.ops-kpi-card[data-tone="pink"] strong,
.ops-kpi-card[data-tone="blue"] strong,
.ops-kpi-card[data-tone="safe"] strong,
.ops-kpi-card[data-tone="warning"] strong {
  color: #aeb6ff;
}

.activity-timeline-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-timeline-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.activity-timeline-card.severity-critical {
  border-color: rgba(244,63,94,0.26);
}

.activity-timeline-card.severity-warning {
  border-color: rgba(251,191,36,0.22);
}

.activity-timeline-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.activity-timeline-badge,
.issue-deck-emoji {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
}

.activity-impact-meter {
  display: flex;
  gap: 4px;
}

.activity-impact-meter span {
  width: 12px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  opacity: 0.24;
}

.activity-impact-meter span.is-on {
  opacity: 1;
}

.activity-impact-meter[data-severity="critical"] span.is-on {
  background: #ff6b88;
}

.activity-impact-meter[data-severity="warning"] span.is-on {
  background: #ffca67;
}

.activity-impact-meter[data-severity="info"] span.is-on {
  background: #8f9bff;
}

.activity-timeline-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.activity-timeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.activity-timeline-copy strong {
  font-size: 16px;
  line-height: 1.35;
}

.activity-timeline-copy p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.activity-timeline-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.activity-timeline-time {
  font-size: 12px;
  color: var(--text-dim);
}

.activity-timeline-eyebrow,
.issue-deck-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.activity-category-pill,
.activity-meta-chip,
.activity-platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.activity-platform-pill .service-mark {
  flex: 0 0 auto;
}

.activity-platform-pill em {
  font-style: normal;
  color: var(--text-main);
}

.activity-platform-pill strong {
  font-size: 14px;
}

.activity-chip-row,
.issue-deck-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-meta-chip--account {
  color: var(--text-main);
}

.activity-timeline-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.activity-timeline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.severity-badge--with-emoji {
  gap: 6px;
}

.review-side-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-focus-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.03);
}

.review-focus-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.review-focus-card strong {
  font-size: 17px;
  letter-spacing: -0.03em;
}

.review-focus-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.review-focus-card small {
  color: var(--text-dim);
}

.review-focus-account-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-focus-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 12px;
}

.review-focus-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.04);
  text-align: left;
}

.review-focus-account-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.review-focus-account-main span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.review-focus-account small {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-focus-account em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-dim);
}

.issue-deck-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.issue-deck-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.issue-deck-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.issue-deck-card.severity-critical {
  border-color: rgba(244,63,94,0.28);
}

.issue-deck-card.severity-warning {
  border-color: rgba(251,191,36,0.22);
}

.issue-deck-card--manual {
  box-shadow: inset 0 0 0 1px rgba(129,140,248,0.08);
}

.issue-deck-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.issue-deck-copy {
  flex: 1;
  min-width: 0;
}

.issue-deck-copy strong {
  font-size: 16px;
  line-height: 1.35;
}

.issue-deck-detail {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.issue-deck-fix {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(129,140,248,0.18);
  background: rgba(129,140,248,0.08);
}

.issue-deck-fix svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.issues-compose-card--enhanced {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.issues-compose-card--enhanced .issues-compose-grid {
  flex: 1;
}

.issue-compose-shell {
  z-index: 8;
}

.issues-compose-card--enhanced .custom-select-wrapper {
  z-index: 4;
}

.issues-compose-card--enhanced .custom-select-wrapper.is-open {
  z-index: 12;
}

.issues-compose-card--enhanced .custom-select-btn {
  min-height: 46px;
}

.issues-compose-card--enhanced .custom-select-value,
.issues-compose-card--enhanced .cs-item {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.issues-compose-card--enhanced .custom-select-value {
  color: var(--text-main);
}

.issues-compose-card--enhanced .custom-select-menu {
  z-index: 420;
}

.my-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.my-account-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.my-account-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.my-account-card-identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.my-account-card-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.my-account-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.my-account-card-copy strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.my-account-card-copy p {
  color: var(--text-muted);
  font-size: 13px;
}

.my-account-card-subline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.my-account-card-subline p {
  min-width: 0;
}

.my-account-card-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-state-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.04);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.account-state-pill--active {
  color: #88d7ff;
}

.account-state-pill--paused {
  color: #ffca67;
}

.account-state-pill--archived {
  color: #d5dbe6;
}

.account-state-pill--locked {
  color: #ff96ab;
  border-color: rgba(244,63,94,0.22);
}

.account-state-pill--open {
  color: #aeb6ff;
}

.my-account-tag-row {
  margin-left: 0;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  justify-content: flex-start;
}

.my-account-tag-row .tag {
  width: fit-content;
  min-height: 0;
}

.my-account-card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.my-account-meta-card,
.my-account-note-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
}

.my-account-meta-card {
  background: rgba(255,255,255,0.03);
}

.my-account-meta-card span,
.my-account-note-card span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.my-account-meta-card strong {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main);
}

.my-account-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.my-account-note-card {
  background: rgba(0,0,0,0.16);
}

.my-account-note-card p {
  margin-top: 8px;
  color: var(--text-muted);
  line-height: 1.6;
}

.my-account-service-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.my-account-service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.my-account-service-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

[data-theme="light"] .matrix-summary-chip,
[data-theme="light"] .service-detail-row,
[data-theme="light"] .ops-kpi-card,
[data-theme="light"] .activity-timeline-card,
[data-theme="light"] .review-focus-card,
[data-theme="light"] .review-focus-account,
[data-theme="light"] .issue-deck-card,
[data-theme="light"] .my-account-card,
[data-theme="light"] .my-account-meta-card {
  background: rgba(255,255,255,0.72);
  border-color: rgba(15,23,42,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
}

[data-theme="light"] .activity-category-pill,
[data-theme="light"] .activity-meta-chip,
[data-theme="light"] .activity-platform-pill,
[data-theme="light"] .service-detail-meta,
[data-theme="light"] .my-account-note-card,
[data-theme="light"] .account-state-pill {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.07);
  color: #5b6476;
}

[data-theme="light"] .activity-timeline-badge,
[data-theme="light"] .issue-deck-emoji {
  background: rgba(15,23,42,0.05);
  border-color: rgba(15,23,42,0.06);
}

[data-theme="light"] .service-detail-usage-chip {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.14);
}

[data-theme="light"] .issue-deck-fix {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.18);
}

@media (max-width: 1180px) {
  .app-layout {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    width: 100%;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-grid--matrix-panel-swap {
    grid-template-columns: 1fr;
  }

  .col-span-2,
  .col-span-3,
  .row-span-2 {
    grid-column: auto;
    grid-row: auto;
  }

  .matrix-summary-stack,
  .matrix-inspector-top-panel,
  .matrix-filters-panel--wide,
  .matrix-board-panel--wide {
    grid-column: auto;
    grid-row: auto;
  }

  .matrix-summary-stack {
    grid-template-rows: none;
  }

  .inspector-strip-main,
  .template-stack--matrix-strip {
    grid-template-columns: 1fr;
  }

  .inspector-actions-grid--matrix-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inspector-services-section--matrix-strip .inspector-service-list {
    flex-direction: column;
    overflow: visible;
  }

  .ops-surface-hero,
  .action-bar-inline-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .issue-deck-grid,
  .my-account-grid,
  .my-account-card-meta,
  .my-account-note-grid {
    grid-template-columns: 1fr;
  }

  .ops-kpi-grid,
  .my-account-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .actions--matrix {
    justify-content: flex-start;
  }

  .matrix-header-stats {
    width: max-content;
  }

  .service-detail-row {
    align-items: flex-start;
  }

  .service-detail-row-main {
    flex-direction: column;
    align-items: stretch;
  }

  .service-detail-usage {
    margin-left: 0;
  }

  .inspector-services-section--matrix-strip .inspector-service-card {
    flex-basis: auto;
  }

  .heatmap-grid,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .issues-compose-grid {
    grid-template-columns: 1fr 1fr;
  }

  .review-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  .top-nav,
  .nav-left,
  .row-content,
  .add-account-form,
  .action-bar-side,
  .filter-row,
  .inspector-actions-grid,
  .inspector-footer,
  .inspector-account-nav,
  .inspector-strip-main,
  .sync-banner-card,
  .sync-banner-actions,
  .queue-card,
  .review-target-head,
  .review-log-head,
  .upcoming-item,
  .issues-compose-head,
  .issue-head,
  .issue-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .matrix-header-stats,
  .ops-surface-hero,
  .activity-timeline-head,
  .activity-timeline-foot,
  .my-account-card-head,
  .my-account-card-title-row,
  .review-focus-account,
  .issue-deck-head,
  .service-detail-row {
    flex-direction: column;
    align-items: stretch;
  }

  .activity-timeline-card {
    grid-template-columns: 1fr;
  }

  .activity-timeline-rail {
    flex-direction: row;
    justify-content: space-between;
  }

  .ops-kpi-grid,
  .my-account-stat-strip,
  .my-account-card-meta,
  .my-account-note-grid {
    grid-template-columns: 1fr;
  }

  .service-detail-platform,
  .service-detail-card strong {
    min-width: 0;
    max-width: none;
  }

  .table-scroll {
    overflow-x: auto;
  }

  .inspector-hero {
    grid-template-columns: 1fr;
  }

  .inspector-service-card-header {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .inspector-actions-grid {
    width: 100%;
  }

  .inspector-actions-grid--matrix-strip {
    grid-template-columns: 1fr;
  }

  .template-stack--matrix-strip .template-suggestion {
    flex-direction: column;
    align-items: stretch;
  }

  .review-overview-grid {
    grid-template-columns: 1fr;
  }

  .pills {
    flex-wrap: wrap;
  }

  .filter-row--matrix {
    flex-wrap: wrap;
  }

  .filter-row--matrix .search-wrap {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .filter-row--matrix .pills {
    margin-left: 0;
  }

  .issues-compose-grid {
    grid-template-columns: 1fr;
  }
}

html[data-layout-surface-mode="scaled-desktop"] .app-layout {
  flex-direction: row;
  gap: 24px;
  padding: 16px;
}

html[data-layout-surface-mode="scaled-desktop"] .sidebar {
  width: 280px;
}

html[data-layout-surface-mode="scaled-desktop"] .main-wrapper {
  gap: 20px;
  padding-right: 8px;
}

/* Android uses a desktop-sized canvas even when the physical viewport is narrow. */
html[data-layout-surface-mode="scaled-desktop"] :is(
  .top-nav, .nav-left, .action-bar .row-content, .add-account-form,
  .action-bar-inline-tools, .filter-row--matrix, .matrix-header-stats
) {
  flex-direction: row;
  align-items: center;
}

html[data-layout-surface-mode="scaled-desktop"] .matrix-header-stats {
  width: auto;
}

html[data-layout-surface-mode="scaled-desktop"] .actions--matrix {
  justify-content: flex-end;
}

html[data-layout-surface-mode="scaled-desktop"] .bento-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

html[data-layout-surface-mode="scaled-desktop"] .bento-grid--matrix-stack {
  grid-template-columns: 1fr;
}

html[data-layout-surface-mode="scaled-desktop"] .matrix-panel-row {
  grid-column: 1 / -1;
}

html[data-layout-surface-mode="scaled-desktop"] .matrix-inspector-top-panel,
html[data-layout-surface-mode="scaled-desktop"] .matrix-filters-panel--wide,
html[data-layout-surface-mode="scaled-desktop"] .matrix-board-panel--wide {
  grid-column: auto;
  grid-row: auto;
}

html[data-layout-surface-mode="scaled-desktop"] .bento-grid--matrix-panel-swap {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(240px, 0.92fr);
}

html[data-layout-surface-mode="scaled-desktop"] .col-span-2 {
  grid-column: span 2;
}

html[data-layout-surface-mode="scaled-desktop"] .col-span-3 {
  grid-column: span 3;
}

html[data-layout-surface-mode="scaled-desktop"] .row-span-2 {
  grid-row: span 2;
}

html[data-layout-surface-mode="scaled-desktop"] .heatmap-grid,
html[data-layout-surface-mode="scaled-desktop"] .template-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-layout-surface-mode="scaled-desktop"] .issues-compose-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

html[data-layout-surface-mode="scaled-desktop"] .pills {
  flex-wrap: nowrap;
}

html[data-layout-surface-mode="scaled-desktop"] .filter-row--matrix {
  flex-wrap: nowrap;
  gap: 18px;
}

html[data-layout-surface-mode="scaled-desktop"] .filter-row--matrix .search-wrap {
  width: 430px;
  max-width: 430px;
  min-width: 320px;
}

html[data-layout-surface-mode="scaled-desktop"] .filter-row--matrix .pills {
  margin-left: auto;
  overflow: visible;
}

html[data-layout-surface-mode="scaled-desktop"] .service-editor-popover {
  overflow: hidden;
}

html[data-layout-surface-mode="scaled-desktop"] .service-editor-shell {
  grid-template-columns: 268px minmax(0, 1fr);
}

html[data-layout-surface-mode="scaled-desktop"] .service-editor-top-grid,
html[data-layout-surface-mode="scaled-desktop"] .service-editor-field-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-layout-surface-mode="scaled-desktop"] .service-inline-time-layout {
  grid-template-columns: 210px minmax(0, 1fr);
}

html[data-layout-surface-mode="scaled-desktop"] .service-inline-time-body {
  grid-template-columns: minmax(112px, 0.85fr) repeat(2, minmax(0, 1fr));
}

html[data-layout-surface-mode="scaled-desktop"] .service-payment-panel-layout {
  grid-template-columns: minmax(300px, 1fr) minmax(0, 1.16fr);
}

.mobile-tab-bar,
#mobileSheetLayer {
  display: none;
}

.mobile-tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  padding: 10px 14px calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: linear-gradient(180deg, rgba(3, 3, 3, 0), rgba(3, 3, 3, 0.92) 24%, rgba(3, 3, 3, 0.98));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

[data-theme="light"] .mobile-tab-bar {
  background: linear-gradient(180deg, rgba(248, 249, 250, 0), rgba(248, 249, 250, 0.94) 24%, rgba(248, 249, 250, 0.98));
}

.mobile-tab-bar {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.mobile-tab-btn {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.mobile-tab-btn.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.mobile-tab-btn-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

#mobileSheetLayer {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.mobile-sheet-backdrop,
.mobile-sheet-panel {
  pointer-events: auto;
}

.mobile-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mobile-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: calc(100svh - 28px);
  border-radius: 28px 28px 0 0;
  background: rgba(11, 14, 23, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

[data-theme="light"] .mobile-sheet-panel {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.08);
}

.mobile-sheet-scroll {
  overflow: auto;
  max-height: calc(100svh - 28px);
  padding: 20px 18px calc(env(safe-area-inset-bottom, 0px) + 24px);
}

.phone-home-shell,
.phone-accounts-shell,
.phone-more-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 16px;
}

.phone-hero,
.phone-sync-card,
.phone-section,
.phone-account-card {
  position: relative;
  background: rgba(17, 20, 29, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 18px;
  overflow: hidden;
}

[data-theme="light"] .phone-hero,
[data-theme="light"] .phone-sync-card,
[data-theme="light"] .phone-section,
[data-theme="light"] .phone-account-card {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(15, 23, 42, 0.08);
}

.phone-hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(circle at top right, rgba(129, 140, 248, 0.2), transparent 36%),
    rgba(17, 20, 29, 0.86);
}

[data-theme="light"] .phone-hero {
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.14), transparent 36%),
    rgba(255, 255, 255, 0.94);
}

.phone-hero h2,
.phone-section-head h3 {
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.phone-hero p,
.phone-section-head p,
.phone-sync-card p,
.phone-account-copy p {
  color: var(--text-muted);
}

.phone-hero-actions,
.phone-sync-actions,
.phone-account-actions,
.phone-service-row-actions,
.phone-section-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.phone-section-head {
  align-items: flex-start;
}

.phone-section-eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.phone-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.phone-summary-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

[data-theme="light"] .phone-summary-card {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.06);
}

.phone-summary-card strong {
  font-size: 26px;
  line-height: 1;
}

.phone-summary-card--compact strong {
  font-size: 20px;
}

.phone-focus-list,
.phone-upcoming-list,
.phone-log-stack,
.phone-account-list,
.phone-service-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-focus-item,
.phone-upcoming-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

[data-theme="light"] .phone-focus-item,
[data-theme="light"] .phone-upcoming-item {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.06);
}

.phone-focus-item-main,
.phone-upcoming-copy,
.phone-account-identity,
.phone-service-row-main,
.phone-account-copy {
  display: flex;
  gap: 12px;
  align-items: center;
}

.phone-focus-item-main span,
.phone-upcoming-copy,
.phone-account-copy,
.phone-service-row-title span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.phone-focus-item small,
.phone-upcoming-copy small,
.phone-service-row-title small {
  color: var(--text-muted);
}

.phone-upcoming-date {
  min-width: 56px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.phone-filter-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.add-account-form--phone {
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.add-account-form--phone .input-wrap {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  height: 48px;
}

.add-account-form--phone .glow-btn--add-account {
  width: 100%;
  min-width: 0;
  height: 48px;
  margin-left: 0;
}

.search-wrap--phone {
  width: 100%;
}

.phone-filter-pills,
.phone-more-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.phone-more-nav-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 700;
}

.phone-more-nav-btn.active {
  color: var(--text-main);
  border-color: rgba(129, 140, 248, 0.32);
  background: rgba(129, 140, 248, 0.14);
}

.phone-account-card {
  gap: 16px;
  display: flex;
  flex-direction: column;
}

.phone-account-card.is-active {
  border-color: rgba(129, 140, 248, 0.32);
}

.phone-account-head,
.phone-account-title-row,
.phone-account-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.phone-account-head {
  flex-direction: column;
  align-items: stretch;
}

.phone-account-identity {
  width: 100%;
  min-width: 0;
}

.phone-account-title-row {
  width: 100%;
  align-items: flex-start;
}

.phone-account-title-row > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-account-badges {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.phone-account-copy {
  flex: 1;
  min-width: 0;
}

.phone-account-copy p {
  font-size: 13px;
}

.phone-account-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.phone-account-badge--warning {
  color: #fbbf24;
}

.phone-service-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .phone-service-row {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.06);
}

.phone-service-row-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phone-service-row-title strong {
  font-size: 15px;
}

.phone-service-state {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
}

.phone-service-toggle {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(129, 140, 248, 0.24);
  background: rgba(129, 140, 248, 0.12);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.phone-service-toggle svg,
.service-editor-open-link svg,
.mobile-tab-btn svg {
  width: 18px;
  height: 18px;
}

.phone-more-body > * {
  margin-top: 14px;
}

.phone-more-body .bento-grid {
  grid-template-columns: 1fr;
}

.phone-more-body .col-span-2,
.phone-more-body .col-span-3 {
  grid-column: auto;
}

.phone-sync-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.phone-sync-card[data-tone="critical"] {
  border-color: rgba(248, 113, 113, 0.28);
}

.phone-sync-card[data-tone="warning"] {
  border-color: rgba(251, 191, 36, 0.28);
}

.inspector-shell--sheet .inspector-layout-toggle {
  display: none;
}

html[data-layout-profile="phone"] .app-layout {
  display: block;
  height: auto;
  min-height: 100vh;
  padding: 0;
  gap: 0;
  max-width: none;
}

html[data-layout-profile="phone"] .sidebar {
  display: none;
}

html[data-layout-profile="phone"] .main-wrapper {
  gap: 14px;
  overflow-y: visible;
  padding: 0 16px calc(112px + env(safe-area-inset-bottom, 0px));
}

html[data-layout-profile="phone"] .top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 0 4px;
  background: linear-gradient(180deg, rgba(3, 3, 3, 0.92), rgba(3, 3, 3, 0.72), transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

html[data-layout-profile="phone"] body[data-theme="light"] .top-nav {
  background: linear-gradient(180deg, rgba(248, 249, 250, 0.96), rgba(248, 249, 250, 0.76), transparent);
}

html[data-layout-profile="phone"] .nav-left {
  gap: 12px;
}

html[data-layout-profile="phone"] .page-title {
  font-size: clamp(28px, 9vw, 36px);
  white-space: normal;
}

html[data-layout-profile="phone"] .action-bar,
html[data-layout-profile="phone"] #syncBanner {
  display: none;
}

html[data-layout-profile="phone"] .mobile-tab-bar,
html[data-layout-profile="phone"] #mobileSheetLayer {
  display: grid;
}

html[data-layout-profile="phone"] .view-stack {
  padding-bottom: 0;
}

html[data-layout-profile="phone"] .service-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

html[data-layout-profile="phone"] .service-filter-chip,
html[data-layout-profile="phone"] .pill {
  flex: 0 0 auto;
}

html[data-layout-profile="phone"] .service-editor-popover {
  top: auto !important;
  left: 0 !important;
  right: 0;
  bottom: 0;
  width: 100vw !important;
  height: min(92svh, 980px) !important;
  border-radius: 28px 28px 0 0;
}

html[data-layout-profile="phone"] .service-editor-shell {
  display: grid;
  grid-template-columns: 1fr;
  height: 100%;
}

html[data-layout-profile="phone"] .service-editor-aside,
html[data-layout-profile="phone"] .service-editor-main {
  min-height: 0;
}

html[data-layout-profile="phone"] .service-editor-aside {
  padding-bottom: 8px;
}

html[data-layout-profile="phone"] .service-editor-main {
  overflow: auto;
}

html[data-layout-profile="phone"] .service-editor-aside-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

html[data-layout-profile="phone"] .service-editor-open-link,
html[data-layout-profile="phone"] .service-editor-save {
  width: 100%;
  justify-content: center;
}

html[data-layout-profile="phone"] .service-payment-panel-layout,
html[data-layout-profile="phone"] .service-editor-top-grid,
html[data-layout-profile="phone"] .service-editor-stage-body--time .service-inline-time-layout,
html[data-layout-profile="phone"] .service-editor-field-strip {
  grid-template-columns: 1fr;
}

html[data-layout-profile="phone"] .date-picker-popup,
html[data-layout-profile="phone"] .time-picker-popup {
  top: auto !important;
  left: 12px !important;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  width: auto !important;
}

html[data-layout-profile="tablet"] .app-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  height: 100vh;
  min-height: 0;
}

html[data-layout-profile="tablet"] .sidebar {
  width: 248px;
}

html[data-layout-profile="tablet"] .main-wrapper {
  min-width: 0;
  padding-right: 0;
}

html[data-layout-profile="tablet"] .top-nav {
  gap: 12px;
}

html[data-layout-profile="tablet"] .bento-grid,
html[data-layout-profile="tablet"] .bento-grid--matrix-panel-swap {
  grid-template-columns: 1fr;
}

html[data-layout-surface-mode="scaled-desktop"] .service-editor-aside-footer {
  margin-top: auto;
}

/* Interaction motion: opacity/translation only, with a reduced-motion fallback. */
.view-panel.active { animation: none; }
.motion-exit-ghost {
  position: fixed; z-index: 10030; pointer-events: none; overflow: hidden;
  contain: layout paint; border-radius: 20px;
}
.motion-exit-ghost * { pointer-events: none !important; }
button, .pill, .nav-item, .sub-badge {
  transition-property: color, background-color, border-color, box-shadow, opacity, transform;
  transition-duration: 240ms;
  transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
}
button:not(:disabled):active { transform: translateY(1px); }
.custom-select-menu, .trendy-dropdown-menu {
  transition: opacity 260ms ease, transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.motion-exit-ghost--backdrop { z-index: 10029; border-radius: 0; }

/* Neutral charcoal surfaces for the dark theme. */
body:not([data-theme="light"]) .aurora::before,
body:not([data-theme="light"]) .aurora::after,
body:not([data-theme="light"]) .spotlight-wrapper::before,
body:not([data-theme="light"]) .glow-btn::before {
  content: none;
}

body:not([data-theme="light"]) .spotlight-wrapper {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

body:not([data-theme="light"]) :is(
  .scope-chip, .avatar-chip, .inspector-actions-grid .ghost-btn,
  .upcoming-item, .review-stat-card[data-tone], .service-detail-row,
  .ops-kpi-card, .activity-timeline-card, .issue-deck-card, .my-account-card,
  .service-dashboard-card, .service-field-card, .service-editor-stage-card,
  .service-editor-aside-note, .service-time-preview-card,
  .service-summary-item, .service-editor-stage-preview-item,
  .phone-hero, .phone-sync-card, .phone-section, .phone-account-card
) {
  background: var(--card-bg);
  border-color: var(--card-border);
}

body:not([data-theme="light"]) .upcoming-item:hover {
  background: var(--surface-raised);
}

body:not([data-theme="light"]) :is(
  .trendy-dropdown-menu, .custom-select-menu, .glass-popover,
  .stunning-picker, .service-editor-popover, .mobile-sheet-panel
) {
  background: var(--surface-raised);
  border-color: var(--card-border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body:not([data-theme="light"]) :is(
  .service-editor-statuses, .service-editor-statuses--stack,
  .service-editor-popover .usage-input, .service-editor-usage-reset .time-trigger,
  .service-editor-popover .payment-card-box, .service-payment-select,
  .service-payment-input, .service-editor-popover .service-logo-large
) {
  background: var(--surface-inset);
}

body:not([data-theme="light"]) :is(.logo-box, .sp-cell.selected) {
  background: var(--accent);
  box-shadow: none;
}

body:not([data-theme="light"]) .logo-box-mark {
  background: var(--text-main);
  box-shadow: none;
}

body:not([data-theme="light"]) .time-cell.selected {
  background: rgba(129,140,248,0.16);
  box-shadow: none;
}

body:not([data-theme="light"]) .h2-gradient {
  background: none;
  color: var(--text-main);
  -webkit-text-fill-color: currentColor;
}

body:not([data-theme="light"]) .page-title {
  text-shadow: none;
}

body:not([data-theme="light"]) .usage-bar-fill {
  background: var(--accent);
  box-shadow: none;
}

body:not([data-theme="light"]) .service-editor-popover .usage-bar-fill.low {
  background: #ff6b88;
}

body:not([data-theme="light"]) .service-editor-popover .usage-bar-fill.medium {
  background: #ffca67;
}

body:not([data-theme="light"]) .service-editor-popover .usage-bar-fill.high {
  background: #34d399;
}

body:not([data-theme="light"]) .mobile-tab-bar,
html[data-layout-profile="phone"] body:not([data-theme="light"]) .top-nav {
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Service editor: one aligned form, with a persistent header and footer. */
html .service-editor-dialog.service-editor-popover {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 20px;
  padding: 24px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
}

.service-editor-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.service-editor-dialog .service-editor-hero {
  flex-direction: row;
  align-items: center;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.service-editor-dialog .service-logo-large {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 14px;
  box-shadow: none;
}

.service-editor-dialog .service-editor-hero-copy {
  min-width: 0;
}

.service-editor-dialog .service-editor-account {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-editor-dialog-status {
  display: grid;
  gap: 10px;
}

.service-editor-dialog-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.service-editor-dialog .service-editor-statuses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--white-op);
}

.service-editor-dialog .status-btn {
  flex-direction: row;
  justify-content: center;
  min-height: 42px;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
}

html .service-editor-dialog .service-editor-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: auto;
  padding-right: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--card-border) transparent;
}

html .service-editor-dialog .service-editor-top-grid,
html .service-editor-dialog .service-editor-workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 0 0 auto;
  min-height: auto;
  width: 100%;
  margin: 0;
}

html body .service-editor-dialog .service-editor-main .service-dashboard-card {
  min-height: auto;
  padding: 0;
  gap: 10px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.service-editor-dialog .service-section-label {
  font-size: 13px;
  color: var(--text-muted);
  gap: 8px;
}

.service-editor-dialog .payment-card-box {
  min-height: 64px;
  padding: 12px 16px;
  gap: 12px;
  border-radius: 12px;
}

.service-editor-dialog .payment-card-brand {
  width: 42px;
  height: 32px;
  flex: 0 0 42px;
  border-radius: 8px;
}

.service-editor-dialog .card-name {
  font-size: 15px;
}

html .service-editor-dialog .service-editor-field-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 12px;
}

.service-editor-dialog .service-field-card {
  min-height: 88px;
  padding: 14px 16px;
  gap: 10px;
  border-radius: 12px;
}

.service-editor-dialog .service-field-card-header {
  font-size: 13px;
  color: var(--text-muted);
}

.service-editor-dialog .service-field-card-value {
  font-size: 16px;
}

.service-editor-dialog .service-field-card-hint:empty {
  display: none;
}

.service-editor-dialog .service-field-card:disabled,
.service-editor-dialog .payment-card-trigger:disabled {
  opacity: 0.72;
}

.service-editor-dialog-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.service-editor-dialog .service-editor-dialog-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--card-border);
}

.service-editor-dialog .service-editor-open-link,
.service-editor-dialog .service-editor-save {
  width: auto;
  min-height: 44px;
  border-radius: 10px;
  padding: 10px 20px;
  margin: 0;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.service-editor-dialog .service-editor-save {
  min-width: 176px;
}

.service-editor-dialog .service-editor-save::before {
  content: none;
}

.service-editor-dialog .service-editor-open-link svg {
  width: 16px;
  height: 16px;
}

.service-editor-dialog .service-editor-stage-card {
  flex: 0 0 auto;
  min-height: 380px;
  border-radius: 14px;
}

.service-editor-dialog .service-editor-main.is-editing .service-editor-top-grid,
.service-editor-dialog .service-editor-main.is-editing .service-editor-field-strip,
.service-editor-dialog .service-editor-main.is-editing .service-editor-dialog-hint {
  display: none;
}

.service-editor-dialog .service-editor-stage-header--date {
  flex-wrap: nowrap;
}

.service-editor-dialog .service-editor-stage-header-tools {
  width: auto;
  margin-left: auto;
}

.service-editor-dialog .service-inline-edit-field--header {
  flex: 0 1 240px;
}

html .service-editor-dialog .service-payment-panel-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 20px;
}

.service-editor-dialog .service-inline-days {
  height: auto;
  min-height: 210px;
  grid-template-rows: repeat(6, minmax(32px, 1fr));
  gap: 4px;
}

.service-editor-dialog .service-inline-days .sp-cell {
  min-height: 32px;
}

html[data-layout-profile="phone"] .service-editor-dialog.service-editor-popover {
  height: min(var(--service-dialog-height), calc(100svh - 16px)) !important;
  padding: 20px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  gap: 16px;
  border-radius: 20px 20px 0 0;
}

html[data-layout-profile="phone"] .service-editor-dialog .service-logo-large {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}

html[data-layout-profile="phone"] .service-editor-dialog .service-editor-service-name {
  font-size: 21px;
}

html[data-layout-profile="phone"] .service-editor-dialog .status-btn {
  padding: 8px 4px;
  gap: 5px;
  font-size: 12px;
}

html[data-layout-profile="phone"] .service-editor-dialog .service-editor-open-link,
html[data-layout-profile="phone"] .service-editor-dialog .service-editor-save {
  width: auto;
  min-width: 0;
  padding: 10px 16px;
  white-space: nowrap;
}

html[data-layout-profile="phone"] .service-editor-dialog .service-editor-save {
  flex: 1;
  min-width: 130px;
}

html[data-layout-profile="phone"] .service-editor-dialog .service-editor-open-link {
  flex: 0 1 auto;
}

html[data-layout-profile="phone"] .service-editor-dialog .service-editor-stage-header--date {
  flex-wrap: wrap;
}

html[data-layout-profile="phone"] .service-editor-dialog .service-editor-stage-header-tools {
  width: 100%;
  margin-left: 0;
}

html[data-layout-profile="phone"] .service-editor-dialog .service-payment-panel-layout {
  grid-template-columns: 1fr;
}

/* Preview wordmarks need their own size, independent of compact list badges. */
.service-editor-dialog .service-payment-preview-shell {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-height: auto;
}

.service-editor-dialog .service-payment-preview-card .payment-card-brand--stage {
  width: 100%;
  max-width: 100%;
  height: 96px;
  flex: none;
  padding: 18px 20px;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.service-editor-dialog .service-payment-preview-card .payment-card-brand--placeholder {
  background: var(--white-op);
}

.service-editor-dialog .service-payment-preview-card .payment-card-brand--placeholder svg {
  width: 32px;
  height: 32px;
}

.service-editor-dialog .service-payment-preview-copy strong {
  font-size: 20px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Bound the whole matrix workspace, with or without an Inspector selection. */
body.matrix-inspector-fixed .main-wrapper {
  min-height: 0;
  overflow: hidden;
}

body.matrix-inspector-fixed .main-wrapper > .top-nav,
body.matrix-inspector-fixed .main-wrapper > .action-bar,
body.matrix-inspector-fixed .main-wrapper > #syncBanner {
  flex-shrink: 0;
}

body.matrix-inspector-fixed .view-stack {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

body.matrix-inspector-fixed .bento-grid--matrix-stack {
  grid-template-rows: auto minmax(0, 1fr);
  grid-auto-rows: auto;
  align-content: stretch;
  flex: 1;
  min-height: 0;
  height: 100%;
  padding-bottom: 0;
  gap: 14px;
}

body.matrix-inspector-fixed .matrix-layout.has-inline-inspector .bento-grid--matrix-stack {
  grid-template-rows: auto auto minmax(0, 1fr);
}

body.matrix-inspector-fixed .matrix-inspector-top-panel {
  min-height: 0;
  max-height: clamp(140px, calc(100vh - 540px), 300px);
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
}

html[data-layout-surface-mode="scaled-desktop"] body.matrix-inspector-fixed .matrix-inspector-top-panel {
  max-height: 300px;
}

body.matrix-inspector-fixed .matrix-board-panel {
  min-height: 0;
  padding: 16px;
  overflow: hidden;
}

body.matrix-inspector-fixed .matrix-board-panel > .content-z {
  min-height: 0;
  height: 100%;
}

body.matrix-inspector-fixed .matrix-board-panel .box-header {
  flex: 0 0 auto;
  margin-bottom: 12px;
}

body.matrix-inspector-fixed .matrix-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
  overscroll-behavior: contain;
}

/* One compact line per active service, including dates and payment details. */
html .matrix-inspector-top-panel .box-header--inspector {
  margin-bottom: 10px;
}

html .matrix-inspector-top-panel .inspector-strip-main {
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
}

html .matrix-inspector-top-panel .inspector-actions-grid--matrix-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

html .matrix-inspector-top-panel .inspector-services-section--matrix-strip {
  grid-column: 1 / -1;
  gap: 8px;
}

html .matrix-inspector-top-panel .inspector-services-section--matrix-strip .inspector-service-list {
  max-height: 116px;
  gap: 6px;
  overflow: auto;
}

html .matrix-inspector-top-panel .service-detail-row {
  flex-direction: row;
  flex-wrap: nowrap;
  width: max-content;
  min-width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  gap: 10px;
  border-radius: 10px;
}

html .matrix-inspector-top-panel .service-detail-row-main {
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

html .matrix-inspector-top-panel .service-detail-platform {
  min-width: 110px;
  gap: 8px;
  white-space: nowrap;
}

html .matrix-inspector-top-panel .service-detail-meta {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 8px;
  gap: 6px;
  border-radius: 8px;
  white-space: nowrap;
}

html .matrix-inspector-top-panel .service-detail-meta strong {
  font-size: 12px;
}

html .matrix-inspector-top-panel .service-detail-meta small {
  letter-spacing: 0;
}

html .matrix-inspector-top-panel .service-detail-card .payment-card-brand {
  width: 64px;
  height: 28px;
  padding: 4px 6px;
  border-radius: 7px;
  box-shadow: none;
}

html .matrix-inspector-top-panel .service-detail-card strong {
  max-width: 160px;
}

/* Calendar: a bounded month grid with a separate, scrollable agenda. */
body.calendar-workspace-fixed .main-wrapper { min-height: 0; overflow: hidden; }
body.calendar-workspace-fixed .main-wrapper > :is(.top-nav, #syncBanner) { flex-shrink: 0; }
body.calendar-workspace-fixed .view-stack { flex: 1; min-height: 0; overflow: hidden; }
.calendar-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 320px); gap: 20px; flex: 1; min-height: 0; }
.calendar-month-panel, .calendar-agenda { min-width: 0; min-height: 0; border-radius: 20px; }
.calendar-month-panel { padding: 0; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 20px 12px; flex-shrink: 0; }
.calendar-month-controls { display: flex; align-items: center; gap: 8px; }
.calendar-month-controls h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.03em; white-space: nowrap; margin: 0 6px; }
.calendar-month-count { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.calendar-month-count strong { color: var(--text-main); font-weight: 600; margin-left: 4px; }
.calendar-today-btn { margin-left: 8px; min-height: 34px; padding: 0 12px; }
.calendar-legend { display: flex; align-items: center; gap: 16px; padding: 0 24px 18px; flex-shrink: 0; color: var(--text-muted); font-size: 11px; }
.calendar-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.calendar-event-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; background: #60a5fa; }
.orange .calendar-event-dot { background: #fb923c; }
.calendar-month-panel .glass-calendar { flex: 1; min-height: 0; height: auto; margin: 0; gap: 0; }
.calendar-month-panel .cal-weekdays { flex-shrink: 0; min-height: 36px; padding: 10px 0; border-top: 1px solid var(--card-border); border-bottom: 0; font-size: 11px; }
.calendar-month-panel .cal-weekdays > :first-child { color: #f0929e; }
.calendar-month-panel .cal-weekdays > :last-child { color: #93a6d9; }
.calendar-month-panel .cal-days { grid-template-rows: repeat(6, minmax(0, 1fr)); min-height: 0; gap: 0; }
.calendar-month-panel .cal-cell { min-height: 0; padding: 6px; gap: 3px; border: 0; border-radius: 0; border-top: 1px solid var(--card-border); border-left: 1px solid var(--card-border); background: transparent; cursor: pointer; container-type: size; }
.calendar-month-panel .cal-cell:nth-child(7n + 1) { border-left: 0; }
.calendar-month-panel .cal-cell:hover { background: var(--white-op); transform: none; }
.calendar-month-panel .cal-cell.empty { background: var(--black-op); border-top: 1px solid var(--card-border); border-left: 1px solid var(--card-border); }
.calendar-month-panel .cal-cell.empty:nth-child(7n + 1) { border-left: 0; }
.calendar-month-panel .cal-cell.empty .date { opacity: 0.35; }
.calendar-month-panel .cal-cell.today { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.calendar-month-panel .cal-cell.selected { background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: inset 0 0 0 1px var(--accent); }
.calendar-day-select { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 28px; padding: 0 3px; border: 0; border-radius: 6px; background: transparent; color: var(--text-main); cursor: pointer; }
.calendar-day-select:hover { background: var(--white-op-hover); }
.calendar-month-panel .cal-cell .date { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: 0; font-size: 12px; box-shadow: none; }
.calendar-day-count { color: var(--text-dim); font-size: 10px; padding-right: 4px; }
.calendar-month-panel .cal-events { gap: 3px; }
.calendar-month-panel .cal-event { min-height: 24px; padding: 3px 5px; gap: 5px; border: 0; border-radius: 5px; text-align: left; font-size: 10px; }
.calendar-month-panel .cal-event.blue { color: var(--text-main); background: rgba(96,165,250,0.07); }
.calendar-month-panel .cal-event.orange { color: var(--text-main); background: rgba(251,146,60,0.09); }
.calendar-month-panel .cal-event .service-mark--button { width: 16px; height: 16px; border-radius: 4px; }
.calendar-more { align-self: flex-start; color: var(--text-muted); background: transparent; border: 0; border-radius: 4px; padding: 2px 5px; font-size: 10px; white-space: nowrap; cursor: pointer; }
.calendar-more:hover { color: var(--accent); background: var(--white-op); }
.calendar-agenda { padding: 22px 18px; }
.calendar-agenda > .content-z { gap: 20px; }
.calendar-selected-section { display: flex; flex-direction: column; flex: 0 1 38%; min-height: 150px; }
.calendar-upcoming-section { display: flex; flex-direction: column; min-height: 0; flex: 1; padding-top: 20px; border-top: 1px solid var(--card-border); }
.calendar-agenda-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-shrink: 0; }
.calendar-eyebrow { display: block; color: var(--text-dim); font-size: 10px; margin-bottom: 8px; }
.calendar-agenda-heading h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.calendar-agenda-heading h3 > span { color: var(--text-muted); font-size: 12px; font-weight: 400; margin-left: 3px; }
.calendar-agenda-heading p { color: var(--text-dim); font-size: 11px; margin-top: 6px; }
.calendar-event-count { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.calendar-selected-events, .calendar-upcoming-events { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.calendar-agenda-event { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 2px; border: 0; border-bottom: 1px solid var(--card-border); background: transparent; color: var(--text-main); text-align: left; cursor: pointer; }
.calendar-agenda-event:last-child { border-bottom: 0; }
.calendar-agenda-event:hover { background: var(--white-op); }
.calendar-agenda-copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.calendar-agenda-copy strong { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-agenda-copy > span { color: var(--text-muted); font-size: 10px; }
.calendar-agenda-service { display: inline-flex; flex-shrink: 0; }
.calendar-agenda-date { display: flex; flex-direction: column; gap: 3px; width: 30px; text-align: center; flex-shrink: 0; }
.calendar-agenda-date small { color: var(--text-dim); font-size: 9px; }
.calendar-agenda-date strong { color: var(--text-muted); font-size: 16px; font-weight: 500; }
.calendar-countdown { color: var(--text-muted); font-size: 10px; white-space: nowrap; }
.calendar-countdown[data-urgency="urgent"] { color: #f0929e; }
.calendar-countdown[data-urgency="soon"] { color: #fbbf24; }
.calendar-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 0; color: var(--text-dim); }
.calendar-empty > span svg { width: 24px; height: 24px; margin-bottom: 4px; opacity: 0.5; }
.calendar-empty strong { color: var(--text-muted); font-size: 12px; font-weight: 500; }
.calendar-empty p { font-size: 11px; line-height: 1.7; }
.calendar-workspace :is(button:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
html[data-layout-profile="phone"] .nav-right { width: 100%; justify-content: space-between; gap: 6px; }
html[data-layout-profile="phone"] .header-tools { gap: 6px; }
html[data-layout-profile="phone"] .header-tools .readonly-btn { padding: 10px; font-size: 11px; }
html[data-layout-profile="phone"] .lock-btn { padding: 10px 12px; font-size: 11px; gap: 8px; }
html[data-layout-profile="phone"] #globalLockIcon { display: none; }
html[data-layout-profile="phone"] .calendar-workspace { display: flex; flex-direction: column; gap: 16px; }
html[data-layout-profile="phone"] .calendar-toolbar { padding: 16px 10px 12px; gap: 6px; }
html[data-layout-profile="phone"] .calendar-month-controls { gap: 3px; }
html[data-layout-profile="phone"] .calendar-month-controls h2 { font-size: 16px; margin: 0 3px; }
html[data-layout-profile="phone"] .calendar-month-count { font-size: 10px; }
html[data-layout-profile="phone"] .calendar-today-btn { margin-left: 3px; padding: 0 8px; }
html[data-layout-profile="phone"] .calendar-legend { padding: 0 14px 14px; }
html[data-layout-profile="phone"] .calendar-month-panel .cal-days { grid-template-rows: repeat(6, 92px); }
html[data-layout-profile="phone"] .calendar-month-panel .cal-cell { padding: 3px; }
html[data-layout-profile="phone"] .cal-event-account, html[data-layout-profile="phone"] .cal-event .calendar-event-dot { display: none; }
html[data-layout-profile="phone"] .calendar-month-panel .cal-event { justify-content: center; min-height: 18px; padding: 1px; }
html[data-layout-profile="phone"] .calendar-more { font-size: 0; padding: 0 3px; }
html[data-layout-profile="phone"] .calendar-more::after { content: '전체 보기'; font-size: 8px; }
html[data-layout-profile="phone"] .calendar-selected-events { max-height: 260px; }
html[data-layout-profile="phone"] .calendar-upcoming-events { max-height: 360px; }
@container (max-height: 110px) {
  .calendar-month-panel .cal-event { min-height: 18px; padding-top: 1px; padding-bottom: 1px; }
  .calendar-month-panel .cal-events:has(.calendar-more) .cal-event:nth-child(2) { display: none; }
  .calendar-month-panel .calendar-more { padding-top: 0; padding-bottom: 0; line-height: 14px; }
}

html .matrix-inspector-top-panel .service-detail-usage {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 6px;
  margin-left: auto;
}

html .matrix-inspector-top-panel .service-detail-usage-chip {
  min-height: 30px;
  padding: 0 8px;
  gap: 5px;
  border-radius: 8px;
  white-space: nowrap;
}

/* Shared launcher artwork, kept unfiltered in both themes. */
html body .logo-area .logo-box[aria-hidden] {
  flex: 0 0 40px;
  background: transparent;
  box-shadow: none;
}
.app-brand-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Inspector identity is static; service values share one column layout. */
.inspector-shell .box-header--inspector { margin-bottom: 12px; }
.inspector-shell .box-header--inspector h3 { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.inspector-account-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--card-border); margin-bottom: 14px; }
.inspector-account-identity { display: flex; flex: 1; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.inspector-account-id { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-main); font-size: 20px; font-weight: 600; letter-spacing: -0.025em; user-select: text; }
.inspector-account-state { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 4px 7px; border: 1px solid var(--card-border); border-radius: 6px; color: var(--text-muted); font-size: 10px; }
.inspector-account-state svg { width: 12px; height: 12px; }
.inspector-account-state.is-locked { color: #fda4af; border-color: rgba(251,113,133,0.2); }
.inspector-account-actions, .inspector-primary-actions { display: flex; align-items: center; gap: 6px; }
.inspector-account-actions .ghost-btn { min-height: 34px; padding: 7px 11px; border-radius: 9px; font-size: 11px; white-space: nowrap; }
.inspector-account-actions .ghost-btn svg { width: 14px; height: 14px; }
.inspector-account-actions .inspector-delete-action { margin-left: 6px; color: #fda4af; background: transparent; border-color: transparent; }
.inspector-account-actions .inspector-delete-action:hover { background: rgba(251,113,133,0.08); border-color: rgba(251,113,133,0.2); }
.inspector-shell .inspector-services-head { margin-bottom: 8px; }
.inspector-shell .inspector-services-head h5 { font-size: 11px; font-weight: 500; }
.inspector-shell .inspector-services-head > span { font-size: 10px; color: var(--text-dim); }
.inspector-templates { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--card-border); }
.inspector-templates summary { color: var(--text-muted); font-size: 11px; cursor: pointer; }
.inspector-templates summary > span { color: var(--text-dim); margin-left: 5px; }
.inspector-templates .template-stack { margin-top: 12px; }
.inspector-shell--dock .inspector-account-bar, .inspector-shell--sheet .inspector-account-bar { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.inspector-shell--dock .inspector-account-id, .inspector-shell--sheet .inspector-account-id { font-size: 18px; }
.inspector-shell--dock .inspector-account-actions, .inspector-shell--sheet .inspector-account-actions { justify-content: space-between; flex-wrap: wrap; }
.inspector-shell--dock .inspector-account-identity, .inspector-shell--sheet .inspector-account-identity { flex-direction: column; align-items: flex-start; gap: 6px; }
.matrix-board-panel .account-meta { justify-content: center; }
.matrix-board-panel .account-meta strong { font-size: 13px; font-weight: 500; }
body.matrix-inspector-fixed .matrix-inspector-top-panel { max-height: clamp(180px, calc(100vh - 500px), 320px); padding: 16px 20px; }
html[data-layout-surface-mode="scaled-desktop"] body.matrix-inspector-fixed .matrix-inspector-top-panel { max-height: 320px; }
html .matrix-inspector-top-panel .inspector-service-table { --inspector-columns: minmax(112px, 1fr) 108px 108px minmax(172px, 1.4fr) minmax(216px, 1.1fr); max-height: 162px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
html .matrix-inspector-top-panel .inspector-service-columns { display: grid; grid-template-columns: var(--inspector-columns); align-items: center; gap: 10px; min-width: 790px; padding: 0 10px 8px; color: var(--text-dim); font-size: 10px; }
html .matrix-inspector-top-panel .inspector-services-section--matrix-strip .inspector-service-list { flex-direction: column; max-height: none; gap: 0; overflow: visible; flex-wrap: nowrap; }
html .matrix-inspector-top-panel .service-detail-row { display: grid; grid-template-columns: var(--inspector-columns); align-items: center; gap: 10px; width: 100%; min-width: 790px; min-height: 44px; padding: 7px 10px; border: 0; border-top: 1px solid var(--card-border); border-radius: 0; background: transparent; }
html .matrix-inspector-top-panel .service-detail-row:hover { background: var(--white-op); }
html .matrix-inspector-top-panel .service-detail-row-main { display: contents; }
html .matrix-inspector-top-panel .service-detail-platform { min-width: 0; gap: 8px; }
html .matrix-inspector-top-panel .service-detail-platform strong { font-size: 12px; font-weight: 500; }
html .matrix-inspector-top-panel .service-detail-meta { min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
html .matrix-inspector-top-panel .service-detail-meta > small { display: none; }
html .matrix-inspector-top-panel .service-detail-meta strong { font-size: 11px; font-weight: 400; }
html .matrix-inspector-top-panel .service-detail-card { min-width: 0; gap: 7px; }
html .matrix-inspector-top-panel .service-detail-card .payment-card-brand { width: 40px; height: 24px; padding: 3px 4px; border-radius: 5px; }
html .matrix-inspector-top-panel .service-detail-card strong { max-width: 150px; }
html .matrix-inspector-top-panel .service-detail-usage { margin-left: 0; min-width: 0; gap: 5px; }
html .matrix-inspector-top-panel .service-detail-usage-chip { min-height: 25px; padding: 4px 6px; gap: 4px; border-radius: 6px; }
html .matrix-inspector-top-panel .service-detail-usage-chip strong { font-size: 10px; }
html .matrix-inspector-top-panel .service-detail-usage--empty { color: var(--text-dim); font-size: 12px; }
.inspector-shell--matrix-strip .inspector-account-identity { flex-wrap: nowrap; }
.inspector-shell .inspector-service-card-title { display: inline-flex; flex: 0 1 auto; align-items: center; justify-content: flex-start; gap: 8px; width: auto; height: auto; min-width: 0; background: transparent; border: 0; padding: 0; }
.inspector-shell .inspector-service-name { font-size: 12px; font-weight: 500; color: var(--text-main); }
.inspector-shell .inspector-service-summary { overflow: visible; }
.inspector-shell .inspector-service-summary-row { width: 100%; min-width: 0; flex-wrap: wrap; }
.inspector-shell .inspector-service-metric { max-width: 100%; }
.inspector-shell .inspector-service-metric--payment strong { min-width: 0; }
.inspector-shell--dock .inspector-services-section, .inspector-shell--sheet .inspector-services-section { padding-top: 0; border-top: 0; }
@media (max-width: 1180px) and (max-height: 850px) {
  html:not([data-layout-surface-mode="scaled-desktop"]) body.matrix-inspector-fixed .matrix-inspector-top-panel { max-height: 210px; padding: 12px 16px; }
  html:not([data-layout-surface-mode="scaled-desktop"]) .matrix-inspector-top-panel .box-header--inspector { margin-bottom: 8px; }
  html:not([data-layout-surface-mode="scaled-desktop"]) .matrix-inspector-top-panel .inspector-account-bar { gap: 10px; padding-bottom: 10px; margin-bottom: 10px; }
  html:not([data-layout-surface-mode="scaled-desktop"]) .matrix-inspector-top-panel .inspector-account-id { font-size: 16px; }
  html:not([data-layout-surface-mode="scaled-desktop"]) .matrix-inspector-top-panel .inspector-account-actions .ghost-btn { padding: 7px 9px; }
  html:not([data-layout-surface-mode="scaled-desktop"]) .matrix-inspector-top-panel .inspector-service-table { max-height: 62px; }
}

/* Issues: unread work first, a compact form, and a separate activity trail. */
.issues-workspace { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.issues-workspace .issue-deck-grid { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr); align-items: start; gap: 18px; }
.issues-workspace .bento-box { padding: 22px; border-radius: 20px; }
.issues-workspace .content-z { min-width: 0; }
.issues-section-header, .issues-section-title { display: flex; align-items: center; gap: 10px; }
.issues-section-header { justify-content: space-between; margin-bottom: 18px; min-height: 36px; }
.issues-section-title h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.03em; }
.issues-count { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 8px; color: var(--text-main); background: rgba(129,140,248,0.22); font-size: 12px; font-weight: 700; }
.issues-count--muted { color: var(--text-muted); background: var(--white-op); }
.issues-section-note { font-size: 11px; color: var(--text-dim); }
.issues-workspace .ghost-btn { min-height: 34px; padding: 7px 11px; font-size: 11px; border-radius: 9px; white-space: nowrap; }
.issues-workspace .issue-deck-list { gap: 0; border: 1px solid var(--card-border); border-radius: 14px; overflow: hidden; }
.issues-workspace .issue-deck-card { padding: 19px 18px; gap: 11px; border: 0; border-radius: 0; background: transparent; box-shadow: none; transition: background 0.18s ease; }
.issues-workspace .issue-deck-card + .issue-deck-card { border-top: 1px solid var(--card-border); }
.issues-workspace .issue-deck-card:hover { background: var(--white-op); }
.issues-workspace .issue-deck-head { flex-direction: row; align-items: center; gap: 10px; }
.issue-status-dot, .issues-activity-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #9ca6ff; }
.severity-critical .issue-status-dot { background: #fb7185; }
.severity-warning .issue-status-dot { background: #fbbf54; }
.issues-workspace .issue-deck-copy strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.issues-workspace .severity-badge { font-size: 10px; border-radius: 6px; padding: 4px 7px; letter-spacing: 0; flex: 0 0 auto; }
.issues-workspace .issue-deck-detail { font-size: 12px; line-height: 1.65; margin-left: 18px; overflow-wrap: anywhere; }
.issues-workspace .issue-deck-fix { margin-left: 18px; padding: 9px 10px; border: 0; border-radius: 7px; font-size: 11px; line-height: 1.6; }
.issue-deck-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-left: 18px; }
.issues-workspace .issue-deck-meta { align-items: center; gap: 8px 12px; min-width: 0; }
.issue-source-label, .issue-service-label { color: var(--text-dim); font-size: 10px; }
.issue-service-label { display: inline-flex; align-items: center; gap: 5px; }
.issues-workspace .activity-meta-chip { min-height: 0; max-width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 10px; font-weight: 400; overflow-wrap: anywhere; }
.issues-workspace .issue-service-label .service-mark { width: 15px; height: 15px; min-width: 15px; border-radius: 4px; }
.issues-workspace .issue-actions { margin-top: 0; flex-direction: row; align-items: center; gap: 6px; flex-wrap: wrap; }
.issues-workspace .issue-ack-btn { display: inline-flex; align-items: center; gap: 5px; border-color: rgba(129,140,248,0.25); background: rgba(129,140,248,0.08); }
.issues-workspace .issue-ack-btn svg { width: 13px; height: 13px; }
.issues-workspace .issue-remove-btn { color: var(--text-dim); background: transparent; border-color: transparent; }
.issues-workspace .issue-remove-btn:hover { color: #fda4af; background: rgba(251,113,133,0.08); }
.issues-workspace .issues-compose-card { height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; gap: 18px; }
.issues-workspace .issues-compose-head { min-height: 36px; flex-direction: row; align-items: center; justify-content: flex-start; }
.issues-workspace .issues-compose-head strong { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.03em; }
.issues-workspace .issues-compose-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; }
.issues-workspace .input-block { min-width: 0; }
.issues-workspace .input-block > span { font-size: 11px; font-weight: 500; }
.issues-workspace .cool-input, .issues-workspace .custom-select-btn { min-height: 42px; font-size: 12px; }
.issues-workspace .issues-textarea { min-height: 104px; height: 104px; resize: vertical; font-size: 12px; line-height: 1.6; }
.issues-workspace .custom-select-value, .issues-workspace .cs-item { font-size: 12px; letter-spacing: 0; text-transform: none; }
.issues-workspace .custom-select-wrapper { min-width: 0; z-index: 4; }
.issues-workspace .custom-select-wrapper.is-open { z-index: 12; }
.issues-workspace .custom-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issues-workspace .custom-select-menu { z-index: 420; }
.issues-workspace .issues-submit-btn { width: 100%; min-height: 42px; margin: 0; font-size: 12px; border-radius: 10px; }
.issues-empty { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px; border: 1px dashed var(--card-border); border-radius: 14px; }
.issues-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(129,140,248,0.1); color: #a5adff; }
.issues-empty-icon svg { width: 16px; height: 16px; }
.issues-empty strong { font-size: 13px; font-weight: 500; }
.issues-empty p { font-size: 11px; color: var(--text-dim); }
.issues-workspace .activity-timeline-stream--issues { gap: 0; }
.issues-activity-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 16px 0; }
.issues-activity-row + .issues-activity-row { border-top: 1px solid var(--card-border); }
.issues-activity-dot { margin-top: 6px; width: 6px; height: 6px; opacity: 0.7; }
.issues-activity-copy { min-width: 0; }
.issues-activity-copy > strong { font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.issues-activity-copy > p { margin-top: 5px; color: var(--text-muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.issues-activity-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; color: var(--text-dim); font-size: 10px; }
.issues-activity-row .activity-timeline-actions { justify-content: flex-end; }
[data-theme="light"] .issues-workspace .issue-ack-btn { color: #4f46a5; }
[data-theme="light"] .issues-empty-icon { color: #5b54bd; }
@media (max-width: 1180px) {
  html:not([data-layout-surface-mode="scaled-desktop"]) .issues-workspace .issue-deck-grid { grid-template-columns: minmax(0, 1fr); }
}
html[data-layout-profile="phone"] .issues-workspace .issue-deck-grid { grid-template-columns: minmax(0, 1fr); }
html[data-layout-surface-mode="scaled-desktop"] .issues-workspace .issues-compose-grid { grid-template-columns: minmax(0, 1fr); }
html[data-layout-profile="phone"] .issues-workspace .bento-box { padding: 16px; border-radius: 16px; }
html[data-layout-profile="phone"] .issues-workspace .issue-deck-card { padding: 16px 12px; }
html[data-layout-profile="phone"] .issues-section-title h3,
html[data-layout-profile="phone"] .issues-workspace .issues-compose-head strong { font-size: 16px; }
html[data-layout-profile="phone"] .issues-section-note { display: none; }
html[data-layout-profile="phone"] .issues-workspace .issue-deck-detail,
html[data-layout-profile="phone"] .issues-workspace .issue-deck-fix,
html[data-layout-profile="phone"] .issues-workspace .issue-deck-footer { margin-left: 0; }
html[data-layout-profile="phone"] .issues-workspace .issue-actions { gap: 6px; }
html[data-layout-profile="phone"] .issues-workspace .issue-deck-footer { align-items: flex-start; flex-direction: column; }
html[data-layout-profile="phone"] .issues-workspace .ghost-btn { min-height: 38px; }
html[data-layout-profile="phone"] .issues-empty { min-height: 160px; }
html[data-layout-profile="phone"] .issues-activity-row { grid-template-columns: 6px minmax(0, 1fr); gap: 10px; }
html[data-layout-profile="phone"] .issues-activity-row .activity-timeline-actions { grid-column: 2; justify-content: flex-start; }
@media (prefers-reduced-motion: reduce) {
  .issues-workspace .issue-deck-card { transition: none; }
}

/* B × D service editor: service identity beside an editable billing timeline. */
html .service-editor-dialog.service-editor-popover.service-editor-dialog--brand {
  --service-brand-accent: #d88463;
  --service-brand-deep: #3e2c27;
  --service-brand-mid: #714936;
  --editor-bg: #28292c;
  --editor-surface: #252629;
  --editor-ink: #f1eeeb;
  --editor-muted: #b8b4b2;
  --editor-border: #424245;
  --editor-selected: #f2dfcd;
  --editor-selected-ink: #272421;
  --text-main: var(--editor-ink);
  --text-muted: var(--editor-muted);
  --card-border: var(--editor-border);
  --accent: var(--service-brand-accent);
  display: grid;
  grid-template-columns: minmax(230px, 29%) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  padding: 0;
  border: 1px solid var(--editor-border);
  border-radius: 24px;
  background: var(--editor-bg);
  color: var(--editor-ink);
  box-shadow: 0 28px 80px #0006;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html .service-editor-dialog.service-editor-popover.service-editor-dialog--brand[data-service-id="netflix"] { --service-brand-accent: #ef6375; --service-brand-deep: #35262b; --service-brand-mid: #632e39; }
html .service-editor-dialog.service-editor-popover.service-editor-dialog--brand[data-service-id="youtube-premium"] { --service-brand-accent: #f66c71; --service-brand-deep: #39272a; --service-brand-mid: #70363b; }
html .service-editor-dialog.service-editor-popover.service-editor-dialog--brand[data-service-id="spotify"] { --service-brand-accent: #62cfa1; --service-brand-deep: #22382f; --service-brand-mid: #315b45; }
html .service-editor-dialog.service-editor-popover.service-editor-dialog--brand[data-service-id="gpt"] { --service-brand-accent: #8cc8b9; --service-brand-deep: #263832; --service-brand-mid: #3c5b50; }
html .service-editor-dialog.service-editor-popover.service-editor-dialog--brand[data-service-id="gemini"] { --service-brand-accent: #aaa3ee; --service-brand-deep: #302c43; --service-brand-mid: #51456e; }

.service-editor-dialog--brand .service-brand-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 54px 32px 24px;
  overflow: hidden;
  color: #f8f0e9;
  background: linear-gradient(155deg, var(--service-brand-mid) -25%, var(--service-brand-deep) 63%);
}
.service-brand-panel::before, .service-brand-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: 200%;
  height: 60%;
  right: -85%;
  bottom: -25%;
  border-radius: 50%;
  background: var(--service-brand-accent);
  opacity: .18;
  transform: rotate(-22deg);
}
.service-brand-panel::after { right: -130%; bottom: -2%; height: 110%; opacity: .06; transform: rotate(30deg); }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-hero { flex-direction: column; align-items: flex-start; gap: 20px; padding: 0; margin: 0; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-logo-large,
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-logo-large .service-mark,
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-logo-large .service-mark svg {
  width: 88px;
  height: 88px;
  flex: none;
  border-radius: 18px;
  background: transparent;
  border: none;
  box-shadow: none;
}
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-hero-copy { width: 100%; gap: 12px; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-service-name { font-size: 48px; line-height: 1.08; letter-spacing: -.045em; color: #fff9f4; overflow-wrap: anywhere; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-account { font-size: 16px; color: #d0bfb4; font-weight: 500; }
.service-brand-rule { width: 74px; height: 2px; background: var(--service-brand-accent); margin: 30px 0 18px; flex-shrink: 0; }
.service-brand-status { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; padding: 8px 12px; border-radius: 12px; background: #fff1; color: #f1e5dc; font-size: 14px; font-weight: 600; }
.service-brand-status svg { width: 17px; height: 17px; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-open-link { margin-top: auto; padding: 10px 0; color: #f5e9df; justify-content: flex-start; min-height: 40px; font-size: 14px; align-self: flex-start; width: auto; background: transparent; border: 0; box-shadow: none; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-open-link:hover { background: transparent; color: #fff; }
.service-editor-dialog--brand .service-editor-dialog-close { position: absolute; z-index: 2; top: 18px; right: 18px; border-color: var(--editor-border); background: #ffffff05; color: var(--editor-ink); }
.service-editor-dialog--brand .service-editor-content { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 18px; min-width: 0; min-height: 0; padding: 60px 30px 24px; }
.service-editor-dialog--brand .service-editor-dialog-status { gap: 12px; }
.service-editor-dialog--brand .service-editor-dialog-label { color: var(--editor-ink); font-size: 16px; font-weight: 700; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-statuses { padding: 0; gap: 0; background: transparent; border-color: var(--editor-border); border-radius: 12px; overflow: hidden; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .status-btn { min-height: 48px; min-width: 0; padding: 10px 8px; border: 0; border-radius: 0; color: var(--editor-muted); white-space: nowrap; font-size: 16px; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .status-btn + .status-btn { border-left: 1px solid var(--editor-border); }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .status-btn.active { background: var(--editor-selected); color: var(--editor-selected-ink); border-color: transparent; border-radius: 10px; box-shadow: none; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .status-btn:hover:not(.active) { color: var(--editor-ink); background: #ffffff08; }
.service-editor-status-hint { display: flex; align-items: flex-start; gap: 8px; color: var(--editor-muted); font-size: 12px; line-height: 1.6; margin: 0; }
.service-editor-status-hint svg { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-main { display: flex; flex-direction: column; gap: 0; min-height: 0; overflow: auto; padding: 0; }
.service-editor-overview { display: flex; flex-direction: column; gap: 16px; }
.service-editor-main.is-editing .service-editor-overview { display: none; }
.service-timeline-section { border-block: 1px solid var(--editor-border); padding: 20px 0; }
.service-timeline-section h5 { color: var(--editor-ink); font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.service-timeline { display: grid; grid-template-columns: minmax(0, max-content) minmax(24px, 1fr) minmax(0, max-content); align-items: center; }
.service-timeline-point { display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-width: 0; min-height: 78px; padding: 0; border: 0; border-radius: 12px; color: var(--editor-ink); background: transparent; text-align: left; cursor: pointer; }
.service-timeline-point:disabled { cursor: not-allowed; }
.service-timeline-point:focus-visible { outline: 2px solid var(--service-brand-accent); outline-offset: 3px; }
.service-timeline-icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; flex: 0 0 54px; border: 1px solid #737173; border-radius: 50%; color: var(--editor-muted); transition: border-color .18s, background .18s; }
.service-timeline-icon svg { width: 23px; height: 23px; }
.service-timeline-point[data-panel="expectedCancellationDate"] .service-timeline-icon { border-style: dashed; }
.service-timeline-point:hover:not(:disabled) .service-timeline-icon { border-color: var(--service-brand-accent); background: #ffffff06; }
.service-timeline-copy { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.service-timeline-copy > span { color: var(--editor-muted); font-size: 12px; }
.service-timeline-copy strong { font-size: 17px; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; }
.service-timeline-connector { border-top: 1px dashed #777478; margin: 0 12px; opacity: .7; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .payment-card-box { width: 100%; min-height: 70px; padding: 12px; gap: 14px; margin: 0; border: 1px solid var(--editor-border); background: var(--editor-surface); border-radius: 12px; box-shadow: none; text-align: left; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .payment-card-trigger:disabled { opacity: 1; cursor: not-allowed; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .payment-card-trigger:disabled .payment-card-cta { color: var(--editor-muted); }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .payment-card-trigger > .payment-card-brand { width: 42px; height: 42px; flex-basis: 42px; background: #ffffff06; border: 1px solid var(--editor-border); }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .card-details { gap: 5px; min-width: 0; }
.service-payment-caption { font-size: 12px; color: var(--editor-muted); }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .card-name { font-size: 16px; color: var(--editor-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .payment-card-cta { font-size: 12px; color: var(--service-brand-accent); padding: 0 10px; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-dialog-footer { justify-content: flex-end; border: 0; padding-top: 0; margin: 0; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-save { min-height: 46px; min-width: 180px; font-size: 16px; background: var(--editor-selected); color: var(--editor-selected-ink); border: 0; box-shadow: none; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-save:hover { filter: brightness(1.06); }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-stage-card { min-height: 0; flex: 1 1 0; background: var(--editor-surface); border: 1px solid var(--editor-border); box-shadow: none; padding: 18px; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-stage-panel { height: 100%; min-height: 0; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-inline-time-layout { grid-template-columns: minmax(150px, .8fr) minmax(0, 1.2fr); }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-inline-time-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); padding: 10px; gap: 10px; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-time-preview-card { padding: 14px; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-time-preview-card strong { font-size: 24px; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-stage-title-icon { color: var(--service-brand-accent); }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-stage-eyebrow { color: var(--editor-muted); }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-stage-apply { background: var(--editor-selected); color: var(--editor-selected-ink); box-shadow: none; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-dashboard-card--usage { border: 0; background: transparent; padding: 0; }
.service-editor-popover.service-editor-dialog.service-editor-dialog--brand .usage-split-panel { padding: 12px; border-radius: 12px; background: var(--editor-surface); border: 1px solid var(--editor-border); box-shadow: none; }
.service-editor-dialog--brand :is(button, input, select):focus-visible { outline: 2px solid var(--service-brand-accent); outline-offset: 3px; }

html [data-theme="light"] .service-editor-dialog.service-editor-dialog--brand,
html[data-theme="light"] .service-editor-dialog.service-editor-dialog--brand {
  --editor-bg: #faf8f4;
  --editor-surface: #f3f0eb;
  --editor-ink: #292724;
  --editor-muted: #6d645d;
  --editor-border: #dcd6ce;
  --editor-selected: #302c28;
  --editor-selected-ink: #fff5eb;
}

html[data-layout-profile="phone"] .service-editor-dialog.service-editor-popover.service-editor-dialog--brand {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0;
  gap: 0;
  border-radius: 22px 22px 0 0;
}
html[data-layout-profile="phone"] .service-editor-dialog--brand .service-brand-panel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 20px 22px 16px; }
html[data-layout-profile="phone"] .service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-hero { flex-direction: row; align-items: center; gap: 12px; grid-column: 1 / -1; padding-right: 46px; }
html[data-layout-profile="phone"] .service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-logo-large,
html[data-layout-profile="phone"] .service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-logo-large .service-mark,
html[data-layout-profile="phone"] .service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-logo-large .service-mark svg { width: 48px; height: 48px; border-radius: 12px; }
html[data-layout-profile="phone"] .service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-service-name { font-size: 24px; }
html[data-layout-profile="phone"] .service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-hero-copy { gap: 5px; min-width: 0; }
html[data-layout-profile="phone"] .service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-account { font-size: 12px; }
html[data-layout-profile="phone"] .service-brand-rule { display: none; }
html[data-layout-profile="phone"] .service-brand-status { font-size: 12px; padding: 6px 10px; }
html[data-layout-profile="phone"] .service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-open-link { min-height: 32px; margin: 0; padding: 4px 0; font-size: 12px; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .service-editor-content { padding: 20px 20px max(16px, env(safe-area-inset-bottom, 0px)); gap: 16px; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .service-editor-dialog-close { color: #f5e9df; border-color: #ffffff44; background: #ffffff08; }
html[data-layout-profile="phone"] .service-editor-popover.service-editor-dialog.service-editor-dialog--brand .status-btn { min-height: 42px; padding: 8px 5px; font-size: 12px; gap: 5px; }
html[data-layout-profile="phone"] .service-editor-status-hint { font-size: 11px; }
html[data-layout-profile="phone"] .service-timeline { grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr); }
html[data-layout-profile="phone"] .service-timeline-point { gap: 8px; min-height: 72px; }
html[data-layout-profile="phone"] .service-timeline-icon { width: 36px; height: 36px; flex-basis: 36px; }
html[data-layout-profile="phone"] .service-timeline-icon svg { width: 18px; height: 18px; }
html[data-layout-profile="phone"] .service-timeline-copy strong { font-size: 13px; }
html[data-layout-profile="phone"] .service-timeline-connector { margin: 0 2px; }
html[data-layout-profile="phone"] .service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-editor-save { width: 100%; min-width: 0; }
html[data-layout-profile="phone"] .service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-inline-time-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
html[data-layout-profile="phone"] .service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-time-preview-card { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; padding: 10px; }
html[data-layout-profile="phone"] .service-editor-popover.service-editor-dialog.service-editor-dialog--brand .service-time-preview-card .service-inline-edit-field { grid-column: 2; grid-row: 1 / 3; margin: 0; }

/* C editor: flat property rows and a calendar on the existing brand surface. */
html .service-editor-dialog.service-editor-dialog--brand .service-editor-stage-card.is-flat-stage {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
.service-editor-dialog--brand .is-flat-stage .service-editor-stage-panel--flat { gap: 12px; }
html .service-editor-dialog--brand .is-flat-stage .service-editor-stage-header {
  min-height: 46px;
  align-items: center;
  flex-wrap: nowrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--editor-border);
}
.service-editor-dialog--brand .is-flat-stage .service-editor-stage-title { gap: 12px; }
.service-editor-dialog--brand .is-flat-stage .service-editor-stage-title-icon { width: 24px; height: 24px; }
.service-editor-dialog--brand .is-flat-stage .service-editor-stage-title-icon svg { width: 23px; height: 23px; }
.service-editor-dialog--brand .is-flat-stage .service-editor-stage-title strong { font-size: 21px; line-height: 1.35; }
.service-editor-dialog--brand .is-flat-stage .service-editor-stage-eyebrow { font-size: 11px; letter-spacing: 0; font-weight: 500; }
.service-editor-dialog--brand .is-flat-stage .service-editor-stage-close { flex: 0 0 36px; border-radius: 10px; background: transparent; border-color: var(--editor-border); }
.service-flat-property {
  display: grid;
  grid-template-columns: minmax(88px, .34fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--editor-border);
}
.service-flat-property > span,
.service-editor-dialog--brand .is-flat-stage .service-payment-label { font-size: 14px; font-weight: 600; color: var(--editor-ink); }
.service-editor-dialog--brand .is-flat-stage .service-flat-date-input { padding: 0 0 12px; }
.service-editor-dialog--brand .is-flat-stage .service-flat-date-input input { width: 216px; max-width: 100%; justify-self: end; }
.service-editor-dialog--brand .is-flat-stage :is(.service-inline-edit-input, .service-payment-input, .service-payment-select) {
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--editor-border);
  border-radius: 10px;
  background: transparent;
  color: var(--editor-ink);
  font-size: 14px;
  box-shadow: none;
}
.service-editor-dialog--brand .is-flat-stage :is(.service-inline-edit-input, .service-payment-input):focus,
.service-editor-dialog--brand .is-flat-stage .service-payment-select:focus-visible { border-color: var(--service-brand-accent); }
.service-editor-dialog--brand .is-flat-stage .service-payment-input:disabled { opacity: 1; cursor: not-allowed; }
.service-editor-dialog--brand .is-flat-stage .service-payment-input::placeholder { color: var(--editor-muted); font-weight: 400; opacity: 1; }
.service-editor-dialog--brand .is-flat-stage .service-editor-stage-body--date {
  grid-template-rows: auto auto auto minmax(202px, 1fr);
  gap: 8px;
  overflow: auto;
}
.service-editor-dialog--brand .is-flat-stage .date-picker-nav { margin: 0; min-height: 40px; }
.service-editor-dialog--brand .is-flat-stage .date-picker-nav button { width: 40px; height: 40px; min-height: 40px; padding: 8px; border: 1px solid var(--editor-border); border-radius: 10px; color: var(--editor-ink); background: transparent; }
.service-editor-dialog--brand .is-flat-stage .date-picker-month-pill { font-size: 19px; }
.service-editor-dialog--brand .is-flat-stage .service-inline-weekdays { gap: 6px; }
.service-editor-dialog--brand .is-flat-stage .service-inline-days { height: 100%; min-height: 202px; grid-template-rows: repeat(6, minmax(32px, 1fr)); gap: 2px 6px; }
.service-editor-dialog--brand .is-flat-stage .service-inline-days .sp-cell {
  position: relative;
  width: min(100%, 48px);
  max-height: 44px;
  justify-self: center;
  align-self: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--editor-ink);
  font-size: 14px;
  box-shadow: none;
  transform: none;
}
.service-editor-dialog--brand .is-flat-stage .service-inline-days .sp-cell.dim { color: var(--editor-muted); opacity: .5; }
.service-editor-dialog--brand .is-flat-stage .service-inline-days .sp-cell:hover { background: var(--white-op-hover); border-color: var(--editor-border); transform: none; box-shadow: none; }
.service-editor-dialog--brand .is-flat-stage .service-inline-days .sp-cell.today { width: 34px; height: 34px; border-color: var(--service-brand-accent); border-radius: 50%; color: var(--service-brand-accent); background: transparent; }
.service-editor-dialog--brand .is-flat-stage .service-inline-days .sp-cell.today::after { content: ""; position: absolute; bottom: 3px; left: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: var(--service-brand-accent); }
.service-editor-dialog--brand .is-flat-stage .service-inline-days .sp-cell.selected { border-color: transparent; border-radius: 10px; background: var(--editor-selected); color: var(--editor-selected-ink); box-shadow: none; transform: none; opacity: 1; }
.service-editor-dialog--brand .is-flat-stage .service-inline-days .sp-cell.selected::after { background: currentColor; }
html .service-editor-dialog--brand .is-flat-stage .service-payment-panel-layout { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.service-editor-dialog--brand .is-flat-stage .service-editor-stage-body--payment { overflow: auto; padding: 0; }
.service-editor-dialog--brand .is-flat-stage .service-payment-form { width: 100%; gap: 0; }
.service-editor-dialog--brand .is-flat-stage .service-payment-form > .service-flat-property:first-child { padding-top: 0; }
.service-editor-dialog--brand .is-flat-stage .payment-provider-select { min-width: 0; }
.service-editor-dialog--brand .is-flat-stage .payment-provider-select-menu { max-height: min(220px, 30vh); background: var(--editor-bg); border-color: var(--editor-border); }
.service-editor-dialog--brand .is-flat-stage .payment-provider-select-content { gap: 10px; }
.service-editor-dialog--brand .is-flat-stage .payment-provider-select-content .payment-card-brand { width: 44px; height: 28px; padding: 4px; border-radius: 6px; box-shadow: none; }
.service-editor-dialog--brand .is-flat-stage .payment-provider-select-content--placeholder .payment-card-brand { width: 24px; padding: 0; background: transparent; border: 0; }
.service-editor-dialog--brand .is-flat-stage .service-payment-preview-card { width: 100%; padding: 22px; border: 1px solid var(--editor-border); border-radius: 12px; background: var(--editor-surface); box-shadow: none; }
.service-editor-dialog--brand .is-flat-stage .service-payment-preview-shell { grid-template-columns: 112px minmax(0, 1fr); gap: 22px; min-height: 76px; }
.service-editor-dialog--brand .is-flat-stage .service-payment-preview-card .payment-card-brand--stage { height: 64px; width: 112px; padding: 12px; border-radius: 9px; }
.service-editor-dialog--brand .is-flat-stage .service-payment-preview-card .payment-card-brand--placeholder { background: transparent; border-color: transparent; color: var(--editor-muted); }
.service-editor-dialog--brand .is-flat-stage .service-payment-preview-card .payment-card-brand--placeholder svg { width: 44px; height: 44px; }
.service-editor-dialog--brand .is-flat-stage .service-payment-preview-copy { gap: 8px; padding-left: 22px; border-left: 1px solid var(--editor-border); min-height: 64px; }
.service-editor-dialog--brand .is-flat-stage .service-payment-preview-copy strong { font-size: 20px; }
.service-editor-dialog--brand .is-flat-stage .service-editor-stage-footer { padding-top: 14px; border-color: var(--editor-border); }
.service-editor-dialog--brand .is-flat-stage .service-stage-secondary { min-height: 42px; border: 1px solid var(--editor-border); border-radius: 10px; background: transparent; color: var(--editor-ink); font-size: 14px; }
.service-editor-dialog--brand .is-flat-stage .service-stage-secondary:hover:not(:disabled) { background: var(--white-op-hover); border-color: var(--service-brand-accent); transform: none; }
.service-editor-dialog--brand .is-flat-stage .service-stage-apply { min-height: 42px; border-radius: 10px; }
.service-editor-dialog--brand .is-flat-stage .service-stage-apply:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.service-editor-dialog--brand .is-flat-stage .service-stage-secondary:disabled { color: var(--editor-muted); opacity: .55; cursor: not-allowed; }

html[data-layout-profile="phone"] .service-editor-dialog--brand .is-flat-stage .service-flat-property { grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 14px 0; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .is-flat-stage .service-flat-date-input { padding: 0 0 10px; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .is-flat-stage .service-flat-property > :is(span, label) { font-size: 12px; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .is-flat-stage :is(.service-inline-edit-input, .service-payment-input, .service-payment-select) { min-height: 42px; padding: 0 10px; font-size: 12px; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .is-flat-stage .service-payment-panel-layout { gap: 16px; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .is-flat-stage .service-payment-preview-card { padding: 12px; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .is-flat-stage .service-payment-preview-shell { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; min-height: 64px; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .is-flat-stage .service-payment-preview-card .payment-card-brand--stage { width: 64px; height: 48px; padding: 7px; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .is-flat-stage .service-payment-preview-copy { padding-left: 12px; min-height: 56px; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .is-flat-stage .service-payment-preview-copy strong { font-size: 17px; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .is-flat-stage .service-inline-days { gap: 2px; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .is-flat-stage .service-inline-days .sp-cell { font-size: 12px; width: 34px; max-height: 34px; }
html[data-layout-profile="phone"] .service-editor-dialog--brand .is-flat-stage .service-stage-secondary { padding: 0 12px; font-size: 12px; }
@media (prefers-reduced-motion: reduce) {
  .service-editor-dialog--brand .is-flat-stage :is(.sp-cell, input, button) { transition: none; }
}
