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

:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef4fb;
  --text: #101828;
  --muted: #647084;
  --line: #dae4f0;
  --brand: #1167d8;
  --brand-dark: #0b4faa;
  --nav: #0f1724;
  --green: #16865a;
  --amber: #b86800;
  --shadow: 0 18px 48px rgba(15, 23, 42, .08);
  font-family: Manrope, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); min-width: 320px; font-weight: 600; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app { min-height: 100vh; width: 100%; display: block; }
.sidebar { background: var(--nav); color: #eef4ff; padding: 24px; display: flex; flex-direction: column; gap: 24px; position: fixed; inset: 0 auto 0 0; width: 280px; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img, .brand span { width: 48px; height: 48px; border-radius: 10px; background: #fff; color: #111827; display: grid; place-items: center; font-weight: 900; object-fit: contain; box-shadow: 0 10px 24px rgba(0,0,0,.16); }
.brand strong, .brand small { display: block; }
.brand small { color: #b6c2d2; margin-top: 3px; }
.nav { display: grid; gap: 8px; }
.nav a, .logout button { width: 100%; min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: #eef4ff; display: flex; align-items: center; gap: 10px; padding: 0 13px; font-weight: 800; }
.nav a::before, .logout button::before { content: ""; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background-color: rgba(255,255,255,.08); background-repeat: no-repeat; background-position: center; background-size: 15px; flex: 0 0 24px; }
.nav a[data-icon="dashboard"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
.nav a[data-icon="cases"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7h16v13H4z'/%3E%3Cpath d='M8 7V5h8v2'/%3E%3C/svg%3E"); }
.nav a[data-icon="documents"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 3h7l5 5v13H7z'/%3E%3Cpath d='M14 3v6h6'/%3E%3C/svg%3E"); }
.nav a[data-icon="templates"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 6h14M5 12h14M5 18h14'/%3E%3Cpath d='m4 6 1 1 2-3M4 12l1 1 2-3M4 18l1 1 2-3'/%3E%3C/svg%3E"); }
.nav a[data-icon="definitions"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='6' cy='7' r='2'/%3E%3Ccircle cx='18' cy='7' r='2'/%3E%3Ccircle cx='12' cy='17' r='2'/%3E%3Cpath d='M8 8.5 11 15M16 8.5 13 15'/%3E%3C/svg%3E"); }
.nav a[data-icon="consultants"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3 20c1-4 4-6 6-6s5 2 6 6'/%3E%3Cpath d='M16 11a3 3 0 1 0 0-6'/%3E%3Cpath d='M18 20c-.4-2-1.2-3.5-2.5-4.5'/%3E%3C/svg%3E"); }
.nav a[data-icon="radar"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 12 18 8'/%3E%3Cpath d='M12 4v3M12 17v3M4 12h3M17 12h3'/%3E%3C/svg%3E"); }
.nav a[data-icon="tags"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 13 11 4H4v7l9 9z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1'/%3E%3C/svg%3E"); }
.nav a[data-icon="vizzy"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z'/%3E%3Cpath d='M19 16l.8 2.2L22 19l-2.2.8L19 22l-.8-2.2L16 19l2.2-.8z'/%3E%3C/svg%3E"); }
.nav a[data-icon="finance"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3v18'/%3E%3Cpath d='M17 7c0-2-2-3-5-3S7 5 7 7s2 3 5 3 5 1 5 3-2 4-5 4-5-2-5-4'/%3E%3C/svg%3E"); }
.nav a[data-icon="messages"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E"); }
.nav a[data-icon="mail"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E"); }
.nav a[data-icon="calendar"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16'/%3E%3C/svg%3E"); }
.nav a[data-icon="portal"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12h11'/%3E%3Cpath d='m12 8 4 4-4 4'/%3E%3Cpath d='M19 5v14'/%3E%3C/svg%3E"); }
.nav a[data-icon="settings"]::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a8 8 0 0 0 .1-6l-2.2-.4-1-2-2 .8a8 8 0 0 0-4.6 0l-2-.8-1 2-2.2.4a8 8 0 0 0 .1 6l2.1.4 1 2 2-.8a8 8 0 0 0 4.6 0l2 .8 1-2z'/%3E%3C/svg%3E"); }
.logout button::before { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d9e7ff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 17 5 12l5-5'/%3E%3Cpath d='M5 12h12'/%3E%3Cpath d='M15 4h4v16h-4'/%3E%3C/svg%3E"); }
.nav a:hover, .logout button:hover { background: #1c2a40; }
.logout { margin: 0; }
.menu-toggle { display: none; }
.main { min-width: 0; margin-left: 280px; padding: 28px; display: grid; gap: 22px; align-content: start; }
.topbar { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(420px, 1.25fr); align-items: end; gap: 18px; }
.topbar h1 { margin: 0; }
.topbar-actions { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; align-items: center; gap: 10px; }
.search { width: 100%; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; color: var(--muted); }
.search input { border: 0; box-shadow: none; min-height: 42px; padding: 0; }
.search input:focus { box-shadow: none; }
.notification-wrap { position: relative; }
.notification-button { min-height: 42px; min-width: 48px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-weight: 900; position: relative; }
.notification-button span { position: absolute; right: -6px; top: -7px; min-width: 20px; height: 20px; border-radius: 999px; background: #b42318; color: #fff; display: grid; place-items: center; font-size: 11px; }
.notification-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, 90vw); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 24px 70px rgba(15,23,42,.2); z-index: 40; padding: 12px; display: grid; gap: 8px; }
.notification-panel a { display: grid; gap: 3px; color: var(--text); border-bottom: 1px solid var(--line); padding: 8px 0; }
.notification-panel a:last-child { border-bottom: 0; }
.notification-panel small { color: var(--muted); }
.panel, .metrics article, .metric-card, .install-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.flash { padding: 12px 14px; background: #e8f7ee; border: 1px solid #bae6c8; border-radius: 8px; font-weight: 700; }
.flash.error, .error { color: #b42318; background: #fff1f0; border-color: #ffccc7; }
.success { color: #137a4b; background: #ecfdf3; border: 1px solid #b7ebc6; border-radius: 8px; padding: 10px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(26px, 3vw, 38px); margin-bottom: 10px; }
h2 { font-size: 19px; margin-top: 18px; }
.eyebrow { margin-bottom: 8px; color: var(--brand); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; }
.form-note { color: var(--muted); line-height: 1.5; min-height: 42px; }
.dashboard-intro { display: flex; justify-content: space-between; align-items: end; gap: 18px; }
.dashboard-intro h1 { margin-bottom: 7px; }
.dashboard-intro p { color: var(--muted); margin: 0; }
.sync-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 800; white-space: nowrap; }
.sync-status span { width: 8px; height: 8px; border-radius: 999px; background: #1dbb68; box-shadow: 0 0 0 4px rgba(29,187,104,.12); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metrics small { color: var(--muted); font-weight: 800; }
.metrics strong { display: block; font-size: 26px; margin-top: 6px; color: var(--text); }
.metric-card { color: var(--text); transition: transform .15s ease, border-color .15s ease; }
.metric-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.premium-metrics .metric-card { position: relative; min-height: 126px; padding: 18px 18px 18px 86px; overflow: hidden; }
.premium-metrics .metric-card i { position: absolute; left: 18px; top: 20px; width: 48px; height: 48px; border-radius: 14px; background-color: #edf5ff; background-repeat: no-repeat; background-position: center; background-size: 24px; }
.premium-metrics .metric-card em { display: block; margin-top: 6px; color: var(--muted); font-style: normal; font-size: 12px; }
.premium-metrics .metric-card b { position: absolute; right: 18px; bottom: 16px; width: 72px; height: 24px; opacity: .95; background-repeat: no-repeat; background-size: 100% 100%; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 90 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 23 C16 12 20 18 31 10 S47 22 58 9 72 14 88 4' stroke='%231167d8' stroke-width='3' fill='none'/%3E%3C/svg%3E"); }
.metric-blue i { background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231167d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6.5A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5v11a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 4 17.5z'/%3E%3Cpath d='M8 9h8M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.metric-green i { background-color: #e8f7ee !important; background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2316a163' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='m8.5 12 2.2 2.2L15.8 9'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: center !important; background-size: 24px !important; }
.metric-green b { background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 90 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 22 C14 13 19 18 30 12 S45 25 57 9 73 15 88 6' stroke='%2316a163' stroke-width='3' fill='none'/%3E%3C/svg%3E") !important; }
.metric-purple i { background-color: #f2e9ff !important; background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238b3ff2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 4h8M8 20h8M9 4c0 4 6 4 6 8s-6 4-6 8M15 4c0 4-6 4-6 8s6 4 6 8'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: center !important; background-size: 24px !important; }
.metric-purple b { background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 90 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 23 C14 9 23 17 32 13 S45 22 57 8 72 16 88 11' stroke='%238b3ff2' stroke-width='3' fill='none'/%3E%3C/svg%3E") !important; }
.metric-orange i { background-color: #fff0df !important; background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='4' y='6' width='16' height='12' rx='2'/%3E%3Cpath d='M16 10h4v4h-4a2 2 0 0 1 0-4Z'/%3E%3Cpath d='M7 9h6'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: center !important; background-size: 24px !important; }
.metric-orange b { background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 90 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 22 C16 11 24 20 34 15 S49 25 60 10 73 16 88 5' stroke='%23f97316' stroke-width='3' fill='none'/%3E%3C/svg%3E") !important; }
.radar-summary { display: grid; grid-template-columns: minmax(320px, 1.1fr) repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; align-items: stretch; width: 100%; }
.radar-hero, .radar-mini { border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); color: var(--text); padding: 16px; }
.radar-hero { background: linear-gradient(135deg, #0f1724, #173c71); color: #fff; display: grid; gap: 5px; min-height: 116px; }
.radar-hero span, .radar-hero small { color: #c7d7ee; font-weight: 800; }
.radar-hero strong { font-size: 24px; }
.radar-mini { display: grid; align-content: center; gap: 4px; }
.radar-mini strong, .radar-mini span { display: block; }
.radar-mini span { color: var(--muted); font-size: 13px; font-weight: 800; }
.radar-mini.is-open, .radar-card.is-open { border-color: #b7ebc6; background: #f0fbf4; }
.pipeline-row { display: grid; grid-template-columns: minmax(130px, .7fr) 1fr 42px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pipeline-row:last-child { border-bottom: 0; }
.pipeline-row em { font-style: normal; font-weight: 900; color: var(--brand); text-align: right; }
.progress { height: 10px; background: var(--surface-soft); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--brand); }
.task { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 10px; background: #fbfdff; }
.task strong, .task small { display: block; }
.task small { color: var(--muted); margin-top: 4px; }
.status-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 10px; border-radius: 999px; background: #e9f2ff; color: #0b4faa; font-weight: 900; font-size: 12px; }
.form-grid, .editor-form { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; visibility: visible !important; opacity: 1 !important; }
label { display: grid; gap: 7px; color: var(--muted); font-weight: 800; font-size: 13px; }
.editor-form label, .editor-form input, .editor-form select, .editor-form textarea, .editor-form .form-actions { display: grid !important; visibility: visible !important; opacity: 1 !important; }
.checkbox-line { display: flex !important; align-items: center; gap: 9px; }
.checkbox-line input { width: auto; min-height: auto; }
.check-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; min-height: 44px; background: #fff; color: var(--text); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(17, 103, 216, .12); }
textarea { min-height: 96px; resize: vertical; }
.wide { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; }
.primary, .button, .list-row button { border: 0; border-radius: 8px; min-height: 42px; padding: 0 14px; font-weight: 900; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.primary { background: var(--brand); color: #fff; box-shadow: 0 10px 20px rgba(17, 103, 216, .18); }
.primary:hover { background: var(--brand-dark); }
.button, .list-row button { background: #eef3f8; color: var(--text); border: 1px solid var(--line); }
.danger { color: #b42318; background: #fff1f0; border-color: #ffccc7; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.grid-two { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; }
.grid-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.calendar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.calendar-day { min-height: 180px; }
.appointment { border-left: 4px solid var(--brand); padding: 10px 0 10px 12px; margin-bottom: 10px; }
.appointment strong, .appointment small { display: block; }
.appointment small { color: var(--muted); margin-top: 4px; }
.inline-actions { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.inline-actions input { min-width: 220px; }
.inline-actions input[type="file"] { min-width: 260px; background: #fff; }
.import-actions { align-items: center; padding: 12px 0 16px; border-top: 1px solid var(--line); }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.doc-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 12px 0; background: #fbfdff; }
.template-list { display: grid; gap: 10px; }
.template-card { border: 1px solid var(--line); border-radius: 8px; padding: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fbfdff; color: var(--text); }
.template-card:hover { border-color: var(--brand); background: #f2f7ff; }
.template-card strong, .template-card span { display: block; }
.template-card span { color: var(--muted); font-size: 13px; font-weight: 800; }
.consultant-card { border: 1px solid var(--line); border-radius: 8px; padding: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fbfdff; }
.consultant-card strong, .consultant-card span { display: block; }
.consultant-card span { color: var(--muted); font-size: 13px; margin-top: 4px; }
.radar-layout { grid-template-columns: 1.15fr .85fr; }
.radar-card { border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; padding: 14px; display: grid; gap: 12px; }
.radar-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.radar-card-head strong, .radar-card-head span { display: block; }
.radar-card-head span { color: var(--muted); margin-top: 4px; font-size: 13px; font-weight: 800; }
.radar-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.radar-meta span { border-radius: 999px; background: #eef3f8; color: var(--muted); padding: 5px 9px; font-size: 12px; font-weight: 900; }
.radar-scope-note { margin: 0; border: 1px solid #f3d29b; background: #fff7e6; color: #6f4200; border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.45; }
.radar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.radar-actions form { display: inline-flex; margin: 0; }
.radar-open-button { background: #eaf8ef; color: #11633f; border-color: #b7ebc6; }
.delete-form { margin-top: 12px; }
.row-actions { white-space: nowrap; min-width: 500px; }
.row-actions .button, .row-actions form { display: inline-flex; margin: 3px 4px 3px 0; vertical-align: middle; }
.row-actions form { margin: 3px 4px 3px 0; }
.map-panel { overflow: hidden; }
.world-map { position: relative; min-height: 330px; border-radius: 10px; background: radial-gradient(circle at 50% 50%, rgba(125, 190, 255, .18), transparent 34%), linear-gradient(135deg, #071f3d, #0f5598); overflow: hidden; }
.world-map::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 58px 58px; opacity: .5; }
.world-map::after { content: "AMERİKA  AVRUPA  ASYA"; position: absolute; left: 8%; right: 8%; top: 48%; color: rgba(255,255,255,.11); font-size: clamp(28px, 6vw, 92px); font-weight: 900; letter-spacing: .18em; text-align: center; transform: translateY(-50%); }
.world-map svg { display: none; }
.map-dot { position: absolute; width: 18px; height: 18px; transform: translate(-50%, -50%); border-radius: 999px; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: pulse 1.6s infinite; display: grid; place-items: center; color: var(--brand); font-size: 10px; font-weight: 900; z-index: 2; }
.map-dot em { font-style: normal; }
.map-dot strong { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); white-space: nowrap; color: #fff; font-size: 11px; text-shadow: 0 2px 8px rgba(0,0,0,.42); }
@keyframes pulse { 70% { box-shadow: 0 0 0 18px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.doc-preview { margin: 12px 0; }
.doc-preview img, .doc-preview iframe { width: 100%; max-height: 360px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); object-fit: contain; }
.doc-preview iframe { min-height: 320px; }
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.58); display: none; place-items: start center; padding: 28px; z-index: 20; overflow-y: auto; }
.modal.open { display: grid; }
.modal-dialog { width: min(920px, 100%); max-height: calc(100vh - 56px); overflow-y: auto; background: #fff; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.26); padding: 22px; }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.portal-shell { display: grid; gap: 18px; }
.portal-hero {
  min-height: 220px;
  border-radius: 10px;
  padding: 24px;
  color: #fff;
  display: grid;
  align-content: end;
  background:
    linear-gradient(90deg, rgba(10, 39, 73, .92), rgba(17, 103, 216, .72)),
    url("https://images.unsplash.com/photo-1488646953014-85cb44e25828?auto=format&fit=crop&w=1400&q=80") center/cover;
  box-shadow: var(--shadow);
}
.portal-hero .eyebrow { color: #dbeafe; }
.portal-hero h1 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 8px; }
.portal-stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.step { border: 1px solid var(--line); background: #fff; border-radius: 8px; min-height: 76px; display: grid; align-content: center; gap: 4px; padding: 12px; box-shadow: var(--shadow); }
.step strong { color: var(--muted); }
.step.complete { background: #eaf8ef; border-color: #b7ebc6; color: #11633f; }
.portal-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.portal-cards small, .portal-cards strong { display: block; }
.portal-cards small { color: var(--muted); font-weight: 800; }
.portal-cards strong { margin-top: 5px; font-size: 22px; }
.timeline { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.timeline-step { min-width: 150px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; display: grid; gap: 8px; }
.timeline-step span { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: #eef3f8; color: var(--muted); font-weight: 900; }
.timeline-step.done { border-color: #b7ebc6; background: #f0fbf4; }
.timeline-step.done span { background: #16865a; color: #fff; }
.tag-list { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; max-width: 180px; }
.tag { display: inline-flex; border-radius: 999px; background: #fff7e6; color: #92400e; padding: 4px 9px; font-size: 12px; font-weight: 900; }
.smart-alert-panel { padding: 16px 20px; }
.smart-alert-panel .panel-heading { margin-bottom: 10px; }
.smart-alert-panel h2 { margin: 0 0 3px; }
.smart-alert-panel .form-note { min-height: 0; margin: 0; font-size: 13px; }
.alert-see-all { min-height: 34px; padding: 0 10px; margin-left: auto; font-size: 12px; }
.alert-count { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 5px 11px; border-radius: 999px; background: #fff7e6; color: #9a5800; font-weight: 900; white-space: nowrap; }
.alert-list { display: grid; gap: 8px; }
.alert-list article { border-left: 4px solid #b86800; background: #fff7e6; border-radius: 8px; padding: 10px 12px; font-weight: 800; }
.compact-alerts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; max-height: none; overflow: visible; padding-right: 0; }
.compact-alerts article { display: grid; grid-template-columns: 28px 1fr; align-items: center; width: auto; max-width: 100%; min-height: 72px; border-left: 0; border: 1px solid #ffd6d2; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.35; color: #b42318; background: #fff4f3; }
.compact-alerts article span { grid-row: span 2; width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; border: 2px solid currentColor; font-size: 11px; font-weight: 900; }
.compact-alerts article strong, .compact-alerts article small { display: block; min-width: 0; overflow-wrap: anywhere; }
.compact-alerts article small { color: currentColor; opacity: .82; }
.portal-directory { display: grid; gap: 12px; }
.portal-directory-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; padding: 15px; }
.portal-directory-card strong, .portal-directory-card span, .portal-directory-card small { display: block; }
.portal-directory-card span { color: var(--muted); margin-top: 4px; }
.portal-directory-card small { color: var(--muted); margin-top: 4px; font-weight: 800; }
.portal-directory-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.vizzy-widget { position: fixed; right: 22px; bottom: 22px; z-index: 30; }
.vizzy-launcher { border: 0; border-radius: 999px; min-width: 86px; min-height: 48px; background: var(--brand); color: #fff; font-weight: 900; box-shadow: 0 18px 42px rgba(17, 103, 216, .28); cursor: pointer; }
.vizzy-panel { width: min(360px, calc(100vw - 28px)); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 70px rgba(15, 23, 42, .2); overflow: hidden; margin-bottom: 12px; }
.vizzy-head { display: flex; align-items: center; justify-content: space-between; padding: 13px; background: #0f1724; color: #fff; }
.vizzy-head strong, .vizzy-head small { display: block; }
.vizzy-head small { color: #b6c2d2; }
.vizzy-head button { border: 1px solid #334155; border-radius: 7px; background: transparent; color: #fff; min-height: 34px; padding: 0 10px; }
.vizzy-messages { display: grid; gap: 8px; max-height: 260px; overflow-y: auto; padding: 13px; }
.vizzy-messages p { margin: 0; padding: 10px; border-radius: 8px; background: #f3f7fc; line-height: 1.45; }
.vizzy-quick { display: grid; gap: 7px; padding: 0 13px 13px; }
.vizzy-quick button { border: 1px solid var(--line); border-radius: 8px; background: #fff; min-height: 36px; padding: 7px 10px; text-align: left; font-weight: 800; cursor: pointer; }
.vizzy-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; border-top: 1px solid var(--line); padding: 13px; }
.vizzy-form button { border: 0; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 900; padding: 0 12px; }
.auth-body {
  min-height: 100vh;
  min-height: 100svh;
  background:
    linear-gradient(90deg, rgba(8, 28, 58, .84), rgba(17, 103, 216, .62)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1800&q=80") center/cover;
  background-attachment: fixed;
}
.auth-body .app { display: block; min-height: 100vh; }
.auth-body .main { min-height: 100vh; min-height: 100svh; width: 100%; max-width: 100vw; margin-left: 0; display: grid; place-items: center; padding: 28px; overflow-x: hidden; overflow-y: auto; }
.auth-body .login-wrap { min-height: auto; width: 100%; padding: 0; }
.login-wrap, .install-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-box { width: min(440px, 100%); }
.login-card {
  background: #fff;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 10px;
  padding: 26px;
  box-shadow: 0 30px 80px rgba(3, 15, 35, .28);
}
.login-brandline { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.login-brandline img, .login-brandline span {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f3f7fc;
  color: #0f1724;
  display: grid;
  place-items: center;
  font-weight: 950;
  object-fit: contain;
}
.login-brandline strong, .login-brandline small { display: block; }
.login-brandline small { color: #94a3b8; margin-top: 2px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.auth-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}
.auth-tabs button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.auth-form { display: none; gap: 12px; }
.auth-form.active { display: grid; }
.login-hint { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 16px 0 0; text-align: center; }
.login-grid { display: block; }
.login-grid .panel {
  min-height: 0;
  display: block;
  box-shadow: none;
  border: 0;
  padding: 0;
}
.login-grid .primary { width: 100%; margin-top: 4px; }
.install-card { width: min(760px, 100%); }

@media (max-width: 800px) {
  html, body { width: 100%; overflow-x: hidden; }
  .app { grid-template-columns: 1fr; }
  .sidebar { width: 100%; min-width: 0; padding: 14px 12px; position: static; height: auto; overflow: hidden; gap: 14px; }
  .brand { min-width: 0; }
  .brand > div { min-width: 0; }
  .brand strong, .brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .menu-toggle { display: block; min-height: 42px; border: 1px solid #334155; border-radius: 8px; background: #172236; color: #fff; font-weight: 900; }
  .nav { display: none; gap: 6px; }
  body.menu-open .nav { display: grid; }
  .nav a, .logout button { min-height: 40px; }
  .main { width: 100%; max-width: 100vw; margin-left: 0; padding: 12px; overflow-x: clip; overflow-y: visible; gap: 14px; }
  .panel, .metric-card, .metrics article, .doc-card, .task, .radar-card, .radar-hero, .radar-mini { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; padding: 15px; border-radius: 10px; }
  .topbar { display: grid; align-items: stretch; }
  .topbar, .topbar-actions, .search, .topbar-actions .primary { width: 100%; grid-template-columns: 1fr; }
  .notification-panel { left: 0; right: auto; width: calc(100vw - 32px); }
  .metrics, .form-grid, .editor-form, .grid-two, .grid-three, .calendar-grid, .portal-stepper, .portal-cards, .login-grid, .login-box, .radar-summary, .radar-layout { grid-template-columns: 1fr; }
  .dashboard-intro { display: grid; align-items: start; }
  .dashboard-intro h1 { font-size: 28px; }
  .sync-status { white-space: normal; }
  .premium-metrics { gap: 10px; }
  .premium-metrics .metric-card { min-height: 112px; padding: 16px 14px 16px 74px; }
  .premium-metrics .metric-card i { left: 14px; top: 17px; width: 44px; height: 44px; border-radius: 12px; background-size: 22px; }
  .premium-metrics .metric-card b { width: 58px; right: 14px; bottom: 14px; opacity: .7; }
  .metrics strong { font-size: 24px; }
  .compact-alerts { grid-template-columns: 1fr; }
  .compact-alerts article { min-height: 64px; }
  .panel-heading, .modal-header { display: grid; }
  .modal { padding: 12px; }
  .auth-body { background-attachment: fixed; background-position: center; }
  .auth-body .main { place-items: center; padding: 18px; min-height: 100svh; }
  .auth-body .login-wrap { min-height: auto; padding: 0; }
  .login-card { padding: 22px; }
  .login-grid .panel { min-height: auto; }
  .wide { grid-column: auto; }
  input, select, textarea, .button, .primary { max-width: 100%; min-width: 0; }
  input[type="file"] { width: 100%; max-width: 100%; min-width: 0; font-size: 13px; }
  .inline-actions { display: grid; align-items: stretch; width: 100%; }
  .inline-actions input, .inline-actions input[type="file"] { min-width: 0; }
  .pipeline-row { grid-template-columns: 1fr; }
  .world-map { min-height: 220px; }
  .table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 640px; }
  th, td { padding: 10px; font-size: 13px; white-space: normal; word-break: normal; }
  .cases-table { min-width: 0; border-collapse: separate; border-spacing: 0 12px; }
  .cases-table thead { display: none; }
  .cases-table, .cases-table tbody, .cases-table tr, .cases-table td { display: block; width: 100%; }
  .cases-table tr { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px; box-shadow: 0 10px 26px rgba(15, 23, 42, .06); }
  .cases-table td { border: 0; padding: 8px 0; }
  .cases-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; margin-bottom: 3px; }
  .row-actions { display: grid; min-width: 0; white-space: normal; }
  .row-actions .button, .row-actions form { display: grid; margin: 0 0 8px; }
  .tag-list { max-width: none; }
  .template-card, .consultant-card, .radar-card-head, .radar-actions { display: grid; align-items: start; }
  .radar-actions form, .radar-actions .button { width: 100%; }
  .radar-summary { gap: 10px; }
  .radar-hero { min-height: 100px; }
  .radar-mini { min-height: 76px; }
  .portal-shell, .portal-hero, .portal-directory, .portal-directory-card, .portal-directory-card > div, .portal-directory-meta, .portal-cards > *, .portal-stepper > *, .timeline, .timeline-step, .grid-three > *, .grid-two > * { min-width: 0; max-width: 100%; width: 100%; }
  .portal-hero { min-height: 190px; padding: 18px; overflow: hidden; background-position: center; }
  .portal-hero h1 { font-size: 31px; line-height: 1.1; }
  .portal-hero h1, .portal-hero p, .portal-directory-card strong, .portal-directory-card span, .portal-directory-card small, .portal-cards strong, .panel p, .doc-card strong, .radar-card strong, .radar-card span { overflow-wrap: anywhere; word-break: normal; }
  .portal-directory-card, .portal-directory-meta { display: grid; justify-content: stretch; width: 100%; }
  .portal-directory-card { gap: 12px; }
  .portal-directory-meta { grid-template-columns: 1fr; }
  .portal-directory-meta .status-pill, .status-pill { justify-content: center; width: 100%; white-space: normal; text-align: center; }
  .timeline { display: grid; overflow: visible; padding-bottom: 0; }
  .timeline-step { min-width: 0; grid-template-columns: 32px 1fr; align-items: center; }
  .timeline-step strong { min-width: 0; overflow-wrap: anywhere; }
  .map-dot strong { display: none; }
  .vizzy-widget { left: 12px; right: 12px; bottom: 12px; display: grid; justify-items: end; }
  .vizzy-panel { width: 100%; max-width: calc(100vw - 24px); }
  .vizzy-form { grid-template-columns: 1fr; }
  .vizzy-launcher { width: auto; min-width: 86px; }
  .modal-dialog { padding: 16px; }
  .primary, .button, .list-row button { width: 100%; }
}
