/**
 * AICORE ClientSpace — Soft Premium Theme Stylesheet (Directive #050 Mobile Polish)
 * Enforces zero horizontal scrollbars, responsive cards, clean customer-facing top-bar,
 * and zero internal platform exposure.
 */

/* Global Reset & Viewport Constraints */
html, body.clientspace-body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  box-sizing: border-box;
  background-color: #F8FAFC;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a;
  margin: 0;
  padding: 0;
}

*, *:before, *:after {
  box-sizing: inherit;
}

/* CUSTOMER TOP BAR (Directive #050 & #051) */
.cs-top-bar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  width: 100% !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}
.cs-top-bar-inner {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0.75rem 1rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
}
a.cs-top-brand, .cs-top-brand {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  text-decoration: none !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 1.05rem !important;
  border: none !important;
}
a.cs-top-brand:hover, a.cs-top-brand:visited {
  text-decoration: none !important;
  color: #0f172a !important;
}
.cs-top-brand-text {
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em !important;
}
.cs-top-logo-badge {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.85rem !important;
  flex-shrink: 0 !important;
}
.cs-top-auth {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
}
.cs-top-user {
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
}
.cs-top-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #ede9fe !important;
  color: #6366f1 !important;
  font-weight: 800 !important;
  font-size: 0.8rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}
.cs-top-username {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #334155 !important;
  display: none !important;
}
@media (min-width: 480px) {
  .cs-top-username {
    display: inline !important;
  }
}
.cs-btn-logout {
  padding: 0.35rem 0.75rem !important;
  border-radius: 8px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #475569 !important;
  transition: all 0.15s ease !important;
}
.cs-btn-logout:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.cs-btn-signin {
  padding: 0.35rem 0.85rem !important;
  border-radius: 8px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  border: 1px solid #6366f1 !important;
  background: #6366f1 !important;
  color: #ffffff !important;
  transition: all 0.15s ease !important;
}
.cs-btn-signin:hover {
  background: #4f46e5 !important;
}

/* PAGE CONTAINER */
.cs-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  width: 100%;
}

/* MANDATORY TRANSPARENCY NOTICE */
.cs-demo-notice-bar {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  color: #92400e;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  font-size: 0.75rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
  text-align: center;
}

/* GREETING HERO BANNER */
.cs-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.cs-hero-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}
.cs-avatar-ring {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  flex-shrink: 0;
}
.cs-hero-titles {
  min-width: 0;
}
.cs-greeting-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  margin-bottom: 0.25rem;
}
.cs-company-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-space-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0.15rem 0 0;
}
.cs-quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* RESPONSIVE SUMMARY GRID (Directive #050 - 2-col, zero horizontal overflow) */
.cs-status-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  width: 100%;
}
.cs-summary-orb {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  min-width: 0;
}
.cs-orb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}
.cs-orb-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.cs-orb-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cs-orb-count {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
.cs-orb-label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SECTIONS & HEADERS */
.cs-section {
  margin-bottom: 1.5rem;
  width: 100%;
}
.cs-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.cs-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}
.cs-demo-tag, .cs-tag-purple {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}
.cs-tag-purple {
  background: #ede9fe;
  color: #6366f1;
}

/* ATTENTION CARD */
.cs-attention-card {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  width: 100%;
}
.cs-attention-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.cs-attention-body {
  flex: 1;
  min-width: 0;
}
.cs-attention-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: #2563eb;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.cs-attention-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e3a8a;
  margin: 0 0 0.25rem;
}
.cs-attention-desc {
  font-size: 0.8rem;
  color: #3b82f6;
  margin: 0 0 0.6rem;
  line-height: 1.4;
}
.cs-attention-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

/* SERVICES GRID (1-col on mobile, 2/4-col on desktop) */
.cs-services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  width: 100%;
}
@media (min-width: 640px) {
  .cs-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .cs-services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cs-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.1rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  width: 100%;
}
.cs-service-card {
  display: flex;
  flex-direction: column;
}
.cs-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}
.cs-card-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.cs-status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  background: #ecfdf5;
  color: #059669;
}
.cs-status-pill.cs-pill-neutral, .cs-pill-neutral {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}
.cs-status-pill.cs-pill-active, .cs-pill-active {
  background: #ecfdf5 !important;
  color: #059669 !important;
}
.cs-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.2rem;
}
.cs-card-target {
  font-size: 0.85rem;
  font-weight: 700;
  color: #6366f1;
  margin-bottom: 0.35rem;
  word-break: break-all;
}
.cs-card-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.85rem;
  line-height: 1.35;
}
.cs-card-footer {
  margin-top: auto;
}
.cs-btn-card {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  text-decoration: none;
}

