/* ==========================================================================
   ZOK MAIL v3: FROSTED GLASS WORKSPACE VIEWS: CALENDAR, AGENTS, CONTACTS & ORG
   Covers DESIGN.md Sections 5.5, 5.6 & Enterprise Governance
   ========================================================================== */

.workspace-view {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--border-panel);
  box-shadow: var(--shadow-panel), var(--specular-rim);
  border-radius: var(--radius-panel);
  overflow: hidden;
}

.workspace-view-header {
  min-height: 58px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.workspace-view-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.workspace-view-title-group h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--text-primary);
}

.workspace-view-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-view-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.workspace-view-body > * {
  flex-shrink: 0;
}

.view-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.view-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.view-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.view-section-head h2 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.012em;
}

.view-section-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   BUILT-IN FROSTED GLASS CALENDAR & SCHEDULING STAGE (DESIGN.md Section 5.5)
   ========================================================================== */

.zok-calendar-stage,
.calendar-workspace-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.calendar-stage-main,
.calendar-left-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendar-toolbar,
.calendar-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-month-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.018em;
}

.calendar-day-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-day-header,
.calendar-day-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.calendar-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calendar-event-card {
  position: relative;
  padding: 13px 14px 13px 18px;
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pill), var(--specular-rim);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 140ms ease;
}

.calendar-event-card:hover {
  border-color: var(--border-strong);
}

.calendar-event-card::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: var(--accent-blue);
}

.calendar-event-card[data-category="customer"]::before,
.calendar-event-card.category-customer::before {
  background: var(--accent-emerald);
}

.calendar-event-card[data-category="personal"]::before,
.calendar-event-card.category-personal::before {
  background: var(--accent-coral);
}

.calendar-event-card[data-category="work"]::before,
.calendar-event-card.category-work::before {
  background: var(--accent-blue);
}

.calendar-event-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.calendar-event-time {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.calendar-event-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.34;
}

.calendar-event-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.42;
}

.calendar-event-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.calendar-event-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Week / Day Grid Helpers */
.calendar-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-week-col {
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Right Availability & Quick Schedule Rail (300px) */
.calendar-slots-rail,
.calendar-right-rail {
  width: 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.calendar-rail-card,
.free-slots-card,
.quick-schedule-card {
  padding: 15px;
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pill), var(--specular-rim);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.calendar-rail-card h3,
.free-slots-card h3,
.quick-schedule-card h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.free-slots-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.free-slot-pill,
.slot-window-btn {
  width: 100%;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--bg-track);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-align: left;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.free-slot-pill:hover,
.free-slot-pill.selected,
.slot-window-btn:hover {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-pill);
}

/* ==========================================================================
   T3-CODE-STYLE AGENT CONTROL PLANE & ⌘J CO-PILOT DOCK (DESIGN.md Section 5.6)
   ========================================================================== */

.zok-agent-dock {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.agent-dock-header {
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.agent-dock-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.agent-dock-stream,
.agent-conversation-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agent-starter-grid,
.agent-starter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-starter-chip,
.agent-starter-pill {
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: left;
  transition: border-color 140ms ease, color 140ms ease;
}

.agent-starter-chip:hover,
.agent-starter-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.agent-msg-item,
.agent-turn-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.agent-msg-user {
  align-self: flex-end;
  max-width: 90%;
  padding: 8px 12px;
  border-radius: 14px 14px 4px 14px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  font-size: 12.5px;
  line-height: 1.45;
}

.agent-msg-assistant {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pill);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agent-tool-pills {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.agent-tool-pill {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--bg-track);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.agent-tool-pill summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.agent-tool-pill summary::-webkit-details-marker {
  display: none;
}

.agent-tool-pill pre {
  margin: 6px 0 0;
  padding: 8px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* T3-Style Unified Bottom Agent Composer */
.agent-composer-box {
  margin: 8px 12px 12px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pill), var(--specular-rim);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.agent-composer-box:focus-within {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.agent-composer-box textarea {
  width: 100%;
  min-height: 62px;
  max-height: 150px;
  padding: 10px 12px 6px;
  border: none;
  outline: none;
  background: transparent;
  resize: none;
  font-size: 13px;
  line-height: 1.46;
  color: var(--text-primary);
}

.agent-composer-box textarea::placeholder {
  color: var(--text-muted);
}

.agent-composer-footer,
.agent-composer-bar {
  padding: 6px 8px 6px 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.agent-composer-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.harness-select-pill,
.agent-context-chip {
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--bg-track);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 150px;
}

.agent-context-chip.active {
  background: var(--accent-emerald-tint);
  border-color: transparent;
  color: var(--status-ok);
}

/* Full Agents Control Plane Hub (Sidebar -> Agents) */
.agent-harnesses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}

.agent-harness-card {
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pill), var(--specular-rim);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 140ms ease;
}

.agent-harness-card:hover {
  border-color: var(--border-strong);
}

.agent-harness-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.agent-harness-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.harness-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.harness-status-dot.ready {
  background: var(--accent-emerald);
}

.agent-harness-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.agent-cli-hint {
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--bg-track);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: nowrap;
}

.mcp-panel,
.agent-sdk-sheet {
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pill), var(--specular-rim);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mcp-command-box {
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--bg-track);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  overflow-x: auto;
}

.mcp-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}

.mcp-tool-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-track);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mcp-tool-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   FROSTED GLASS DATA TABLES & ENTERPRISE GOVERNANCE CONSOLE
   ========================================================================== */

