@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --morpho-dark: hsl(225 29% 32%);
  --morpho-medium: hsl(214 58% 42%);
  --morpho-light: hsl(205 52% 53%);
  --morpho-cyan: hsl(205 91% 83%);
  --background: hsl(225 29% 18%);
  --foreground: hsl(210 40% 98%);
  --surface: hsl(0 0% 100%);
  --surface-muted: hsl(210 40% 96%);
  --surface-neutral: hsl(214 32% 96%);
  --border: hsl(214.3 31.8% 91.4%);
  --border-strong: hsl(214 25% 80%);
  --shadow-color: rgba(15, 23, 42, 0.16);
  --shadow-strong: rgba(15, 23, 42, 0.24);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --gradient-primary: linear-gradient(135deg, var(--morpho-dark), var(--morpho-medium));
  --gradient-secondary: linear-gradient(135deg, var(--morpho-medium), var(--morpho-light));
  --gradient-accent: linear-gradient(135deg, var(--morpho-light), var(--morpho-cyan));
  --outline: rgba(148, 163, 184, 0.4);
  --info: hsl(213 94% 68%);
  --info-foreground: hsl(223 53% 18%);
  --success: hsl(142 76% 36%);
  --success-foreground: hsl(141 84% 96%);
  --warning: hsl(43 96% 56%);
  --warning-foreground: hsl(39 100% 16%);
  --error: hsl(0 84% 60%);
  --error-foreground: hsl(354 84% 96%);
  --thinking: hsl(262 83% 58%);
  --thinking-foreground: hsl(258 100% 96%);
}

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

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 20%, rgba(148, 196, 255, 0.28), transparent 55%),
              radial-gradient(circle at 80% 10%, rgba(124, 162, 255, 0.25), transparent 60%),
              var(--gradient-primary);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

main {
  display: block;
}

a {
  color: hsl(205 91% 83%);
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: hsl(205 91% 92%);
}

p {
  line-height: 1.6;
}

.container {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  position: relative;
  z-index: 1;
}

.header {
  text-align: center;
  color: var(--foreground);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.header h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.header .morpho-highlight {
  background-image: var(--gradient-accent);
  -webkit-background-clip: text;
  color: transparent;
}

.header p {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: rgba(255, 255, 255, 0.86);
  max-width: 42rem;
  margin: 0 auto;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.25rem);
  width: 100%;
}

.app-card {
  position: relative;
  background: var(--surface);
  color: hsl(222 47% 12%);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  text-align: left;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
  text-decoration: none;
  overflow: hidden;
}

.app-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(148, 196, 255, 0.16), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.app-card:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
  border-color: hsla(205, 91%, 83%, 0.7);
}

.app-card:hover::after {
  opacity: 1;
}

.app-card.logistics-card {
  border-top: 4px solid hsla(214, 58%, 42%, 0.8);
}

.app-card.hr-card {
  border-top: 4px solid hsla(262, 83%, 58%, 0.8);
}

.app-card.hr-inquiries-card {
  border-top: 4px solid hsla(142, 76%, 36%, 0.8);
}

.app-card.logistics-kb-card {
  border-top: 4px solid hsla(205, 91%, 70%, 0.85);
}

.app-card.invoice-card {
  border-top: 4px solid hsla(205, 52%, 53%, 0.85);
}

.app-icon {
  font-size: 2.75rem;
  margin-bottom: 1.25rem;
  display: inline-flex;
}

.app-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: hsl(221 39% 11%);
}

.app-description {
  color: hsl(215 20% 35%);
  font-size: 0.98rem;
}

.app-card .badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(148, 196, 255, 0.18);
  color: hsl(213 94% 32%);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.back-link {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  color: var(--foreground);
  text-decoration: none;
  font-size: 1rem;
  padding: 0.65rem 1.2rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  border: 1px solid rgba(148, 196, 255, 0.25);
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  z-index: 10;
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
}

.card-shadow, .chat-container, .morpho-surface {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
}

.chat-container {
  display: flex;
  flex-direction: column;
  min-height: 70vh;
  overflow: hidden;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface-muted);
}

.message {
  margin-bottom: 1.25rem;
  display: flex;
  animation: morpho-slide-in 0.3s ease;
}

.message:last-child {
  margin-bottom: 0;
}

.message.user {
  justify-content: flex-end;
}

.message.ai {
  justify-content: flex-start;
}

.message-content {
  max-width: min(95%, 900px);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  line-height: 1.6;
  font-size: 0.98rem;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
  border: 1px solid hsla(215, 32%, 85%, 0.5);
  background: var(--surface);
  color: hsl(222 47% 12%);
}