/* BILLING CARD */
.cs-billing-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.cs-billing-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}
.cs-billing-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.cs-billing-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.15rem;
}
.cs-billing-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}
.cs-billing-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.cs-btn-outline {
  padding: 0.4rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

/* GROWTH GRID & CATCHY SCALE UP SECTION */
.cs-scaleup-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.06) 50%, rgba(16, 185, 129, 0.05) 100%) !important;
  border: 1px solid rgba(99, 102, 241, 0.25) !important;
  border-radius: 16px !important;
  padding: 1.5rem !important;
  box-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.1) !important;
  position: relative !important;
  overflow: hidden !important;
}
.cs-scaleup-banner-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  margin-bottom: 0.75rem !important;
}
.cs-scaleup-headline {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 !important;
}
.cs-scaleup-sub {
  font-size: 0.92rem !important;
  color: #475569 !important;
  margin: 0 0 1.25rem 0 !important;
  line-height: 1.5 !important;
  max-width: 780px !important;
}
.cs-growth-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}
@media (min-width: 640px) {
  .cs-growth-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .cs-growth-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.cs-growth-card {
  padding: 1.25rem !important;
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  transition: all 0.2s ease-in-out !important;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04) !important;
}
.cs-growth-card:hover {
  transform: translateY(-3px) !important;
  border-color: #818cf8 !important;
  box-shadow: 0 8px 16px -2px rgba(99, 102, 241, 0.15) !important;
}
.cs-growth-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.cs-growth-icon {
  font-size: 1.35rem !important;
}
.cs-growth-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #6366f1;
  letter-spacing: 0.05em;
  background: rgba(99, 102, 241, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}
.cs-growth-title {
  font-size: 1rem !important;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.45rem;
  line-height: 1.3 !important;
}
.cs-growth-desc {
  font-size: 0.82rem !important;
  color: #64748b;
  margin: 0 0 1rem;
  line-height: 1.45;
  flex-grow: 1;
}
.cs-growth-cta-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  padding: 0.55rem 0.85rem !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  background: #4f46e5 !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  transition: background 0.15s ease !important;
  text-align: center !important;
}
.cs-growth-cta-btn:hover {
  background: #4338ca !important;
  color: #ffffff !important;
}
.cs-btn-text {
  background: none;
  border: none;
  color: #6366f1;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
}

/* HELP BANNER */
.cs-help-banner {
  background: linear-gradient(135deg, #ede9fe, #f1f5f9);
  border: 1px solid #ddd6fe;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.cs-help-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #6366f1;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.cs-help-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.25rem;
}
.cs-help-desc {
  font-size: 0.8rem;
  color: #475569;
  margin: 0;
}
.cs-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #6366f1;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

/* LOGIN SCREEN */
.cs-login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0.5rem;
  width: 100%;
}
.cs-login-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 1.75rem 1.25rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}
.cs-login-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.cs-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.cs-brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}
.cs-brand-tagline {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0.25rem 0 0;
}
.cs-field-group {
  margin-bottom: 1rem;
  width: 100%;
}
.cs-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
}
.cs-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cs-link-forgot {
  font-size: 0.75rem;
  color: #6366f1;
  text-decoration: none;
}
.cs-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.cs-input-icon {
  position: absolute;
  left: 0.85rem;
  font-size: 0.95rem;
  pointer-events: none;
}
.cs-input, .cs-textarea, .cs-select {
  width: 100%;
  padding: 0.65rem 0.85rem 0.65rem 2.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.85rem;
  background: #ffffff;
  color: #0f172a;
  outline: none;
}
.cs-textarea, .cs-select {
  padding-left: 0.85rem;
}
.cs-input:focus, .cs-textarea:focus, .cs-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.cs-btn-primary {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}
.cs-divider {
  text-align: center;
  margin: 1rem 0;
  position: relative;
}
.cs-divider:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e8f0;
}
.cs-divider span {
  position: relative;
  background: #ffffff;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
}
.cs-btn-sso {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: not-allowed;
}
.cs-badge-pill {
  font-size: 0.65rem;
  background: #e2e8f0;
  color: #475569;
  padding: 0.15rem 0.45rem;
  border-radius: 12px;
  margin-left: 0.35rem;
}
.cs-login-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* SUPPORT VIEW */
.cs-support-view {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}
.cs-view-nav {
  margin-bottom: 0.85rem;
}
.cs-back-btn {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6366f1;
  text-decoration: none;
}
.cs-support-card {
  padding: 1.25rem;
}
.cs-support-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.cs-support-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.cs-support-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}
.cs-support-subtitle {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0.2rem 0 0;
}
.cs-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 1.25rem 0.85rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  width: 100%;
}
.cs-dropzone-icon {
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}
.cs-dropzone-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}
.cs-dropzone-sub {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}
.cs-file-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #059669;
}
.cs-file-remove {
  color: #ef4444;
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: 0.35rem;
}
.cs-receipt {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 16px;
  padding: 1.25rem;
}
.cs-receipt-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #059669;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.cs-receipt-id {
  font-size: 1.15rem;
  font-weight: 800;
  color: #065f46;
  margin: 0 0 0.4rem;
}
.cs-receipt-text {
  font-size: 0.8rem;
  color: #047857;
  margin: 0 0 0.85rem;
  line-height: 1.4;
}
.cs-receipt-meta {
  font-size: 0.75rem;
  color: #065f46;
  border-top: 1px dashed #a7f3d0;
  padding-top: 0.65rem;
  display: flex;
  justify-content: space-between;
}