.zok-ledger-frame {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  box-shadow: var(--shadow-pill);
  overflow: hidden;
}

.zok-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.zok-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.zok-table thead th {
  padding: 10px 14px;
  background: var(--bg-track);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.zok-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}

.zok-table tbody tr:last-child td {
  border-bottom: none;
}

.zok-table tbody tr:hover td {
  background: var(--bg-hover);
}

.contact-name-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 160px;
}

.contact-primary-name {
  font-weight: 500;
  color: var(--text-primary);
}

.table-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

/* Organization & Agent Governance Summary Strip */
.org-summary-strip {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  box-shadow: var(--shadow-pill);
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.org-summary-cell {
  padding: 14px 16px;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.org-summary-cell:last-child {
  border-right: none;
}

.org-summary-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

.org-summary-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.org-summary-note {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.policy-ledger {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  box-shadow: var(--shadow-pill);
  overflow: hidden;
}

.policy-row {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.policy-row:last-child {
  border-bottom: none;
}

.policy-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: 54ch;
}

.policy-row-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.policy-row-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.policy-row-control {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(300px, 100%);
  justify-content: flex-end;
}

.policy-footer-bar {
  padding: 11px 16px;
  background: var(--bg-track);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.invite-inline-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   V4 T3-STYLE 5-TAB CUSTOMIZE STUDIO, THEME SWATCHES, SKILLS & KEYBINDINGS
   ========================================================================== */

.zok-customize-studio {
  flex: 1;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.customize-studio-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: var(--radius-track);
  background: var(--bg-track);
  border: 1px solid var(--border-subtle);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.customize-studio-tabs::-webkit-scrollbar {
  display: none;
}

.customize-tab-btn {
  height: 31px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.customize-tab-btn:hover {
  color: var(--text-primary);
}

.customize-tab-btn.active,
.customize-tab-btn[aria-selected="true"] {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-pill);
}

.customize-studio-section,
.customize-section-card {
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pill), var(--specular-rim);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.theme-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.theme-swatch-card {
  padding: 14px;
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pill), var(--specular-rim);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.theme-swatch-card:hover {
  border-color: var(--border-strong);
}

.theme-swatch-card.active {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px var(--focus-ring), var(--shadow-pill);
}

.theme-swatch-preview {
  height: 54px;
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
}

.theme-swatch-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.theme-swatch-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(128, 128, 128, 0.25);
  flex-shrink: 0;
}

.theme-swatch-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-swatch-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.42;
}

.theme-token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.theme-token-row {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-track);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.theme-token-row input[type="color"] {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.slot-chip-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.slot-chip {
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--bg-track);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.slot-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-surface);
}

.custom-css-editor {
  width: 100%;
  min-height: 120px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-track);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-primary);
  resize: vertical;
  outline: none;
}

.custom-css-editor:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Skills, Smart Views, Rules, Effort & Keybindings Cards */
.zok-customize-studio .studio-tools-check-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
}

.zok-customize-studio .studio-tool-check {
  min-width: 0;
  white-space: nowrap;
}

.zok-tag.mono {
  letter-spacing: 0.06em;
}

.skill-cards-grid,
.smart-views-grid,
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.skill-card,
.smart-view-card,
.rule-card {
  padding: 15px;
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-pill), var(--specular-rim);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.skill-slash-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent-blue-tint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-ink);
  white-space: nowrap;
}

.keybinding-when-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--bg-track);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.effort-pill,
.agent-mode-pill {
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--bg-track);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.effort-pill:hover,
.agent-mode-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.agent-mode-pill.full-customize,
.agent-mode-pill.active {
  background: var(--accent-emerald-tint);
  border-color: transparent;
  color: var(--status-ok);
}

/* ==========================================================================
   RESPONSIVE WORKSPACE ADAPTATION (<= 1080PX & <= 860PX MOBILE)
   ========================================================================== */

@media (max-width: 1080px) {
  .zok-calendar-stage,
  .calendar-workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-slots-rail,
  .calendar-right-rail {
    width: 100%;
  }

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

  .org-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .org-summary-cell:nth-child(2) {
    border-right: none;
  }

  .org-summary-cell:nth-child(1),
  .org-summary-cell:nth-child(2) {
    border-bottom: 1px solid var(--border-subtle);
  }
}

@media (max-width: 860px) {
  .workspace-view {
    border-radius: 0;
    border: none;
    box-shadow: none;
    width: 100%;
    max-width: 100vw;
  }

  .zok-agent-dock,
  #zok-agent-dock {
    position: fixed;
    inset: 0;
    width: 100% !important;
    max-width: none !important;
    border-radius: 0;
    border: none;
    z-index: 95;
  }
}

@media (max-width: 680px) {
  .workspace-view-header {
    padding: 10px 16px;
  }

  .workspace-view-body {
    padding: 16px 16px 36px;
  }

  .calendar-week-grid,
  .org-summary-strip,
  .agent-harnesses-grid,
  .theme-presets-grid,
  .theme-token-grid,
  .skill-cards-grid,
  .smart-views-grid,
  .rules-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .org-summary-cell {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .org-summary-cell:last-child {
    border-bottom: none;
  }

  .policy-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .policy-row-control {
    width: 100%;
    justify-content: flex-start;
  }
}
