/*
  Meridian Talent House shared design foundation.
  Phase 1 keeps this intentionally broad and low-risk: shared tokens,
  consistent controls, mobile-safe layout helpers, and dashboard polish.
*/

:root {
  --mth-black: #111111;
  --mth-ink: #1f1f1f;
  --mth-muted: #6f6b68;
  --mth-soft-muted: #8a8580;
  --mth-border: #e4ded7;
  --mth-border-strong: #cdbf9b;
  --mth-paper: #faf8f4;
  --mth-surface: #ffffff;
  --mth-panel: #f6f1e8;
  --mth-gold: #9d7a24;
  --mth-danger: #a83232;
  --mth-focus: rgba(17, 17, 17, 0.2);
  --mth-radius: 0;
  --mth-font-ui: "DM Sans", Arial, sans-serif;
  --mth-font-display: "Playfair Display", Georgia, serif;
  --mth-content: 1280px;
  --mth-shadow: 0 22px 60px rgba(17, 17, 17, 0.08);

  --black: var(--mth-black);
  --ink: var(--mth-ink);
  --muted: var(--mth-muted);
  --line: var(--mth-border);
  --paper: var(--mth-paper);
  --off-white: var(--mth-paper);
  --white: var(--mth-surface);
  --soft: var(--mth-panel);
  --accent: var(--mth-gold);
  --danger: var(--mth-danger);
}

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

html {
  min-width: 0;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}

:focus-visible {
  outline: 3px solid rgba(91, 124, 255, 0.72);
  outline-offset: 3px;
}

[hidden],
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.button,
button,
input[type="submit"] {
  min-height: 44px;
}

input,
select,
textarea {
  min-height: 44px;
  max-width: 100%;
}

textarea {
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  min-height: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--mth-black);
}

.card,
.panel,
.auth-card,
.login-panel,
.detail-panel,
.dashboard-card,
.message-panel,
.form-panel,
.profile-panel {
  background: var(--mth-surface);
  border-color: var(--mth-border);
}

.workspace,
.main,
.dashboard-main,
.content,
.page-content {
  min-width: 0;
}

.status-pill,
.badge,
.tag {
  white-space: nowrap;
}

.mth-panel {
  background: var(--mth-surface);
  border: 1px solid var(--mth-border);
  padding: clamp(20px, 3vw, 36px);
}

.mth-kicker {
  color: var(--mth-gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.mth-muted {
  color: var(--mth-muted);
}

@media (max-width: 1180px) {
  .nav-links {
    gap: 18px;
  }

  nav {
    padding-inline: 30px;
  }
}

@media (max-width: 980px) {
  .app-shell,
  .dashboard,
  .portal-shell,
  .admin-shell,
  .client-shell,
  .talent-shell {
    display: block !important;
  }

  .sidebar,
  .side-nav {
    position: relative !important;
    width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    padding: 18px 20px !important;
  }

  .sidebar nav,
  .side-nav nav,
  .sidebar .nav-list {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .sidebar a,
  .side-nav a,
  .sidebar button {
    flex: 0 0 auto;
  }

  .main,
  .workspace,
  .dashboard-main,
  .page-main {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 28px 20px !important;
  }

  .two-column,
  .three-column,
  .split-layout,
  .dashboard-grid,
  .profile-grid,
  .matching-grid,
  .client-dashboard-grid,
  .talent-dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 720px) {
  nav {
    height: 64px;
    padding-inline: 20px;
  }

  .nav-logo {
    max-width: 72vw;
    line-height: 1.35;
  }

  .page-hero,
  .hero {
    padding-inline: 24px !important;
  }

  h1,
  .page-title {
    overflow-wrap: anywhere;
  }

  .auth-shell,
  .login-shell {
    padding: 24px 16px !important;
  }

  .auth-card,
  .login-panel {
    width: min(100%, 520px) !important;
    padding: 28px 22px !important;
  }

  .form-grid,
  .wizard-grid,
  .details-grid,
  .photo-grid,
  .cards-grid,
  .calendar-grid {
    grid-template-columns: 1fr !important;
  }

  .button-row,
  .actions,
  .form-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  button,
  .button,
  .nav-cta,
  input[type="submit"] {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .main,
  .workspace,
  .dashboard-main,
  .page-main {
    padding: 22px 14px !important;
  }

  .mth-panel,
  .card,
  .panel,
  .auth-card,
  .login-panel {
    padding: 18px !important;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }
}
