/* WorkBase Operations — standalone product UI (light, separate from marketing site) */

:root {
  --ops-bg: #eef2f6;
  --ops-surface: #ffffff;
  --ops-surface-muted: #f8fafc;
  --ops-border: #e2e8f0;
  --ops-border-strong: #cbd5e1;
  --ops-text: #0f172a;
  --ops-text-secondary: #475569;
  --ops-text-muted: #64748b;
  --ops-accent: #0f766e;
  --ops-accent-hover: #0d9488;
  --ops-accent-soft: rgba(15, 118, 110, 0.1);
  --ops-danger: #dc2626;
  --ops-warning: #d97706;
  --ops-radius: 10px;
  --ops-radius-lg: 14px;
  --ops-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  --ops-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --ops-font: "DM Sans", "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--ops-font);
  background: var(--ops-bg);
  color: var(--ops-text);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ops-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* —— Auth layout —— */
.ops-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.ops-auth-brand {
  background: linear-gradient(145deg, #0f766e 0%, #134e4a 48%, #0d9488 100%);
  color: #ecfdf5;
  padding: 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ops-auth-brand h1 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ops-auth-brand .tag {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  opacity: 0.92;
  max-width: 28rem;
}

.ops-auth-brand footer {
  font-size: 0.8rem;
  opacity: 0.75;
}

.ops-auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--ops-bg);
}

.ops-card {
  width: 100%;
  max-width: 400px;
  background: var(--ops-surface);
  border: 1px solid var(--ops-border);
  border-radius: var(--ops-radius-lg);
  padding: 2rem 2rem 1.75rem;
  box-shadow: var(--ops-shadow-md);
}

.ops-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ops-card .sub {
  margin: 0 0 1.5rem;
  color: var(--ops-text-muted);
  font-size: 0.9rem;
}

.ops-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  padding: 0.2rem;
  background: var(--ops-surface-muted);
  border-radius: 8px;
  border: 1px solid var(--ops-border);
}

.ops-tab {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ops-text-muted);
  cursor: pointer;
}

.ops-tab[aria-selected="true"] {
  background: var(--ops-surface);
  color: var(--ops-text);
  box-shadow: var(--ops-shadow);
}

.ops-field {
  margin-bottom: 1rem;
}

.ops-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ops-text-secondary);
  margin-bottom: 0.35rem;
}

.ops-field input,
.ops-field select,
.ops-field textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--ops-border-strong);
  border-radius: 8px;
  font: inherit;
  background: var(--ops-surface);
  color: var(--ops-text);
}

.ops-field input[readonly] {
  background: var(--ops-surface-muted);
  color: var(--ops-text-secondary);
}

.ops-field input:focus,
.ops-field select:focus,
.ops-field textarea:focus {
  outline: 2px solid var(--ops-accent);
  outline-offset: 1px;
  border-color: var(--ops-accent);
}

.ops-field input[type="file"] {
  padding: 0.55rem 0.75rem;
  background: var(--ops-surface-muted);
}

.ops-field input[type="file"].ops-file-dropzone {
  padding: 1rem 1rem;
  min-height: 5.2rem;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 14px;
  background: var(--ops-surface);
  color: transparent;
  font-size: 0;
  box-shadow: none;
  line-height: 1.45;
  text-align: center;
}

.ops-field input[type="file"].ops-file-dropzone + .ops-field-note {
  text-align: center;
}

.ops-field input[type="file"].ops-file-dropzone + .ops-chat-help {
  text-align: center;
}

.ops-field input[type="file"].ops-file-dropzone:hover,
.ops-field input[type="file"].ops-file-dropzone.is-dragover {
  border-color: rgba(15, 118, 110, 0.45);
  background: #fcfefe;
}

.ops-field input[type="file"].ops-file-dropzone::file-selector-button {
  display: block;
  margin: 0 auto 0.7rem;
  padding: 0.58rem 0.9rem;
  border: 1px solid var(--ops-border);
  border-radius: 999px;
  background: var(--ops-surface-muted);
  color: var(--ops-text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ops-field input[type="file"].ops-file-dropzone:hover::file-selector-button,
.ops-field input[type="file"].ops-file-dropzone.is-dragover::file-selector-button {
  background: #f8fafc;
  border-color: rgba(15, 118, 110, 0.22);
}

.ops-field-note {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: var(--ops-text-muted);
}

.ops-field-note--error {
  color: var(--ops-danger);
}

.ops-image-preview,
.ops-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.ops-image-preview-card,
.ops-image-card {
  border: 1px solid var(--ops-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--ops-surface-muted);
  box-shadow: var(--ops-shadow);
}

.ops-image-preview-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--ops-surface);
  box-shadow: none;
}