.message.user .message-content {
  background: var(--gradient-secondary);
  color: var(--foreground);
  border: none;
  box-shadow: 0 22px 45px rgba(37, 99, 235, 0.28);
}

.message.ai .message-content {
  background: var(--surface);
}

.message-content ul {
  margin: 0.75rem 0 0.75rem 1.15rem;
  padding: 0;
}

.message-content strong {
  color: hsl(214 58% 42%);
}

.input-area {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-group {
  display: flex;
  gap: 0.75rem;
}

input, textarea, select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  background: var(--surface);
  color: hsl(222 47% 12%);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: hsl(214 58% 42%);
  box-shadow: 0 0 0 3px rgba(124, 162, 255, 0.25);
}

textarea {
  resize: vertical;
}

button, .morpho-button {
  appearance: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.5rem;
  font-size: 0.98rem;
  line-height: 1;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, filter 0.2s ease;
  background: var(--gradient-secondary);
  color: var(--foreground);
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.28);
}

button:hover, .morpho-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.32);
  filter: brightness(1.05);
}

button:active, .morpho-button:active {
  transform: translateY(0);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.25);
}

button:disabled, .morpho-button:disabled {
  background: rgba(148, 163, 184, 0.4);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

button.secondary, .morpho-button.secondary {
  background: rgba(255, 255, 255, 0.85);
  color: hsl(214 58% 42%);
  border: 1px solid var(--border);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.12);
}

button.danger, .morpho-button.danger {
  background: linear-gradient(135deg, hsl(0 84% 60%), hsl(0 72% 48%));
  box-shadow: 0 16px 35px rgba(220, 38, 38, 0.3);
}

button.danger:hover, .morpho-button.danger:hover {
  box-shadow: 0 20px 45px rgba(220, 38, 38, 0.35);
}

.quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.quick-question {
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  background: rgba(148, 196, 255, 0.12);
  color: hsl(214 58% 42%);
  font-size: 0.9rem;
  border: 1px solid rgba(148, 196, 255, 0.35);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.quick-question:hover {
  background: var(--gradient-secondary);
  color: var(--foreground);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.status-entry {
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.4;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  border: 1px solid transparent;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.status-entry span:first-child {
  font-weight: 600;
  color: rgba(15, 23, 42, 0.65);
}

.status-info {
  background: rgba(148, 196, 255, 0.18);
  border-color: rgba(124, 162, 255, 0.4);
  color: hsl(213 47% 25%);
}

.status-success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: hsl(142 76% 25%);
}

.status-warning {
  background: rgba(250, 204, 21, 0.18);
  border-color: rgba(250, 204, 21, 0.45);
  color: hsl(39 100% 25%);
}

.status-error {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.38);
  color: hsl(0 65% 32%);
}

.status-thinking {
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(139, 92, 246, 0.45);
  color: hsl(262 60% 32%);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(148, 163, 184, 0.3);
  border-top-color: hsl(214 58% 42%);
  animation: spin 0.85s linear infinite;
}

.progress-bar {
  background: var(--gradient-secondary);
  height: 10px;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.morpho-table-wrapper {
  margin: 1rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  background: var(--surface);
}

.morpho-table-wrapper .morpho-table-summary {
  padding: 0.9rem 1.2rem;
  background: rgba(148, 196, 255, 0.16);
  border-top: 1px solid var(--border);
  color: hsl(213 47% 25%);
  font-weight: 600;
}

.morpho-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 800px;
}

.morpho-table thead th {
  background: var(--gradient-secondary);
  color: var(--foreground);
  text-align: left;
  padding: 0.85rem 0.95rem;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
  letter-spacing: 0.01em;
}

.morpho-table tbody tr {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.morpho-table tbody tr:nth-child(even) {
  background: var(--surface-neutral);
}

.morpho-table tbody tr:hover {
  background: rgba(148, 196, 255, 0.12);
}

.morpho-table td {
  padding: 0.75rem 0.95rem;
  color: hsl(222 47% 20%);
  max-width: 260px;
  word-break: break-word;
}

.morpho-alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  margin: 0.75rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.morpho-alert.info { background: rgba(148, 196, 255, 0.18); border-color: rgba(148, 196, 255, 0.4); color: var(--info-foreground);} 
.morpho-alert.success { background: rgba(34, 197, 94, 0.18); border-color: rgba(34, 197, 94, 0.4); color: var(--success-foreground);} 
.morpho-alert.warning { background: rgba(250, 204, 21, 0.2); border-color: rgba(250, 204, 21, 0.45); color: var(--warning-foreground);} 
.morpho-alert.error { background: rgba(248, 113, 113, 0.2); border-color: rgba(248, 113, 113, 0.45); color: var(--error-foreground);} 

.header-gradient {
  background: var(--gradient-primary);
  color: var(--foreground);
  box-shadow: 0 25px 55px rgba(15, 23, 42, 0.2);
}

.header-gradient .container {
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
}

.header-gradient h1 {
  color: var(--foreground);
  font-size: clamp(2.5rem, 4vw, 3.25rem);
}

.header-gradient p {
  color: rgba(255, 255, 255, 0.78);
}

.btn-primary {
  background: var(--gradient-secondary);
  color: var(--foreground);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.28);
  border: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.34);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.92);
  color: hsl(214 58% 42%);
  border: 1px solid var(--border);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.12);
}