/* FOOTER */
.cs-footer {
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 1rem;
  margin-top: 2rem;
  width: 100%;
}
.cs-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #94a3b8;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cs-footer-demo {
  font-weight: 600;
  color: #64748b;
}

/* ----------------------------------------------------
 * SERVICE DETAIL VIEW & SERVICE HISTORY (Directive #052)
 * ---------------------------------------------------- */
.cs-service-detail-view {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.cs-detail-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.cs-breadcrumb-link {
  color: #6366f1;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.cs-breadcrumb-link:hover {
  text-decoration: underline;
}
.cs-breadcrumb-sep {
  color: #cbd5e1;
}
.cs-breadcrumb-current {
  color: #1e293b;
  font-weight: 600;
}

.cs-detail-hero {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 1.5rem;
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.25rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.cs-detail-hero-left {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  flex: 1;
  min-width: 280px;
}

.cs-detail-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.cs-detail-header-text {
  flex: 1;
}

.cs-detail-tag-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.cs-detail-type-tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #6366f1;
}

.cs-detail-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.5rem;
  word-break: break-all;
}

.cs-detail-explanation {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

.cs-detail-section {
  margin-top: 1.25rem;
}

.cs-detail-card {
  padding: 1.5rem;
}

.cs-card-header-clean {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cs-card-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.cs-card-section-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0.2rem 0 0;
}

.cs-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.cs-detail-field {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cs-field-key {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.cs-field-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  word-break: break-word;
}

.cs-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cs-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  transition: all 0.15s ease;
}
.cs-btn-action:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
.cs-btn-action-highlight {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}
.cs-btn-action-highlight:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
}
.cs-btn-action-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* History Timeline */
.cs-history-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-top: 0.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid #e2e8f0;
}

.cs-history-item {
  position: relative;
  margin-bottom: 1.25rem;
}
.cs-history-item:last-child {
  margin-bottom: 0;
}

.cs-history-dot {
  position: absolute;
  left: -1.95rem;
  top: 0.25rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6366f1;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px #c7d2fe;
}

.cs-history-content {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.cs-history-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.cs-history-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

.cs-history-date {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

.cs-history-desc {
  font-size: 0.82rem;
  color: #475569;
  margin: 0;
  line-height: 1.4;
}

/* History Polished Empty State (Directive #052 Mandatory) */
.cs-history-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px dashed #cbd5e1;
}

.cs-history-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.cs-history-empty-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.35rem;
}

.cs-history-empty-desc {
  font-size: 0.82rem;
  color: #64748b;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.4;
}

/* Mobile Responsive Tweaks for 390px */
@media (max-width: 480px) {
  .cs-hero-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .cs-hero-left {
    width: 100%;
  }
  .cs-company-name {
    font-size: 1.05rem;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.25;
  }
  .cs-detail-hero {
    padding: 1rem;
    flex-direction: column;
  }
  .cs-detail-hero-left {
    flex-direction: column;
    gap: 0.75rem;
  }
  .cs-detail-hero-right {
    width: 100%;
  }
  .cs-detail-hero-right .cs-quick-action-btn {
    width: 100%;
    justify-content: center;
  }
  .cs-detail-title {
    font-size: 1.25rem;
  }
  .cs-actions-bar .cs-btn-action {
    width: 100%;
    justify-content: center;
  }
}

/* Directive #064: Polished Customer Navigation Styles */
.cs-dashboard-nav {
  margin-bottom: 1rem;
}

.cs-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 0.35rem 0.45rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  width: fit-content;
}

.cs-nav-tab {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cs-nav-tab:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.6);
}

.cs-nav-tab.cs-nav-active {
  color: #1e293b;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

@media (max-width: 480px) {
  .cs-nav-tabs {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
    padding: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cs-nav-tab {
    flex: 1;
    text-align: center;
    font-size: 0.76rem;
    padding: 0.5rem 0.4rem;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