.ops-image-preview-card img,
.ops-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e2e8f0;
}

.ops-image-preview-card p,
.ops-image-card span {
  display: block;
  margin: 0;
  padding: 0.55rem 0.65rem;
  font-size: 0.72rem;
  color: var(--ops-text-secondary);
  line-height: 1.35;
  word-break: break-word;
}

.ops-image-preview-card p {
  font-weight: 600;
}

.ops-chat-file-preview-card__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: var(--ops-surface-muted);
  color: var(--ops-text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.ops-image-card {
  appearance: none;
  width: 100%;
  border: 1px solid var(--ops-border);
  color: inherit;
  text-decoration: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
  cursor: pointer;
}

.ops-image-card:hover {
  text-decoration: none;
  border-color: var(--ops-border-strong);
}

.ops-image-card strong {
  font-size: 0.78rem;
  color: var(--ops-text);
  line-height: 1.35;
  word-break: break-word;
}

.ops-image-card span {
  padding: 0;
  font-size: 0.72rem;
}

.ops-image-card strong,
.ops-image-card span {
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

.ops-image-card strong {
  padding-top: 0.9rem;
}

.ops-image-card span {
  padding-bottom: 0.9rem;
}

.ops-image-card-preview {
  display: none;
  padding: 0 0.9rem 0.9rem;
}

.ops-image-card[aria-expanded="true"] .ops-image-card-preview {
  display: block;
}

.ops-image-card-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 10px;
  background: #e2e8f0;
}

.ops-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ops-btn-primary {
  background: var(--ops-accent);
  color: #fff;
  width: 100%;
}
.ops-btn-primary:hover {
  background: var(--ops-accent-hover);
}

.ops-btn-secondary {
  background: var(--ops-surface);
  border-color: var(--ops-border-strong);
  color: var(--ops-text);
}
.ops-btn-secondary:hover {
  background: var(--ops-surface-muted);
}

.ops-btn-soft {
  background: var(--ops-surface-muted);
  border-color: transparent;
  color: var(--ops-text-secondary);
}

.ops-btn-soft:hover {
  background: #eef6f6;
  border-color: rgba(15, 118, 110, 0.18);
  color: var(--ops-text);
}

.ops-btn-danger-soft {
  background: #fff5f5;
  border-color: #fecaca;
  color: #b91c1c;
}

.ops-btn-danger-soft:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.ops-btn:hover {
  text-decoration: none;
}

.ops-alert {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.ops-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.ops-hint {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ops-border);
  font-size: 0.78rem;
  color: var(--ops-text-muted);
  line-height: 1.45;
}

.ops-toast-stack {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  z-index: 300;
  pointer-events: none;
}

.ops-toast {
  min-width: min(22rem, calc(100vw - 2rem));
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.24);
  font-size: 0.88rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ops-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

/* —— App shell —— */
.ops-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.ops-sidebar {
  background: var(--ops-surface);
  border-right: 1px solid var(--ops-border);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ops-logo {
  font-weight: 800;
  font-size: 1rem;
  color: var(--ops-text);
  letter-spacing: -0.02em;
  padding: 0 0.5rem;
}

.ops-logo span {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ops-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}

.ops-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ops-nav a,
.ops-nav button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ops-text-secondary);
  cursor: pointer;
  text-decoration: none;
}

.ops-nav a:hover,
.ops-nav button:hover {
  background: var(--ops-surface-muted);
  color: var(--ops-text);
  text-decoration: none;
}

.ops-nav a[aria-current="page"],
.ops-nav button[aria-current="page"] {
  background: var(--ops-accent-soft);
  color: var(--ops-accent);
  font-weight: 600;
}

.ops-user-block {
  margin-top: auto;
  padding: 0.75rem;
  background: var(--ops-surface-muted);
  border-radius: var(--ops-radius);
  border: 1px solid var(--ops-border);
  font-size: 0.8rem;
}

.ops-user-block strong {
  display: block;
  color: var(--ops-text);
}

.ops-user-block span {
  color: var(--ops-text-muted);
}

.ops-sidebar-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ops-sidebar-actions .ops-btn {
  width: 100%;
}