.crew-card {
  cursor: pointer;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  min-width: 210px;
}

.crew-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 162, 255, 0.6);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.98);
}

.crew-card.selected {
  border-color: rgba(124, 162, 255, 0.9);
  background: rgba(148, 196, 255, 0.18);
  box-shadow: 0 25px 55px rgba(37, 99, 235, 0.2);
}

.thinking-step {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(167, 139, 250, 0.16);
  border-left: 4px solid var(--thinking);
  color: hsl(262 47% 25%);
  box-shadow: 0 14px 30px rgba(139, 92, 246, 0.18);
  animation: morpho-fade-in 0.35s ease;
}

#statusLog {
  max-height: 24rem;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.1rem;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06);
}

#statusLog::-webkit-scrollbar {
  width: 8px;
}

#statusLog::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.15);
  border-radius: 999px;
}

#statusLog::-webkit-scrollbar-thumb {
  background: rgba(124, 154, 195, 0.55);
  border-radius: 999px;
}

#statusLog::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 132, 178, 0.7);
}

.file-upload {
  border: 2px dashed rgba(148, 196, 255, 0.45);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  background: rgba(148, 196, 255, 0.12);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.file-upload:hover {
  border-color: rgba(124, 162, 255, 0.8);
  background: rgba(148, 196, 255, 0.18);
}

.invoice-display {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.invoice-display .invoice-header {
  background: var(--gradient-primary);
  color: var(--foreground);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.invoice-display h2 {
  margin: 0 0 0.35rem 0;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
}

.invoice-display .section-title {
  font-size: 1.1rem;
  color: hsl(222 47% 16%);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.invoice-display .line-items thead {
  background: rgba(148, 196, 255, 0.2);
}

.invoice-display .line-items th {
  color: hsl(214 58% 42%);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.invoice-display .line-items td {
  font-size: 0.95rem;
  color: hsl(222 47% 20%);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(148, 196, 255, 0.18);
  color: hsl(213 47% 25%);
  font-size: 0.82rem;
  font-weight: 600;
}

.badge-status.success {
  background: rgba(34, 197, 94, 0.16);
  color: hsl(142 76% 28%);
}

.badge-status.warning {
  background: rgba(250, 204, 21, 0.2);
  color: hsl(39 100% 24%);
}

.badge-status.error {
  background: rgba(248, 113, 113, 0.2);
  color: hsl(0 65% 34%);
}

.morpho-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(148, 196, 255, 0.16);
  color: hsl(214 58% 42%);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.morpho-breadcrumb {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  color: rgba(15, 23, 42, 0.55);
  font-size: 0.85rem;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.shadow-ring {
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14), inset 0 0 0 1px rgba(148, 196, 255, 0.25);
}

.mcp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(148, 196, 255, 0.16);
  border: 1px solid rgba(148, 196, 255, 0.35);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(12px);
}

.saudi-flag {
  display: inline-block;
  width: 30px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(to right, #006c35 0%, #006c35 33%, #ffffff 33%, #ffffff 66%, #006c35 66%, #006c35 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-left: 0.5rem;
}

@keyframes morpho-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes morpho-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .container {
    padding: 1.25rem;
  }

  .back-link {
    position: static;
    display: inline-flex;
    margin-bottom: 1.25rem;
  }

  .chat-container {
    min-height: 75vh;
  }

  .message-content {
    max-width: 100%;
  }

  .input-group {
    flex-direction: column;
  }

  button, .morpho-button {
    width: 100%;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }
}

.footer {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
}

.arabic-text {
  direction: rtl;
  text-align: right;
  font-family: 'Inter', 'Tahoma', 'Arial', sans-serif;
}

.arabic-text * {
  direction: rtl;
  text-align: inherit;
}

.text-right {
  text-align: right;
}

.morpho-body-copy {
  margin: 0.75rem 0;
  color: hsl(222 47% 22%);
  line-height: 1.6;
}

.morpho-body-copy.muted {
  color: rgba(15, 23, 42, 0.6);
}

.morpho-subheading {
  margin: 1rem 0 0.65rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: hsl(214 58% 42%);
}

.morpho-subheading.success {
  color: hsl(142 76% 36%);
}

.morpho-subheading.warning {
  color: hsl(39 100% 38%);
}

.morpho-list {
  margin: 0.75rem 0 0.75rem 1.25rem;
  padding-left: 1.25rem;
  color: hsl(222 47% 22%);
}

.morpho-list li {
  margin-bottom: 0.4rem;
}

.morpho-callout {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.1);
  margin: 0.9rem 0;
}

.morpho-callout.info {
  border-left: 4px solid hsl(214 58% 42%);
  background: rgba(148, 196, 255, 0.16);
}

.morpho-callout.success {
  border-left: 4px solid hsl(142 76% 36%);
  background: rgba(34, 197, 94, 0.16);
}

.morpho-callout h4 {
  margin: 0 0 0.6rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: hsl(214 58% 42%);
}

.morpho-callout.success h4 {
  color: hsl(142 76% 36%);
}

.morpho-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.morpho-pre {
  background: rgba(15, 23, 42, 0.06);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: hsl(222 47% 20%);
  border: 1px solid var(--border);
  white-space: pre-wrap;
}

.invoice-body {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background: var(--surface);
}

.invoice-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.invoice-info-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(148, 196, 255, 0.12);
}

.invoice-info-card .label {
  font-weight: 600;
  color: hsl(214 58% 42%);
}

.invoice-info-card .value {
  font-weight: 600;
  color: hsl(222 47% 24%);
}

.invoice-info-card.primary {
  border-left: 4px solid hsl(214 58% 42%);
  background: rgba(148, 196, 255, 0.2);
}

.invoice-summary {
  display: grid;
  gap: 1rem;
}

.invoice-summary .invoice-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(34, 197, 94, 0.12);
  color: hsl(142 76% 22%);
  font-weight: 600;
}

.invoice-summary .invoice-stat .label {
  color: hsl(214 58% 42%);
  font-weight: 600;
}

.invoice-summary .invoice-stat .value {
  font-size: 1.1rem;
}

.morpho-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.morpho-card.compact {
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
}

.morpho-card.surface-muted {
  background: var(--surface-muted);
}

.morpho-card.transparent {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
}

.morpho-card + .morpho-card {
  margin-top: 1.5rem;
}

.morpho-banner {
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  border: 1px solid transparent;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.14);
  margin-bottom: 1.5rem;
}

