/* MasterCadastre shared UI layer — beta5 */
:root{
  --mc-bg:#f4f6f8;
  --mc-surface:#ffffff;
  --mc-text:#1f2937;
  --mc-muted:#64748b;
  --mc-line:#e2e8f0;
  --mc-dark:#111827;
  --mc-blue:#2563eb;
  --mc-blue-soft:#eff6ff;
  --mc-radius:14px;
}
body{font-family:Inter,"Segoe UI",Arial,sans-serif!important;background:var(--mc-bg);color:var(--mc-text)}
.mc-product-switcher{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 20px;padding:7px;background:#eef2f6;border:1px solid #e2e8f0;border-radius:14px}
.mc-product-tab{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:0 13px;border-radius:10px;color:#475569!important;text-decoration:none!important;font-size:13px!important;font-weight:700;transition:.18s ease;background:transparent}
.mc-product-tab:hover{background:#fff;color:#111827!important;box-shadow:0 2px 10px #0f172a0b}
.mc-product-tab.active{background:#111827;color:#fff!important;box-shadow:0 5px 16px #1118271c}
.mc-product-tab .mc-external{font-size:12px;opacity:.7}
.mc-product-separator{width:1px;height:24px;background:#d8dee6;margin:0 2px}
.mc-soft-link{color:#2563eb!important}
@media(max-width:650px){.mc-product-switcher{align-items:stretch}.mc-product-tab{flex:1 1 auto;justify-content:center}.mc-product-separator{display:none}}

/* beta12 — Intuitive UI refresh */
:root{
  --mc-bg:#f6f8fb;
  --mc-surface:#ffffff;
  --mc-surface-soft:#f8fafc;
  --mc-text:#172033;
  --mc-muted:#64748b;
  --mc-line:#e2e8f0;
  --mc-line-strong:#cbd5e1;
  --mc-primary:#0f172a;
  --mc-primary-hover:#1e293b;
  --mc-accent:#2563eb;
  --mc-accent-soft:#eff6ff;
  --mc-success:#047857;
  --mc-success-soft:#ecfdf5;
  --mc-warning:#b45309;
  --mc-warning-soft:#fff7ed;
  --mc-danger:#b91c1c;
  --mc-danger-soft:#fef2f2;
  --mc-radius:16px;
  --mc-shadow:0 12px 34px rgba(15,23,42,.06);
}
html{background:var(--mc-bg)}
body{background:var(--mc-bg)!important;color:var(--mc-text)!important;font-family:Inter,"Segoe UI",Arial,sans-serif!important;font-size:15px;line-height:1.55}
.wrap{max-width:1180px!important;margin:28px auto!important;padding:18px!important}
.card{padding:28px!important;border:1px solid var(--mc-line)!important;border-radius:20px!important;box-shadow:var(--mc-shadow)!important;background:var(--mc-surface)!important}
h1,h2,h3{color:var(--mc-text);letter-spacing:-.025em}
h1{font-size:clamp(28px,3vw,38px);line-height:1.12}
h2{font-size:22px;line-height:1.25;margin:0 0 10px}
h3{font-size:17px;line-height:1.3}
p{line-height:1.6}
a{color:var(--mc-accent);text-underline-offset:3px}
a:hover{text-decoration:underline}

/* Header and product navigation */
.topbar{padding-bottom:18px;border-bottom:1px solid var(--mc-line);margin-bottom:18px!important}
.topbar-links{gap:6px!important}
.topbar-links>a,.topbar-links .link-button{padding:8px 10px!important;border-radius:9px!important;color:#475569!important;text-decoration:none!important;font-size:13px!important;font-weight:650!important}
.topbar-links>a:hover,.topbar-links .link-button:hover{background:#f1f5f9!important;color:#0f172a!important}
.account-chip{padding:8px 11px!important;background:#eef2ff!important;border-color:#c7d2fe!important;color:#3730a3!important;font-weight:750!important}
.mc-brand-mark{width:44px!important;height:44px!important;border-radius:12px!important;background:#0f172a!important;color:#fff!important;border-color:#0f172a!important;box-shadow:0 8px 18px rgba(15,23,42,.15)}
.mc-product-switcher{margin:0 0 20px!important;padding:6px!important;background:#f1f5f9!important;border-color:#e2e8f0!important;border-radius:14px!important;gap:4px!important;position:sticky;top:8px;z-index:20;box-shadow:0 8px 24px rgba(15,23,42,.04)}
.mc-product-tab{min-height:42px!important;padding:0 14px!important;font-size:13px!important;border-radius:10px!important}
.mc-product-tab.active{background:#0f172a!important;color:#fff!important}

/* Buttons and controls */
button,.button{min-height:44px!important;padding:10px 16px!important;border-radius:11px!important;font-size:14px!important;font-weight:750!important;line-height:1.25!important;box-shadow:none!important;transition:transform .15s ease,background .15s ease,border-color .15s ease!important}
button:hover,.button:hover{transform:translateY(-1px);text-decoration:none}
button:not(.link-button),.button{background:var(--mc-primary)!important;color:#fff!important}
button:not(.link-button):hover,.button:hover{background:var(--mc-primary-hover)!important}
.link-button{min-height:auto!important;background:none!important;color:var(--mc-accent)!important;padding:0!important}
input[type="text"],input[type="email"],input[type="password"],input[type="number"],input[type="date"],input[type="search"],select,textarea,input[type="file"]{font-size:14px!important}
input[type="text"],input[type="email"],input[type="password"],input[type="number"],input[type="date"],input[type="search"],select,textarea{border:1px solid var(--mc-line-strong)!important;border-radius:10px!important;background:#fff!important;color:var(--mc-text)!important;outline:none!important}
input:focus,select:focus,textarea:focus{border-color:#60a5fa!important;box-shadow:0 0 0 3px rgba(37,99,235,.12)!important}

/* Clear section hierarchy */
.section{margin-top:30px!important;padding-top:26px!important;border-top:1px solid var(--mc-line)!important}
.section>h2:first-child{margin-bottom:8px}
.box{padding:15px 17px!important;border-radius:12px!important;font-size:14px}
.ok{background:var(--mc-success-soft)!important;border-color:#a7f3d0!important;color:#065f46!important}
.warn{background:var(--mc-warning-soft)!important;border-color:#fed7aa!important;color:#9a3412!important}
.err{background:var(--mc-danger-soft)!important;border-color:#fecaca!important;color:#991b1b!important}

/* Home: primary actions */
.mc-start{margin:0 0 22px;padding:22px;border:1px solid #dbeafe;border-radius:16px;background:linear-gradient(135deg,#f8fbff 0%,#eff6ff 100%)}
.mc-start h2{margin:0 0 5px;font-size:22px}.mc-start>p{margin:0;color:#64748b}
.mc-start-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:16px}
.mc-start-card{display:block;padding:16px;border:1px solid #dbe4ef;border-radius:13px;background:#fff;color:#172033!important;text-decoration:none!important;transition:.15s ease}
.mc-start-card:hover{border-color:#93c5fd;box-shadow:0 8px 22px rgba(37,99,235,.08);transform:translateY(-1px)}
.mc-start-card strong{display:block;margin-bottom:4px;font-size:15px}.mc-start-card span{display:block;color:#64748b;font-size:13px;line-height:1.45}.mc-start-card b{display:inline-block;margin-top:11px;color:#2563eb;font-size:13px}

.upload{padding:30px!important;border:1.5px dashed #94a3b8!important;border-radius:16px!important;background:#f8fafc!important}
.upload strong{font-size:17px}.upload input[type=file]{max-width:100%;padding:9px;background:#fff;border:1px solid #e2e8f0!important;border-radius:10px}
.doc-grid{gap:14px!important}.doc-card,.diff-card{padding:16px!important;border-radius:13px!important;background:#f8fafc!important;border-color:#e2e8f0!important}
.diff-card strong,.doc-card strong{font-size:15px;color:#0f172a}
.summary-card,.metric,.batch-stat{border-radius:13px!important}
.data-table,.batch-table{font-size:13px!important}.data-table th,.batch-table th{background:#f8fafc!important;color:#475569!important}
.badge{font-size:12px!important;padding:4px 8px!important}
.download-grid{gap:8px!important}.download-grid .button{min-height:46px!important}

/* Authentication and narrow forms */
.auth-shell,.login-card,.register-card{max-width:520px;margin:auto}
label{font-weight:650;color:#334155}
.muted{color:#64748b!important;font-size:13px!important}

/* Better details/readability */
.tech-details{padding:13px!important;border:1px solid #e2e8f0;background:#f8fafc!important}.tech-details summary{font-size:14px}
.xsd-item,.geometry-item{padding:16px!important;border-radius:12px!important}.xsd-item-title,.geometry-title{font-size:15px!important}
.marker-note,.preview-help,.xsd-location,.geometry-location{font-size:12px!important}

@media(max-width:820px){
  .wrap{margin:0 auto!important;padding:10px!important}.card{padding:18px!important;border-radius:14px!important}
  .mc-start-grid{grid-template-columns:1fr}.topbar{align-items:flex-start!important}.topbar-links{width:100%}.topbar-links>a{background:#f8fafc}
  .mc-product-switcher{position:static}.mc-product-tab{flex:1 1 45%!important}
}
@media(max-width:520px){
  h1{font-size:27px}.mc-brand-mark{width:38px!important;height:38px!important;font-size:15px!important}.card{padding:14px!important}
  .mc-product-tab{flex:1 1 100%!important}.upload{padding:20px 12px!important}
}
body.auth-page .wrap{max-width:540px!important;margin:48px auto!important}
body.auth-page .card{padding:30px!important}
body.auth-page h1{font-size:30px}
body.auth-page input[type="text"],body.auth-page input[type="email"],body.auth-page input[type="password"]{width:100%;min-height:46px;padding:0 12px;margin-top:6px}
body.auth-page button,body.auth-page .button{width:100%;justify-content:center;text-align:center}
@media(max-width:600px){body.auth-page .wrap{margin:12px auto!important}}
.mc-flow-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:16px 0 20px}
.mc-flow-step{display:flex;gap:10px;align-items:flex-start;padding:12px 13px;border:1px solid #e2e8f0;border-radius:11px;background:#f8fafc}.mc-flow-step b{width:26px;height:26px;flex:0 0 auto;display:grid;place-items:center;border-radius:8px;background:#dbeafe;color:#1d4ed8;font-size:12px}.mc-flow-step span{font-size:12px;color:#64748b;line-height:1.45}.mc-flow-step strong{display:block;color:#172033;font-size:13px;margin-bottom:2px}
@media(max-width:700px){.mc-flow-steps{grid-template-columns:1fr}}
.mc-header-subtitle{margin:5px 0 0 56px;color:#64748b;font-size:13px;line-height:1.4}
@media(max-width:600px){.mc-header-subtitle{margin-left:0;margin-top:9px}}