.ops-main {
  padding: 1.5rem 2rem 2.5rem;
  overflow-x: auto;
}

.ops-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ops-page-head h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ops-page-head p {
  margin: 0.25rem 0 0;
  color: var(--ops-text-muted);
  font-size: 0.9rem;
}

.ops-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.ops-page-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
}

.ops-page-head-actions .ops-btn {
  width: auto;
  min-width: 13rem;
}

.ops-page-head-actions .ops-btn-primary {
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
}

.ops-page-footer-link {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.ops-page-footer-link .ops-btn {
  width: auto;
}

.ops-request-actions {
  min-width: min(100%, 27rem);
  padding: 0.95rem 1rem 1rem;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(15, 118, 110, 0.02)),
    var(--ops-surface);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.ops-request-actions--compact {
  min-width: min(100%, 20rem);
  padding: 0.9rem 1rem;
}

.ops-request-actions__eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ops-accent);
}

.ops-request-actions .ops-btn-primary {
  width: auto;
  min-width: 13.5rem;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
}

.ops-request-actions__utility {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.ops-request-actions__utility--compact {
  margin-top: 0;
}

.ops-request-actions__utility .ops-btn {
  width: auto;
}

/* —— Tables & cards —— */
.ops-table-wrap {
  background: var(--ops-surface);
  border: 1px solid var(--ops-border);
  border-radius: var(--ops-radius-lg);
  overflow: hidden;
  box-shadow: var(--ops-shadow);
}

.ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.ops-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--ops-surface-muted);
  color: var(--ops-text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--ops-border);
}

.ops-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--ops-border);
  vertical-align: middle;
}

.ops-table tr:last-child td {
  border-bottom: none;
}

.ops-table tr:hover td {
  background: #fafbfc;
}

.ops-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ops-badge-open {
  background: #dbeafe;
  color: #1d4ed8;
}
.ops-badge-in_progress {
  background: #fef3c7;
  color: #b45309;
}
.ops-badge-resolved {
  background: #d1fae5;
  color: #047857;
}

.ops-badge-priority-high {
  color: var(--ops-danger);
  font-weight: 700;
  font-size: 0.75rem;
}

.ops-link-btn {
  background: none;
  border: none;
  color: var(--ops-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.ops-link-btn:hover {
  text-decoration: underline;
}

.ops-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--ops-text-muted);
}

/* —— Modal —— */
/* [hidden] must win: a plain .ops-modal-backdrop { display: flex } overrides
   the user-agent [hidden] rule, so modals stayed visible and "Close" did nothing. */
[hidden] {
  display: none !important;
}

.ops-modal-backdrop[hidden] {
  display: none !important;
  pointer-events: none;
}

.ops-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}

.ops-modal {
  background: var(--ops-surface);
  border-radius: var(--ops-radius-lg);
  border: 1px solid var(--ops-border);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.15);
}

.ops-modal header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--ops-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ops-modal header h2 {
  margin: 0;
  font-size: 1.15rem;
  flex: 1;
}

.ops-modal-close {
  border: 1px solid #fca5a5;
  background: #fff5f5;
  color: var(--ops-danger);
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ops-modal-close:hover,
.ops-modal-close:focus-visible {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

.ops-modal .body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ops-modal .body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.ops-modal footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--ops-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.04);
}

.ops-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.ops-timeline li {
  position: relative;
  padding: 0.95rem 1rem;
  border: 1px solid var(--ops-border);
  border-radius: 14px;
  background: var(--ops-surface);
  font-size: 0.88rem;
  box-shadow: var(--ops-shadow);
}

.ops-timeline li:last-child {
  margin-bottom: 0;
}