.morpho-banner.info {
  background: rgba(148, 196, 255, 0.18);
  border-color: rgba(148, 196, 255, 0.4);
  color: hsl(213 47% 20%);
}

.morpho-banner.success {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.45);
  color: hsl(142 70% 18%);
}

.morpho-banner.warning {
  background: rgba(250, 204, 21, 0.22);
  border-color: rgba(250, 204, 21, 0.5);
  color: hsl(39 100% 24%);
}

.morpho-banner.error {
  background: rgba(248, 113, 113, 0.22);
  border-color: rgba(248, 113, 113, 0.5);
  color: hsl(0 75% 28%);
}

.morpho-form {
  display: grid;
  gap: 1.25rem;
}

.morpho-field-group {
  display: grid;
  gap: 0.6rem;
}

.morpho-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: hsl(214 58% 42%);
}

.morpho-file-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.morpho-file-row input[type="file"] {
  padding: 0.75rem 1rem;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: rgba(148, 196, 255, 0.12);
  cursor: pointer;
  flex: 1 1 auto;
}

.morpho-file-row input[type="file"]:hover {
  border-color: rgba(124, 162, 255, 0.7);
  background: rgba(148, 196, 255, 0.2);
}

.morpho-meta-grid {
  display: grid;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: hsl(222 47% 25%);
}

.morpho-meta-grid strong {
  color: hsl(214 58% 42%);
}

.morpho-stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.morpho-tagline {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.morpho-divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

.morpho-highlight {
  background: rgba(148, 196, 255, 0.18);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: hsl(214 58% 42%);
  font-weight: 600;
}