.ops-timeline time {
  display: block;
  font-size: 0.72rem;
  color: var(--ops-text-muted);
  margin-bottom: 0.4rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ops-timeline-copy {
  margin: 0;
  color: var(--ops-text);
  white-space: pre-wrap;
  line-height: 1.5;
}

.ops-timeline--progress {
  position: relative;
  padding-left: 0;
  --ops-progress-column: 26px;
  --ops-timeline-dot-size: 12px;
  --ops-timeline-dot-top: 18px;
  --ops-timeline-rail-width: 2px;
  --ops-timeline-gap: 0.9rem;
  gap: var(--ops-timeline-gap);
}

.ops-timeline--progress::before {
  content: none;
}

.ops-timeline--progress li {
  display: grid;
  grid-template-columns: var(--ops-progress-column) minmax(0, 1fr);
  gap: var(--ops-timeline-gap);
  align-items: start;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.ops-timeline-marker {
  position: relative;
  display: block;
  width: var(--ops-progress-column);
  padding-top: var(--ops-timeline-dot-top);
  z-index: 1;
}

.ops-timeline-marker::before {
  content: "";
  display: block;
  width: var(--ops-timeline-dot-size);
  height: var(--ops-timeline-dot-size);
  margin: 0 auto;
  border-radius: 999px;
  background: var(--ops-accent);
  box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.12);
}

.ops-timeline-progress-card {
  padding: 0.95rem 1rem;
  border: 1px solid var(--ops-border);
  border-radius: 14px;
  background: var(--ops-surface);
  font-size: 0.88rem;
  box-shadow: var(--ops-shadow);
}

.ops-timeline--progress li::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: calc((var(--ops-progress-column) - var(--ops-timeline-rail-width)) / 2);
  top: calc(var(--ops-timeline-gap) / -2);
  bottom: calc(var(--ops-timeline-gap) / -2);
  width: var(--ops-timeline-rail-width);
  background: rgba(15, 118, 110, 0.24);
  border-radius: 999px;
}

.ops-timeline--progress li:first-child::after {
  top: calc(var(--ops-timeline-dot-top) + var(--ops-timeline-dot-size) / 2);
}

.ops-timeline--progress li:last-child::after {
  bottom: calc(100% - (var(--ops-timeline-dot-top) + var(--ops-timeline-dot-size) / 2));
}

.ops-timeline--progress li:only-child::after {
  content: none;
}

.ops-ticket-update-panel {
  margin-top: 1rem;
}

.ops-ticket-editor-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.ops-ticket-editor-card {
  border: 1px solid var(--ops-border);
  border-radius: 14px;
  background: var(--ops-surface-muted);
  overflow: hidden;
}

.ops-ticket-editor-toggle {
  width: 100% !important;
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ops-text);
  padding: 0.95rem 1rem;
}

.ops-ticket-editor-toggle:hover {
  background: #eef2f6;
}

.ops-ticket-editor-toggle[aria-expanded="true"] {
  background: #eef2f6;
}

.ops-ticket-editor-panel {
  margin-top: 0;
  padding: 0 1rem 1rem;
  background: var(--ops-surface);
  border-top: 1px solid var(--ops-border);
}

.ops-ticket-update-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.ops-ticket-update-panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.ops-ticket-update-trigger {
  width: auto !important;
}

.ops-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 900px) {
  .ops-auth {
    grid-template-columns: 1fr;
  }
  .ops-auth-brand {
    padding: 2rem 1.5rem;
    min-height: auto;
  }
  .ops-app {
    grid-template-columns: 1fr;
  }
  .ops-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--ops-border);
  }
  .ops-user-block {
    margin-top: 0;
    width: 100%;
  }
  .ops-sidebar-actions {
    width: 100%;
    margin-top: 0;
  }
  .ops-nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
  .ops-nav a,
  .ops-nav button {
    width: auto;
  }
  .ops-split {
    grid-template-columns: 1fr;
  }

  .ops-page-head-actions {
    width: 100%;
    align-items: stretch;
  }

  .ops-page-head-actions .ops-btn {
    width: 100%;
    min-width: 0;
  }

  .ops-page-footer-link {
    justify-content: stretch;
  }

  .ops-page-footer-link .ops-btn {
    width: 100%;
  }

  .ops-request-actions {
    width: 100%;
    min-width: 0;
  }

  .ops-request-actions .ops-btn-primary,
  .ops-request-actions__utility .ops-btn {
    width: 100%;
  }

  .ops-request-actions__utility {
    flex-direction: column;
  }
}

/* —— Notifications —— */
.ops-nav-badge {
  display: inline-block;
  margin-left: 0.35rem;
  min-width: 1.15rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: #dc2626;
  color: #fff;
  line-height: 1.2;
  vertical-align: middle;
}

.ops-nav-badge:empty,
.ops-nav-badge[data-count="0"] {
  display: none;
}

.ops-notif-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ops-notif-item {
  background: var(--ops-surface);
  border: 1px solid var(--ops-border);
  border-radius: var(--ops-radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--ops-shadow);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ops-notif-item:hover,
.ops-notif-item:focus-visible {
  border-color: var(--ops-border-strong);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), var(--ops-shadow);
}

.ops-notif-item--unread {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.08) 0%, var(--ops-surface) 12px);
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.ops-notif-item--unread .ops-notif-title {
  font-weight: 700;
}

.ops-notif-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  color: var(--ops-text-muted);
}

.ops-notif-type {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
  color: var(--ops-accent);
}

.ops-notif-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--ops-text);
}

.ops-notif-detail {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ops-text-secondary);
  line-height: 1.45;
}

.ops-notif-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .ops-notif-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.ops-notif-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
}

.ops-notif-panel .ops-toolbar {
  margin-bottom: 0.85rem;
}

.ops-chat-layout {
  display: grid;
  gap: 1rem;
}

@media (min-width: 980px) {
  .ops-chat-layout {
    grid-template-columns: 300px 1fr;
    align-items: start;
  }
}

.ops-chat-sidebar {
  background: var(--ops-surface);
  border: 1px solid var(--ops-border);
  border-radius: var(--ops-radius-lg);
  box-shadow: var(--ops-shadow);
  overflow: hidden;
}

.ops-chat-thread-list {
  display: flex;
  flex-direction: column;
}

.ops-chat-thread {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ops-border);
  background: transparent;
  text-align: left;
  padding: 0.95rem 1rem;
  font: inherit;
  cursor: pointer;
}

.ops-chat-thread:last-child {
  border-bottom: 0;
}

.ops-chat-thread:hover {
  background: var(--ops-surface-muted);
}

.ops-chat-thread[aria-current="true"] {
  background: var(--ops-accent-soft);
}

.ops-chat-thread-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.2rem;
  color: var(--ops-text);
  font-weight: 700;
}

.ops-chat-thread-meta,
.ops-chat-thread-preview {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ops-text-muted);
}

.ops-chat-thread-preview {
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-chat-thread-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.ops-chat-thread--needs-reply {
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
}

.ops-chat-thread--needs-reply[aria-current="true"] {
  border-left: 3px solid #f59e0b;
}

.ops-chat-thread-awaiting {
  font-size: 0.65rem;
  font-weight: 600;
  color: #d97706;
  background: #fef3c7;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.4rem;
}

.ops-btn-flag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  color: #6b7280;
  cursor: pointer;
  white-space: nowrap;
}

.ops-btn-flag:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #d97706;
}

.ops-btn-flag--active {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #d97706;
}

.ops-chat-panel {
  background: var(--ops-surface);
  border: 1px solid var(--ops-border);
  border-radius: var(--ops-radius-lg);
  box-shadow: var(--ops-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 580px;
}

.ops-chat-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ops-border);
}

.ops-chat-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.ops-chat-head p {
  margin: 0.25rem 0 0;
  color: var(--ops-text-muted);
  font-size: 0.86rem;
}

.ops-chat-messages {
  flex: 1;
  padding: 1rem 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: #fbfdfe;
}

.ops-chat-empty {
  margin: auto;
  text-align: center;
  color: var(--ops-text-muted);
  font-size: 0.9rem;
}

.ops-chat-bubble {
  max-width: min(78%, 520px);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  box-shadow: var(--ops-shadow);
  border: 1px solid var(--ops-border);
}

.ops-chat-bubble--other {
  align-self: flex-start;
  background: #ffffff;
}

.ops-chat-bubble--own {
  align-self: flex-end;
  background: #ecfeff;
  border-color: #a5f3fc;
}

.ops-chat-bubble--unread {
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.ops-chat-bubble p {
  margin: 0;
  color: var(--ops-text);
  white-space: pre-wrap;
}

.ops-chat-bubble time {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  color: var(--ops-text-muted);
}

.ops-chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.ops-chat-attachment {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.38rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.18);
  color: var(--ops-accent);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.ops-chat-attachment:hover {
  text-decoration: none;
  background: rgba(15, 118, 110, 0.12);
}

.ops-chat-help {
  margin-top: 0.55rem;
  font-size: 0.75rem;
  color: var(--ops-text-muted);
}

.ops-chat-compose {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--ops-border);
  background: var(--ops-surface);
}

.ops-chat-compose form {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.ops-chat-compose textarea {
  min-height: 96px;
  resize: vertical;
}

@media (max-width: 700px) {
  .ops-chat-compose form {
    flex-direction: column;
    align-items: stretch;
  }

  .ops-chat-bubble {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
