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

:root {
  color-scheme: light;
  font-family: var(--font-sans);
  color: #182018;
  background: #f6f7f2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --forest: #173f32;
  --forest-dark: #0d2d24;
  --lime: #c8f463;
  --lime-soft: #ebfac8;
  --ink: #17201b;
  --muted: #707870;
  --line: #dfe3da;
  --brand: #33507e;
  --brand-strong: #233a5e;
  --brand-weak: #eef1f7;
  --brand-ring: rgba(51, 80, 126, 0.22);
  --border: #e6e9f1;
  --border-strong: #d4dbe6;
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "Manrope", "Inter", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  background: #f6f7f2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(500px, 1.05fr);
  min-height: 100vh;
}

.story-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: 46px clamp(42px, 5.8vw, 88px);
  color: #172033;
  background: #fff;
  isolation: isolate;
}

.brand,
.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.login-eximbee-logo,
.mobile-login-logo {
  display: inline-flex;
  width: fit-content;
  align-items: center;
}

.login-eximbee-logo {
  padding: 4px 0;
}

.login-eximbee-logo img {
  display: block;
  width: 158px;
  height: auto;
}

.mobile-login-logo {
  display: none;
  align-self: flex-start;
  margin-bottom: 44px;
}

.mobile-login-logo img {
  display: block;
  width: 150px;
  height: auto;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 31px;
  height: 31px;
  transform: rotate(-8deg);
}

.brand-mark span {
  position: absolute;
  width: 15px;
  height: 25px;
  border-radius: 12px 12px 4px 12px;
  background: var(--lime);
}

.brand-mark span:first-child {
  bottom: 1px;
  left: 2px;
  transform: rotate(-28deg);
}

.brand-mark span:last-child {
  top: 0;
  right: 2px;
  transform: rotate(28deg);
}

.brand-light {
  color: #fff;
}

.story-content {
  max-width: 610px;
  margin: auto 0;
  padding: 72px 0 52px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 27px;
  color: #53709e;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #176de5;
  box-shadow: 0 0 0 5px rgba(23, 109, 229, 0.1);
}

.story-content h1 {
  max-width: 580px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(48px, 5vw, 76px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.057em;
}

.story-content h1 span {
  display: block;
  color: #176de5;
}

.story-content > p {
  max-width: 490px;
  margin: 27px 0 0;
  color: #69758a;
  font-size: 17px;
  line-height: 1.72;
}

.feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 34px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #7a8494;
  font-size: 13px;
}

.feature strong {
  display: block;
  margin-bottom: 2px;
  color: #1d2738;
  font-size: 13px;
  font-weight: 600;
}

.feature-icon {
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  border: 1px solid var(--brand-weak);
  border-radius: 13px;
  color: #176de5;
  background: #f2f6fd;
}

.feature-icon svg {
  width: 20px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.story-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
  color: #7e899b;
  font-size: 13px;
}

.form-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 38px clamp(34px, 6vw, 110px) 28px;
  background:
    radial-gradient(circle at 90% 5%, rgba(203, 236, 162, 0.15), transparent 24%),
    #f8f9f5;
}

.mobile-brand {
  display: none;
  align-self: flex-start;
  margin-bottom: 45px;
  color: var(--forest);
}

.form-shell {
  width: min(100%, 438px);
  margin: auto 0;
}

.form-header {
  margin-bottom: 37px;
}

.welcome-pill {
  display: inline-flex;
  align-items: center;
  height: 27px;
  margin-bottom: 19px;
  padding: 0 12px;
  border-radius: 99px;
  color: #315d48;
  background: #e5f3dd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.form-header h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 39px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.form-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 20px;
}

.auth-loading {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: #5f6962;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label {
  color: #344039;
  font-size: 13px;
  font-weight: 600;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap input {
  width: 100%;
  height: 54px;
  padding: 0 48px 0 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.input-wrap input::placeholder {
  color: #a3aaa3;
}

.input-wrap input:focus {
  border-color: #477960;
  box-shadow: 0 0 0 4px rgba(62, 113, 86, 0.1);
}

.input-icon {
  position: absolute;
  z-index: 1;
  left: 17px;
  width: 19px;
  stroke: #89918a;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.password-toggle {
  position: absolute;
  z-index: 2;
  right: 9px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #7f8981;
  background: transparent;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.password-toggle:hover {
  color: var(--forest);
  background: #f0f4ee;
}

.password-toggle svg {
  width: 19px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: -3px;
  font-size: 13px;
}

.form-options a {
  color: #295c46;
  font-weight: 700;
}

.form-options a:hover,
.signup-copy a:hover,
.signup-copy button:hover,
.legal-copy a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.checkbox-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #5f6962;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.custom-checkbox {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #c9cfc7;
  border-radius: 5px;
  background: #fff;
  pointer-events: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.custom-checkbox svg {
  width: 13px;
  opacity: 0;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: scale(0.65);
  transition: opacity 150ms ease, transform 150ms ease;
}

.checkbox-label input:checked + .custom-checkbox {
  border-color: var(--forest);
  background: var(--forest);
}

.checkbox-label input:checked + .custom-checkbox svg {
  opacity: 1;
  transform: scale(1);
}

.checkbox-label input:focus-visible + .custom-checkbox {
  box-shadow: 0 0 0 4px rgba(62, 113, 86, 0.12);
}

.submit-button {
  display: flex;
  width: 100%;
  height: 54px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.submit-button {
  margin-top: 4px;
  border: 1px solid var(--forest);
  color: #fff;
  background: var(--forest);
  box-shadow: 0 12px 24px rgba(23, 63, 50, 0.15);
}

.submit-button svg {
  width: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.submit-button:hover:not(:disabled) {
  background: var(--forest-dark);
  box-shadow: 0 14px 28px rgba(23, 63, 50, 0.2);
  transform: translateY(-1px);
}

.submit-button:hover:not(:disabled) svg {
  transform: translateX(3px);
}

.submit-button:disabled {
  border-color: #9aab9f;
  background: #9aab9f;
  box-shadow: none;
  cursor: not-allowed;
}

.login-error {
  margin: -4px 0;
  padding: 11px 13px;
  border: 1px solid #f1c7c7;
  border-radius: 11px;
  color: #9f2f2f;
  background: #fff2f2;
  font-size: 13px;
  font-weight: 600;
}

.success-message {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: -4px;
  padding: 11px 13px;
  border: 1px solid #cfe8c6;
  border-radius: 11px;
  color: #30613e;
  background: #edf8e9;
  font-size: 13px;
  font-weight: 600;
}

.success-message span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #4c8a5c;
}

.success-message svg {
  width: 13px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.signup-copy {
  margin: 28px 0 0;
  color: #747d75;
  text-align: center;
  font-size: 13px;
}

.signup-copy a,
.signup-copy button {
  margin-left: 5px;
  padding: 0;
  border: 0;
  color: #255943;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.legal-copy {
  width: min(100%, 480px);
  margin-top: auto;
  padding-top: 28px;
  color: #949b94;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}

.legal-copy a {
  color: #6f786f;
  font-weight: 600;
}

@media (max-width: 1050px) {
  .login-page {
    grid-template-columns: minmax(360px, 0.85fr) minmax(460px, 1.15fr);
  }

  .story-panel {
    padding-inline: 42px;
  }

  .story-content h1 {
    font-size: 51px;
  }

  .feature-row {
    display: grid;
  }
}

@media (max-width: 800px) {
  .login-page {
    display: block;
  }

  .story-panel {
    display: none;
  }

  .form-panel {
    min-height: 100svh;
    justify-content: flex-start;
    padding: 30px clamp(22px, 7vw, 54px) 24px;
  }

  .mobile-brand {
    display: inline-flex;
  }

  .mobile-login-logo {
    display: inline-flex;
  }

  .form-shell {
    margin: auto 0;
    padding: 24px 0 42px;
  }
}

@media (max-width: 480px) {
  .mobile-brand {
    margin-bottom: 24px;
    font-size: 21px;
  }

  .brand-mark {
    transform: scale(0.9) rotate(-8deg);
    transform-origin: left center;
  }

  .form-shell {
    padding-top: 15px;
  }

  .form-header {
    margin-bottom: 30px;
  }

  .form-header h2 {
    font-size: 30px;
  }

  .form-header p {
    font-size: 13px;
    line-height: 1.6;
  }

  .form-options {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Workspace */

.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.workspace-shell {
  --sidebar-width: 272px;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  color: #172033;
  background: #f4f6fa;
  font-family: var(--font-sans);
  transition: grid-template-columns 180ms ease;
}

.workspace-shell.sidebar-collapsed {
  --sidebar-width: 82px;
}

.workspace-sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 100vh;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #fff;
  box-shadow: 5px 0 18px rgba(31, 44, 76, 0.025);
}

.sidebar-brand-row {
  display: flex;
  height: 72px;
  flex: 0 0 72px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px 0 29px;
  border-bottom: 1px solid var(--border);
}

.eximbee-logo {
  display: flex;
  align-items: center;
  min-width: 133px;
  transition: opacity 140ms ease, width 140ms ease;
}

.eximbee-logo img {
  display: block;
  width: 133px;
  height: auto;
}

.sidebar-toggle,
.mobile-menu-button,
.notification-button,
.message-button {
  display: grid;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.sidebar-toggle {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  color: #52698c;
}

.sidebar-toggle:hover {
  color: var(--brand);
  background: var(--brand-weak);
}

.sidebar-toggle svg,
.mobile-menu-button svg,
.notification-button svg,
.message-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-nav {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 25px 13px 24px;
  scrollbar-width: thin;
  scrollbar-color: #dce1eb transparent;
}

.nav-section-label {
  display: block;
  min-height: 20px;
  margin: 0 14px 8px;
  overflow: hidden;
  color: #7688a8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.account-label {
  margin-top: 21px;
}

.sidebar-link {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 41px;
  align-items: center;
  gap: 13px;
  padding: 8px 13px;
  border: 0;
  border-radius: 8px;
  color: #1b2434;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: color 140ms ease, background 140ms ease;
}

.sidebar-link::before {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: -13px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
  content: "";
  opacity: 0;
}

.sidebar-link:hover {
  color: var(--brand);
  background: var(--brand-weak);
}

.sidebar-link.active {
  color: var(--brand);
  background: var(--brand-weak);
}

.sidebar-link.active::before {
  opacity: 1;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-chevron {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 150ms ease;
}

.nav-chevron.rotated {
  transform: rotate(-90deg);
}

.agenda-toggle .nav-chevron {
  transform: rotate(-90deg);
}

.agenda-toggle .nav-chevron.rotated {
  transform: rotate(0);
}

.agenda-submenu {
  display: grid;
  gap: 2px;
  margin: 1px 0 5px 31px;
  padding-left: 9px;
  border-left: 1px solid var(--border);
}

.agenda-submenu .sidebar-link {
  min-height: 36px;
  padding-block: 6px;
  color: #536076;
  font-size: 13px;
}

.agenda-submenu .sidebar-link::before {
  left: -41px;
}

.agenda-submenu .nav-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.logout-link {
  color: #343b49;
}

.logout-link:hover {
  color: #bd3445;
  background: #fff4f5;
}

.workspace-shell.sidebar-collapsed .sidebar-brand-row {
  justify-content: center;
  padding-inline: 12px;
}

.workspace-shell.sidebar-collapsed .eximbee-logo,
.workspace-shell.sidebar-collapsed .nav-text,
.workspace-shell.sidebar-collapsed .nav-chevron,
.workspace-shell.sidebar-collapsed .nav-section-label {
  display: none;
}

.workspace-shell.sidebar-collapsed .sidebar-nav {
  padding-inline: 13px;
}

.workspace-shell.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding-inline: 0;
}

.workspace-shell.sidebar-collapsed .sidebar-link::before {
  left: -13px;
}

.workspace-shell.sidebar-collapsed .agenda-submenu {
  display: none;
}

.workspace-main {
  min-width: 0;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px clamp(24px, 3vw, 46px);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.topbar-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-title-wrap h1 {
  margin: 2px 0 0;
  color: #182033;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.mobile-menu-button {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  color: #526174;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.notification-button,
.message-button {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #5f687a;
  background: #fff;
}

.notification-button > span,
.message-button > span {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--brand);
}

.workspace-content {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: clamp(24px, 3vw, 42px);
}

.welcome-card {
  position: relative;
  display: flex;
  min-height: 205px;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  overflow: hidden;
  padding: 42px clamp(28px, 4vw, 56px);
  border: 1px solid var(--border);
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 20%, rgba(120, 150, 220, 0.22), transparent 26%),
    radial-gradient(circle at 72% 110%, rgba(82, 160, 221, 0.14), transparent 37%),
    linear-gradient(135deg, #1f3358, #2f4a7c 62%, #3c5994);
  box-shadow: 0 18px 45px rgba(28, 44, 82, 0.16);
}

.welcome-card::after {
  position: absolute;
  top: -84px;
  right: -20px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(255, 255, 255, 0.025),
    0 0 0 86px rgba(255, 255, 255, 0.018);
  content: "";
}

.welcome-card > * {
  position: relative;
  z-index: 1;
}

.dashboard-eyebrow {
  color: #8ea6d7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

/* Şirket öğrenme eğrisi (minimal sparkline) */

.learning-card {
  padding: 16px 20px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(37, 49, 77, 0.04);
}

.learning-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.learning-eyebrow {
  color: #97a0b2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.learning-header h2 {
  margin: 4px 0 0;
  color: #28324a;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.learning-score {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.learning-score strong {
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.learning-score span {
  color: #9aa3b2;
  font-size: 12px;
}

.learning-spark {
  display: block;
  width: 100%;
  height: 56px;
  margin-top: 10px;
  overflow: visible;
}

.learning-area {
  fill: rgba(65, 105, 223, 0.07);
  stroke: none;
}

.learning-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.welcome-card h2,
.module-hero h2 {
  margin: 10px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(29px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.welcome-card p {
  max-width: 600px;
  margin: 0;
  color: #bdc9e1;
  font-size: 14px;
  line-height: 1.65;
}

.primary-action {
  display: inline-flex;
  height: 48px;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 0 19px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #1d315a;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(8, 25, 63, 0.15);
  cursor: pointer;
}

.primary-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.metric-card {
  display: flex;
  min-height: 137px;
  align-items: center;
  gap: 17px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(45, 57, 87, 0.035);
}

.metric-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 13px;
}

.metric-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-blue {
  color: #446fe4;
  background: #edf2ff;
}

.metric-purple {
  color: #7559da;
  background: #f2efff;
}

.metric-orange {
  color: #d88635;
  background: #fff3e7;
}

.metric-green {
  color: #29936e;
  background: #e9f8f2;
}

.metric-card > div {
  display: grid;
  gap: 3px;
}

.metric-card span {
  color: #7d8697;
  font-size: 12px;
  font-weight: 600;
}

.metric-card strong {
  color: #20283a;
  font-family: var(--font-display);
  font-size: 27px;
  letter-spacing: -0.04em;
}

.metric-card small {
  color: #9aa1ad;
  font-size: 11px;
}

.metric-card .trend-up {
  color: #3a9673;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.75fr);
  gap: 20px;
  margin-top: 22px;
}

.panel-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(45, 57, 87, 0.035);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 17px;
}

.panel-heading h3 {
  margin: 0 0 5px;
  color: #222a3b;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: -0.02em;
}

.panel-heading p {
  margin: 0;
  color: #9aa1ad;
  font-size: 12px;
}

.panel-heading button {
  border: 0;
  color: #526fe0;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.activity-list {
  border-top: 1px solid var(--border);
}

.activity-row {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto 78px;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 10px;
  color: #5d70d9;
  background: #f0f2ff;
}

.activity-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.activity-row > div {
  display: grid;
  gap: 4px;
}

.activity-row strong {
  overflow: hidden;
  color: #333b4b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-row > div span,
.activity-row time {
  color: #9aa1ad;
  font-size: 11px;
}

/* Durum rozetleri (.status-badge / .status-pill / .mail-status) için ortak
   kurumsal stil aşağıda, tablo bölümünde tanımlıdır. */

.quick-actions {
  display: grid;
  gap: 2px;
  padding: 0 14px 15px;
}

.quick-actions button {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 12px;
  padding: 12px 10px;
  border: 0;
  border-radius: 11px;
  color: #30394b;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.quick-actions button:hover {
  background: #f6f8fc;
}

.quick-actions button > span {
  display: grid;
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: #596cce;
  background: #eef1ff;
}

.quick-actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-actions strong {
  font-size: 12px;
}

.quick-actions small {
  color: #9ba2af;
  font-size: 11px;
}

.module-page {
  min-height: calc(100vh - 72px);
}

.module-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 25px 29px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}

.module-icon {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  border-radius: 17px;
  color: #5a6ee1;
  background: #eef1ff;
}

.module-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module-hero h2 {
  margin: 5px 0;
  color: #20283a;
  font-size: 27px;
}

.module-hero p {
  margin: 0;
  color: #8b94a3;
  font-size: 12px;
}

.empty-module {
  display: grid;
  min-height: 430px;
  margin-top: 20px;
  place-items: center;
  align-content: center;
  padding: 40px;
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.empty-illustration {
  position: relative;
  display: grid;
  width: 98px;
  height: 98px;
  margin-bottom: 19px;
  place-items: center;
  border-radius: 30px;
  color: #6073d8;
  background: #edf0ff;
  transform: rotate(-5deg);
}

.empty-illustration::before,
.empty-illustration::after {
  position: absolute;
  border-radius: 50%;
  background: #ccd4ff;
  content: "";
}

.empty-illustration::before {
  top: -9px;
  right: -15px;
  width: 25px;
  height: 25px;
}

.empty-illustration::after {
  bottom: 5px;
  left: -19px;
  width: 15px;
  height: 15px;
}

.empty-illustration svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-module h3 {
  margin: 0 0 8px;
  color: #2c3547;
  font-family: var(--font-display);
  font-size: 19px;
}

.empty-module p {
  max-width: 440px;
  margin: 0;
  color: #929baa;
  font-size: 12px;
  line-height: 1.7;
}

.empty-module button {
  height: 40px;
  margin-top: 19px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Buyer analysis */

.buyer-analysis-page {
  display: grid;
  gap: 20px;
  min-height: calc(100vh - 72px);
}

.buyer-analysis-intro,
.buyer-results-card,
.buyer-detail-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(42, 54, 83, 0.045);
}

.buyer-analysis-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 24px 27px;
}

.buyer-intro-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  color: var(--brand);
  background: #eef1ff;
}

.buyer-intro-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.buyer-analysis-intro h2 {
  margin: 0 0 5px;
  color: #242e42;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: -0.035em;
}

.buyer-analysis-intro p {
  margin: 0;
  color: #7e899c;
  font-size: 12px;
  line-height: 1.65;
}

.buyer-intro-summary {
  display: grid;
  min-width: 120px;
  gap: 3px;
  padding: 13px 16px;
  border: 1px solid var(--brand-weak);
  border-radius: 13px;
  background: #f7f9ff;
  text-align: right;
}

.buyer-intro-summary strong {
  color: #4262cc;
  font-family: var(--font-display);
  font-size: 24px;
}

.buyer-intro-summary span {
  color: #8994a8;
  font-size: 11px;
}

.buyer-results-card,
.buyer-detail-card {
  overflow: hidden;
}

.buyer-results-header,
.buyer-detail-header,
.buyer-contact-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.buyer-results-header {
  padding: 22px 25px;
  border-bottom: 1px solid var(--border);
}

.buyer-results-header h3,
.buyer-detail-header h3 {
  margin: 5px 0 3px;
  color: #293348;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.025em;
}

.buyer-results-header p,
.buyer-detail-header p {
  margin: 0;
  color: #8b95a6;
  font-size: 12px;
  line-height: 1.55;
}

.buyer-table-wrap {
  overflow-x: auto;
}

.buyer-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.buyer-table th {
  padding: 13px 18px;
  color: #8995aa;
  background: #fafbfd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.buyer-table th:first-child {
  width: 90px;
}

.buyer-table th:nth-child(2) {
  width: 29%;
}

.buyer-table th:nth-child(3) {
  width: 18%;
}

.buyer-table th:nth-child(4) {
  width: 17%;
}

.buyer-table th:nth-child(5) {
  width: 15%;
}

.buyer-table th:last-child {
  width: 90px;
}

.buyer-table td {
  padding: 15px 18px;
  border-top: 1px solid var(--border);
  color: #4a5569;
  font-size: 12px;
  line-height: 1.45;
  vertical-align: middle;
}

.buyer-table tbody tr {
  cursor: pointer;
  transition:
    background 150ms ease,
    box-shadow 150ms ease;
}

.buyer-table tbody tr:hover {
  background: #f8faff;
}

.buyer-table tbody tr.selected {
  background: #f0f4ff;
  box-shadow: inset 3px 0 #526ee1;
}

.buyer-score {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 50%;
  color: #536ee0;
  background: #e9edff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
}

.buyer-company-cell {
  display: grid;
  gap: 4px;
}

.buyer-company-cell strong {
  color: #293348;
  font-size: 12px;
}

.buyer-company-cell span {
  color: #8d97a8;
  font-size: 11px;
}

.buyer-code-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.buyer-code-list code {
  padding: 4px 6px;
  border-radius: 6px;
  color: #536075;
  background: var(--border);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
}

.buyer-match-status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.buyer-match-status.high {
  color: #147847;
  background: #dff6e9;
}

.buyer-match-status.medium {
  color: #18777a;
  background: #ddf5f4;
}

.buyer-action-cell {
  text-align: right;
}

.buyer-action-cell button {
  height: 31px;
  padding: 0 11px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  color: var(--brand);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.buyer-action-cell button:hover {
  border-color: var(--brand);
  background: #f3f5ff;
}

.buyer-detail-header {
  padding: 24px 25px;
  border-bottom: 1px solid var(--border);
}

.buyer-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.buyer-detail-actions button {
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--brand);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.buyer-detail-actions button:hover {
  background: #435acb;
}

.buyer-list-message {
  margin: 16px 25px 0;
  padding: 10px 12px;
  border: 1px solid #cfe8d8;
  border-radius: 9px;
  color: #30734d;
  background: #eef9f2;
  font-size: 12px;
  font-weight: 600;
}

.buyer-detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 22px 25px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #e7ebf2;
  gap: 1px;
}

.buyer-detail-meta > div {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 15px 16px;
  background: #fafbfd;
}

.buyer-detail-meta span {
  color: #909aab;
  font-size: 11px;
}

.buyer-detail-meta strong {
  color: #354055;
  font-size: 12px;
  line-height: 1.5;
}

.buyer-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding: 20px 25px;
}

.buyer-insight-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fcfdff;
}

.buyer-insight-icon {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #edf1ff;
}

.buyer-insight-icon::before,
.buyer-insight-icon::after {
  position: absolute;
  content: "";
}

.buyer-insight-icon.target::before {
  width: 13px;
  height: 13px;
  border: 2px solid var(--brand);
  border-radius: 50%;
}

.buyer-insight-icon.target::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand);
}

.buyer-insight-icon.box::before {
  width: 14px;
  height: 13px;
  border: 2px solid var(--brand);
  border-radius: 3px;
}

.buyer-insight-icon.box::after {
  top: 10px;
  width: 8px;
  border-top: 2px solid var(--brand);
}

.buyer-insight-icon.chart::before {
  bottom: 9px;
  left: 9px;
  width: 4px;
  height: 8px;
  border-radius: 2px 2px 0 0;
  background: var(--brand);
  box-shadow: 6px -5px var(--brand), 12px -10px var(--brand);
}

.buyer-insight-icon.check::before {
  width: 15px;
  height: 8px;
  border-bottom: 2px solid var(--brand);
  border-left: 2px solid var(--brand);
  transform: rotate(-45deg) translate(1px, -2px);
}

.buyer-insight-card h4 {
  margin: 1px 0 6px;
  color: #3a4558;
  font-family: var(--font-display);
  font-size: 12px;
}

.buyer-insight-card p {
  margin: 0;
  color: #737f91;
  font-size: 12px;
  line-height: 1.65;
}

.buyer-contact-panel {
  margin: 0 25px 25px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.buyer-contact-panel > header {
  padding: 15px 17px;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
}

.buyer-contact-panel h4 {
  margin: 4px 0 0;
  color: #344055;
  font-family: var(--font-display);
  font-size: 13px;
}

.buyer-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.buyer-contact-item {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 15px 17px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.buyer-contact-item:nth-child(2n) {
  border-right: 0;
}

.buyer-contact-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.buyer-contact-icon {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: #6073d5;
  background: #eef1ff;
}

.buyer-contact-icon::before {
  color: currentColor;
  font-size: 13px;
  font-weight: 800;
}

.buyer-contact-icon.globe::before {
  content: "◎";
}

.buyer-contact-icon.phone::before {
  content: "☎";
  font-size: 13px;
}

.buyer-contact-icon.mail::before {
  content: "✉";
}

.buyer-contact-icon.linkedin::before {
  content: "in";
  font-size: 12px;
}

.buyer-contact-icon.pin::before {
  content: "\2302";
}

.buyer-contact-item > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.buyer-contact-item span {
  color: #929cad;
  font-size: 11px;
}

.buyer-contact-item strong {
  overflow: hidden;
  color: #3c475a;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fairs */

.fairs-page {
  min-height: calc(100vh - 72px);
  container-type: inline-size;
}

.fairs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.fairs-search {
  position: relative;
  display: flex;
  width: min(440px, 100%);
  align-items: center;
}

.fairs-search svg {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  stroke: #8792a5;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.fairs-search input,
.fairs-country-filter,
.fairs-sector-filter {
  height: 43px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  color: #354055;
  background: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
}

.fairs-search input {
  width: 100%;
  padding: 0 15px 0 43px;
}

.fairs-country-filter,
.fairs-sector-filter {
  min-width: 190px;
  padding: 0 12px;
}

.fairs-date-range {
  display: flex;
  align-items: center;
  gap: 7px;
}

.fairs-date-range input,
.fairs-date-range button {
  height: 43px;
  border: 1px solid var(--border);
  border-radius: 11px;
  font-family: var(--font-sans);
  font-size: 13px;
}

.fairs-date-range input {
  min-width: 132px;
  padding: 0 9px;
  color: #354055;
  background: #fff;
}

.fairs-date-range > span {
  color: #8b95a7;
}

.fairs-date-range button {
  padding: 0 14px;
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
}

.fairs-date-range button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.fairs-search input:focus,
.fairs-country-filter:focus,
.fairs-sector-filter:focus,
.fairs-date-range input:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(65, 105, 223, 0.09);
}

.fairs-workspace {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(42, 54, 83, 0.045);
}

.fairs-list-panel {
  min-width: 0;
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
}

.fairs-list-heading {
  display: flex;
  min-height: 75px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.fairs-list-heading h2 {
  margin: 0 0 4px;
  color: #283144;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.fairs-list-heading span {
  color: #8e97a6;
  font-size: 12px;
}

.fairs-list {
  max-height: calc(100vh - 230px);
  min-height: 615px;
  overflow-y: auto;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.fair-list-card {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 67px minmax(0, 1fr);
  gap: 14px;
  padding: 15px 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #2e384b;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.fair-list-card + .fair-list-card {
  margin-top: 5px;
}

.fair-list-card:hover {
  background: #f4f7fc;
}

.fair-list-card.active {
  border-color: var(--brand-weak);
  background: #f0f4ff;
  box-shadow: 0 7px 20px rgba(65, 105, 223, 0.065);
}

.fair-list-card.active::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: -1px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #4e70e2;
  content: "";
}

.fair-date-block {
  display: grid;
  min-height: 70px;
  place-items: center;
  align-content: center;
  border: 1px solid var(--brand-weak);
  border-radius: 12px;
  background: #fff;
}

.fair-date-block strong {
  color: #3559c7;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
}

.fair-date-block span {
  margin-top: 4px;
  color: #52627d;
  font-size: 12px;
  font-weight: 700;
}

.fair-date-block small {
  margin-top: 2px;
  color: #9aa2af;
  font-size: 11px;
}

.fair-card-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 7px;
}

.fair-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.fair-card-title-row strong {
  min-width: 0;
  overflow: hidden;
  color: #2d3749;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fair-card-title-row > span {
  flex: 0 0 auto;
  color: #8490a3;
  font-size: 11px;
}

.fair-card-description {
  display: -webkit-box;
  overflow: hidden;
  color: #747f91;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.fair-card-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8490a3;
  font-size: 12px;
}

.fair-card-location svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fairs-empty {
  display: grid;
  min-height: 400px;
  place-items: center;
  align-content: center;
  padding: 30px;
  color: #939cab;
  text-align: center;
}

.fairs-empty svg {
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  stroke: #8797ba;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.fairs-empty strong {
  margin-bottom: 5px;
  color: #4a5569;
  font-size: 13px;
}

.fairs-empty span {
  font-size: 12px;
}

.fair-detail-panel {
  min-width: 0;
  overflow-y: auto;
  padding: clamp(24px, 3vw, 38px);
}

.fair-detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 27px;
  border-bottom: 1px solid var(--border);
}

.fair-detail-date {
  display: grid;
  width: 87px;
  height: 87px;
  flex: 0 0 87px;
  place-items: center;
  align-content: center;
  border-radius: 18px;
  color: #fff;
  background: #3559c7;
}

.fair-detail-date strong {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
}

.fair-detail-date span {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 700;
}

.fair-detail-date small {
  margin-top: 2px;
  color: #dce4ff;
  font-size: 11px;
}

.fair-detail-hero h2 {
  margin: 2px 0 8px;
  color: #222c3f;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.3vw, 30px);
  letter-spacing: -0.04em;
  overflow-wrap: break-word;
  word-break: break-word;
}

.fair-detail-hero p {
  max-width: 650px;
  margin: 0;
  color: #717d90;
  font-size: 13px;
  line-height: 1.7;
}

.fair-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin: 22px 0;
}

.fair-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafbfd;
}

.fair-detail-item > span {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 10px;
  color: #526fd4;
  background: #edf1ff;
}

.fair-detail-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fair-detail-item > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.fair-detail-item small {
  color: #929baa;
  font-size: 11px;
}

.fair-detail-item strong {
  overflow: hidden;
  color: #3c4659;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fair-detail-section {
  padding: 21px 0;
  border-top: 1px solid var(--border);
}

.fair-detail-section h3 {
  margin: 0 0 13px;
  color: #2c3547;
  font-family: var(--font-display);
  font-size: 14px;
}

.fair-sector-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fair-sector-tags span {
  padding: 7px 10px;
  border: 1px solid var(--brand-weak);
  border-radius: 99px;
  color: #5369b8;
  background: #f2f5ff;
  font-size: 12px;
  font-weight: 600;
}

.organizer-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
}

.organizer-detail-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.organizer-detail-row:last-child {
  border-bottom: 0;
}

.organizer-detail-row > span {
  color: #8c96a8;
  font-size: 12px;
  font-weight: 600;
}

.organizer-detail-row strong,
.organizer-detail-row a {
  min-width: 0;
  color: #374154;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.organizer-detail-row a:hover {
  color: var(--brand);
}

.fair-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
}

.add-fair-calendar-button,
.fair-website-button {
  display: flex;
  width: fit-content;
  height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.add-fair-calendar-button {
  border: 1px solid var(--brand-weak);
  color: var(--brand);
  background: #f5f7ff;
}

.add-fair-calendar-button:hover:not(:disabled) {
  border-color: var(--brand);
  background: var(--brand-weak);
}

.add-fair-calendar-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.fair-website-button {
  color: #fff;
  background: var(--brand);
}

.fair-website-button:hover {
  background: #3159cf;
}

.add-fair-calendar-button svg,
.fair-website-button svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Tenders */

.tenders-toolbar {
  flex-wrap: wrap;
}

.tenders-toolbar .fairs-search {
  flex: 1 1 330px;
}

.tender-filter-group {
  display: flex;
  gap: 8px;
}

.tender-filter-group .fairs-country-filter {
  min-width: 160px;
}

.tenders-workspace {
  grid-template-columns: 1fr;
}

/* İki sütunlu yerleşim yalnızca konteynerde yeterli genişlik varsa;
   aksi halde liste ve detay alt alta yığılır (kenar çubuğu durumuna da uyumlu).
   Bu blok her iki çalışma alanı temel tanımından sonra gelmelidir. */
@container (min-width: 840px) {
  .fairs-workspace {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    min-height: 690px;
  }

  .tenders-workspace {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  }

  .fairs-list-panel {
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }
}

.tender-list-card {
  min-height: 118px;
}

.tender-list-card .fair-date-block {
  min-height: 76px;
}

.tender-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: #8490a3;
  font-size: 11px;
}

.tender-card-meta > span:first-child:not(:last-child)::after {
  margin-left: 7px;
  color: #c4cad4;
  content: "·";
}

.tender-type-badge {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #51607b;
  background: #f7f8fb;
  font-weight: 600;
}

.tender-detail-hero > div {
  min-width: 0;
}

.tender-info-card .organizer-detail-row {
  grid-template-columns: 140px minmax(0, 1fr);
}

.tender-text-sections {
  display: grid;
  gap: 10px;
}

.tender-text-sections article {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafbfd;
}

.tender-text-sections h4 {
  margin: 0 0 8px;
  color: #394559;
  font-family: var(--font-display);
  font-size: 12px;
}

.tender-text-sections p {
  margin: 0;
  color: #6f7b8e;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.tender-lots {
  display: grid;
  gap: 11px;
}

.tender-lot-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
}

.tender-lot-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
}

.tender-lot-card > header > div {
  display: grid;
  gap: 4px;
}

.tender-lot-card header span {
  color: #7082bc;
  font-size: 11px;
  font-weight: 800;
}

.tender-lot-card h4 {
  margin: 0;
  color: #303b50;
  font-family: var(--font-display);
  font-size: 13px;
}

.tender-lot-card > header > strong {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 8px;
  color: #5269bd;
  background: #edf1ff;
  font-size: 11px;
}

.tender-lot-card > p {
  margin: 0;
  padding: 14px 16px 0;
  color: #727e91;
  font-size: 12px;
  line-height: 1.6;
}

.tender-lot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--border);
}

.tender-lot-grid > div {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  background: #fff;
}

.tender-lot-grid span {
  color: #919bad;
  font-size: 11px;
}

.tender-lot-grid strong {
  color: #3d485b;
  font-size: 12px;
  line-height: 1.45;
}

.tender-lot-documents {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 16px 15px;
}

.tender-lot-documents a {
  padding: 6px 9px;
  border: 1px solid var(--brand-weak);
  border-radius: 8px;
  color: #4f68bd;
  background: #f4f6ff;
  font-size: 11px;
  font-weight: 700;
}

.tender-lot-documents a:hover {
  border-color: var(--brand);
  background: var(--brand-weak);
}

.tender-lots-empty {
  padding: 22px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: #8b95a6;
  background: #fafbfd;
  font-size: 12px;
  text-align: center;
}

.tender-detail-actions {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.tender-external-link {
  background: #536ed1;
}

/* Calendar */

.company-page {
  display: grid;
  max-width: 100%;
  gap: 18px;
}

.company-profile-card,
.company-codes-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(37, 49, 77, 0.05);
}

.company-codes-card {
  margin-top: 18px;
  padding: 24px 27px;
}

.company-profile-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 27px;
  border-bottom: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  background: #f7f9ff;
}

.company-identity-text {
  min-width: 0;
}

.company-profile-heading h2 {
  margin: 0 0 6px;
  color: #273146;
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: -0.035em;
}

.company-customer-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #8791a3;
  font-size: 12px;
}

.company-customer-number svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #9aa4b6;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.company-credit {
  display: grid;
  min-width: 130px;
  gap: 5px;
  padding: 12px 15px;
  border: 1px solid var(--brand-weak);
  border-radius: 12px;
  background: #f5f7ff;
  text-align: right;
}

.company-credit span {
  color: #8993a7;
  font-size: 11px;
}

.company-credit strong {
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 20px;
}

.company-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.company-info-item {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 17px 27px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.company-info-item:nth-child(2n) {
  border-right: 0;
}

.company-info-item:last-child {
  border-bottom: 0;
}

.company-info-wide {
  grid-column: 1 / -1;
  border-right: 0;
}

.company-info-item span,
.company-sector-form label > span {
  color: #929bad;
  font-size: 11px;
  font-weight: 600;
}

.company-info-item strong {
  color: #3b465a;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.company-info-wide strong {
  white-space: pre-wrap;
}

.company-website-link {
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.company-website-link:hover {
  text-decoration: underline;
}

.company-codes-heading h3 {
  margin: 0 0 16px;
  color: #2d374b;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.01em;
}

.company-code-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.company-code-group {
  min-width: 0;
  padding: 16px 17px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fbfcfe;
}

.company-code-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}

.company-code-type {
  color: #36405a;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.company-code-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  color: #4763c7;
  background: #edf1ff;
  font-size: 12px;
  font-weight: 800;
}

.company-code-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.company-code-chip {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #33405c;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}

.company-code-empty {
  color: #a3abba;
  font-size: 12px;
}

.company-sector-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  align-items: end;
  gap: 35px;
  padding: 24px 27px;
}

.company-sector-card h3 {
  margin: 0 0 7px;
  color: #2d374b;
  font-family: var(--font-display);
  font-size: 16px;
}

.company-sector-card p {
  max-width: 480px;
  margin: 0;
  color: #858fa2;
  font-size: 12px;
  line-height: 1.65;
}

.company-sector-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.company-sector-form label {
  display: grid;
  flex: 1;
  gap: 7px;
}

.company-sector-form select {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #3b4658;
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.company-sector-form select:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(65, 105, 223, 0.11);
}

.company-sector-form button {
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.company-sector-form button:hover:not(:disabled) {
  background: #3159cf;
}

.company-sector-form button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.company-empty {
  padding: 30px;
  color: #818b9d;
  text-align: center;
}

.calendar-page {
  min-height: calc(100vh - 72px);
}

.module-feedback {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.module-feedback.error {
  border: 1px solid #f1c7c7;
  color: #9f2f2f;
  background: #fff2f2;
}

.module-feedback.success {
  margin-top: 14px;
  border: 1px solid #bfe2cb;
  color: #25683c;
  background: #effaf3;
}

.module-loading {
  display: grid;
  min-height: 120px;
  place-items: center;
  color: #7b847d;
  font-size: 13px;
  font-weight: 600;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-bottom: 20px;
}

.calendar-toolbar-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 16px;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.calendar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5c6678;
  font-size: 12px;
  font-weight: 600;
}

.calendar-legend-item i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.calendar-legend-item.meeting i {
  background: #4763c7;
}

.calendar-legend-item.fair i {
  background: #27856a;
}

.calendar-legend-item.tender i {
  background: #c2772f;
}

.calendar-legend-item.follow-up i {
  background: #8a59bd;
}

.calendar-date-picker-wrap {
  display: inline-flex;
}

.calendar-month-navigation {
  display: flex;
  align-items: center;
  gap: 13px;
}

.calendar-month-navigation h2 {
  min-width: 190px;
  margin: 0;
  color: #20283a;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.04em;
  text-align: center;
}

.calendar-nav-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #5f697b;
  background: #fff;
  cursor: pointer;
}

.calendar-nav-button:hover {
  border-color: var(--brand-weak);
  color: var(--brand);
  background: #f7f9fd;
}

.calendar-nav-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-today-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: #40516c;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    background 150ms ease;
}

.calendar-today-button svg {
  width: 14px;
  height: 14px;
  fill: var(--brand);
  stroke: var(--brand);
  stroke-width: 1.6;
}

.calendar-date-picker {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: none;
  color: #40516c;
  background: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
}

.calendar-date-picker:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(65, 105, 223, 0.09);
}

.calendar-today-button:hover {
  border-color: var(--brand);
  color: #3159cf;
  background: #f7f9fd;
}

.calendar-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(42, 54, 83, 0.045);
}

.calendar-card {
  min-width: 0;
  border-right: 1px solid var(--border);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  height: 45px;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
}

.calendar-weekdays span {
  display: grid;
  place-items: center;
  color: #8c95a5;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.calendar-weekdays span:nth-child(6),
.calendar-weekdays span:nth-child(7) {
  color: #a9a0b8;
}

.calendar-grid {
  min-height: 604px;
  grid-template-rows: repeat(6, minmax(95px, 1fr));
}

.calendar-day {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  padding: 9px;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: #354055;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day:nth-last-child(-n + 7) {
  border-bottom: 0;
}

.calendar-day:nth-child(7n-1),
.calendar-day:nth-child(7n) {
  background: #fafbfe;
}

.calendar-day:hover {
  background: #f8faff;
}

.calendar-day.outside {
  color: #b2b8c3;
  background: #fbfcfd;
}

.calendar-day.today {
  background: #f6f9ff;
}

.calendar-day.selected {
  background: #eef3ff;
  box-shadow: inset 0 0 0 2px #7e9af0;
}

.calendar-day.today .calendar-day-number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: #3559c7;
  box-shadow: 0 5px 12px rgba(47, 87, 196, 0.32);
}

.calendar-day-number {
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.calendar-day-events {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.calendar-event-pill {
  display: block;
  overflow: hidden;
  padding: 5px 6px;
  border-left: 2px solid currentColor;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-pill > span {
  margin-right: 4px;
  font-weight: 800;
}

.calendar-event-pill.meeting {
  color: #4763c7;
  background: #edf1ff;
}

.calendar-event-pill.fair {
  color: #27856a;
  background: #e9f8f2;
}

.calendar-event-pill.tender {
  color: #b26d2f;
  background: #fff2e5;
}

.calendar-event-pill.follow-up {
  color: #8a59bd;
  background: #f5edfc;
}

.calendar-side-panel {
  min-width: 0;
  background: #fbfcfe;
}

.selected-date-heading {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 22px;
  color: #fff;
  background: #3559c7;
}

.selected-date-heading > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.selected-date-heading > div > span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  color: var(--brand);
  background: #fff;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(19, 38, 92, 0.25);
}

.selected-date-heading div div {
  display: grid;
  gap: 3px;
}

.selected-date-heading strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: -0.01em;
}

.selected-date-heading small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.selected-date-year {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
}

.selected-event-list {
  min-height: 218px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.selected-event-list h3,
.calendar-event-form h3 {
  margin: 0 0 14px;
  color: #2c3547;
  font-family: var(--font-display);
  font-size: 14px;
}

.selected-event-list h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.selected-event-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  color: #4763c7;
  background: #edf1ff;
  font-size: 12px;
  font-weight: 800;
}

.selected-event-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-left: 3px solid currentColor;
  border-radius: 9px;
}

.selected-event-card + .selected-event-card {
  margin-top: 7px;
}

.selected-event-card.meeting {
  color: #4763c7;
  background: #edf1ff;
}

.selected-event-card.fair {
  color: #27856a;
  background: #e9f8f2;
}

.selected-event-card.tender {
  color: #b26d2f;
  background: #fff2e5;
}

.selected-event-card.follow-up {
  color: #8a59bd;
  background: #f5edfc;
}

.selected-event-time {
  font-size: 12px;
  font-weight: 800;
}

.selected-event-card > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.selected-event-card strong {
  /* Fuar adları uzun olabiliyor; kesmek yerine alt satıra sar. */
  color: #384256;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.selected-event-card small {
  color: currentColor;
  font-size: 12px;
}

.selected-event-card {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.selected-event-card button {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #8b95a6;
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
}

.selected-event-card button:hover {
  color: #bd4054;
  background: #fff;
}

.selected-event-card button svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-empty-events {
  display: grid;
  min-height: 125px;
  place-items: center;
  align-content: center;
  color: #9ba3b1;
  text-align: center;
}

.calendar-empty-events svg {
  width: 32px;
  height: 32px;
  margin-bottom: 9px;
  stroke: #8999bc;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-empty-events span {
  font-size: 12px;
}

.calendar-event-form {
  display: grid;
  gap: 13px;
  padding: 20px;
}

.calendar-event-form label {
  display: grid;
  gap: 6px;
}

.calendar-event-form label > span {
  color: #687386;
  font-size: 12px;
  font-weight: 600;
}

.calendar-event-form input,
.calendar-event-form select {
  width: 100%;
  height: 39px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  color: #364155;
  background: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
}

.calendar-event-form input:focus,
.calendar-event-form select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(65, 105, 223, 0.09);
}

.calendar-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.add-calendar-event-button {
  display: flex;
  width: 100%;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.add-calendar-event-button:hover:not(:disabled) {
  background: #3159cf;
}

.add-calendar-event-button:disabled {
  background: var(--brand);
  cursor: not-allowed;
}

.add-calendar-event-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* Notes */

.notes-page {
  min-height: calc(100vh - 72px);
}

.notes-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 22px;
}

.new-note-button,
.save-note-button,
.delete-note-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.new-note-button {
  height: 43px;
  padding: 0 17px;
  border: 0;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 9px 22px rgba(65, 105, 223, 0.2);
}

.new-note-button:hover,
.save-note-button:hover:not(:disabled) {
  background: #3159cf;
  transform: translateY(-1px);
}

.new-note-button svg,
.save-note-button svg,
.delete-note-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notes-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  min-height: 590px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(42, 54, 83, 0.045);
}

.notes-list-panel {
  min-width: 0;
  border-right: 1px solid var(--border);
  background: #fbfcfe;
}

.notes-list-heading {
  display: flex;
  min-height: 72px;
  align-items: center;
  padding: 15px 19px;
  border-bottom: 1px solid var(--border);
}

.notes-list-heading h3 {
  margin: 0 0 4px;
  color: #2a3345;
  font-family: var(--font-display);
  font-size: 16px;
}

.notes-list-heading span {
  color: #9aa2b0;
  font-size: 12px;
}

.notes-list {
  max-height: calc(100vh - 238px);
  min-height: 516px;
  overflow-y: auto;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.note-list-item {
  position: relative;
  display: grid;
  width: 100%;
  gap: 7px;
  padding: 15px 14px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #283144;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.note-list-item + .note-list-item {
  margin-top: 4px;
}

.note-list-item:hover {
  background: #f3f6fb;
}

.note-list-item.active {
  border-color: var(--brand-weak);
  background: #f0f4ff;
  box-shadow: 0 6px 16px rgba(65, 105, 223, 0.06);
}

.note-list-item.active::before {
  position: absolute;
  top: 13px;
  bottom: 13px;
  left: -1px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #5471e8;
  content: "";
}

.note-item-title {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-item-preview {
  display: -webkit-box;
  overflow: hidden;
  color: #7e8797;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.note-list-item time {
  color: #a1a8b4;
  font-size: 12px;
}

.notes-empty-list {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  padding: 28px;
  color: #9aa2b0;
  text-align: center;
}

.notes-empty-list svg {
  width: 38px;
  height: 38px;
  margin-bottom: 13px;
  fill: none;
  stroke: #8797bf;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notes-empty-list strong {
  margin-bottom: 6px;
  color: #4c566a;
  font-size: 13px;
}

.notes-empty-list span {
  max-width: 190px;
  font-size: 12px;
  line-height: 1.6;
}

.note-editor-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.note-editor-toolbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 20px 13px 25px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.note-editor-toolbar > span {
  color: #758092;
  font-size: 13px;
  font-weight: 600;
}

.note-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-note-button,
.delete-note-button {
  height: 37px;
  padding: 0 13px;
}

.save-note-button {
  border: 1px solid var(--brand);
  color: #fff;
  background: var(--brand);
}

.save-note-button:disabled {
  border-color: var(--border-strong);
  color: #fff;
  background: var(--border-strong);
  cursor: not-allowed;
}

.delete-note-button {
  border: 1px solid #f0d8dc;
  color: #ba4658;
  background: #fff8f9;
}

.delete-note-button:hover {
  border-color: #e8bcc4;
  background: #fff1f3;
}

.note-editor {
  display: flex;
  min-height: 516px;
  flex: 1;
  flex-direction: column;
  padding: 30px clamp(24px, 4vw, 48px);
}

.note-title-input,
.note-content-input {
  width: 100%;
  border: 0;
  outline: none;
  color: #263044;
  background: transparent;
}

.note-title-input {
  padding: 0 0 19px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.note-title-input::placeholder {
  color: #b0b7c3;
}

.note-content-input {
  min-height: 390px;
  flex: 1;
  padding: 23px 0;
  resize: none;
  color: #566174;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.85;
}

.note-content-input::placeholder {
  color: #b0b7c3;
}

.note-editor-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 13px 0 2px;
  border-top: 1px solid var(--border);
}

.note-stat {
  color: #a2aab8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

@media (max-width: 1180px) {
  .buyer-table th:nth-child(3),
  .buyer-table td:nth-child(3) {
    display: none;
  }

  .buyer-table th:nth-child(2) {
    width: 34%;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calendar-workspace {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  /* Fuar/İhale çalışma alanı sütunları artık konteyner sorgusu ile yönetiliyor. */

}

@media (max-width: 800px) {
  .workspace-shell,
  .workspace-shell.sidebar-collapsed {
    display: block;
  }

  .workspace-sidebar {
    position: fixed;
    left: 0;
    width: min(290px, 86vw);
    transform: translateX(0);
    transition: transform 180ms ease;
  }

  .workspace-shell.sidebar-collapsed .workspace-sidebar {
    transform: translateX(-105%);
  }

  .workspace-shell.sidebar-collapsed .eximbee-logo,
  .workspace-shell.sidebar-collapsed .nav-text,
  .workspace-shell.sidebar-collapsed .nav-chevron,
  .workspace-shell.sidebar-collapsed .nav-section-label {
    display: flex;
  }

  .workspace-shell.sidebar-collapsed .sidebar-brand-row {
    justify-content: space-between;
    padding: 0 24px 0 29px;
  }

  .workspace-shell.sidebar-collapsed .sidebar-link {
    justify-content: flex-start;
    padding: 8px 13px;
  }

  .mobile-menu-button {
    display: grid;
  }

  .workspace-topbar {
    padding-inline: 18px;
  }

  .workspace-content {
    padding: 22px 18px 34px;
  }

  .buyer-analysis-intro {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .buyer-intro-summary {
    grid-column: 1 / -1;
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
    text-align: left;
  }

  .buyer-results-header,
  .buyer-detail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .buyer-table {
    min-width: 720px;
  }

  .buyer-detail-meta,
  .buyer-insight-grid {
    grid-template-columns: 1fr;
  }

  .buyer-detail-actions {
    justify-content: space-between;
  }

  .welcome-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    gap: 9px;
  }

  .calendar-workspace {
    grid-template-columns: 1fr;
  }

  .calendar-card {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .calendar-side-panel {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1.2fr);
  }

  .selected-date-heading,
  .selected-event-list {
    grid-column: 1;
  }

  .calendar-event-form {
    grid-column: 2;
    grid-row: 1 / 3;
    border-left: 1px solid var(--border);
  }

  .fairs-workspace {
    grid-template-columns: 1fr;
  }

  .fairs-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .fairs-list {
    display: flex;
    min-height: 0;
    max-height: 285px;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .fair-list-card {
    min-width: 350px;
  }

  .tender-list-card {
    min-width: 390px;
  }
}

@media (max-width: 620px) {
  .buyer-analysis-intro {
    grid-template-columns: 1fr;
    padding: 21px;
  }

  .buyer-intro-icon {
    width: 46px;
    height: 46px;
  }

  .buyer-analysis-intro h2 {
    font-size: 18px;
  }

  .buyer-results-header,
  .buyer-detail-header {
    padding: 20px;
  }

  .buyer-table {
    min-width: 0;
    table-layout: auto;
  }

  .buyer-table thead {
    display: none;
  }

  .buyer-table tbody,
  .buyer-table tr,
  .buyer-table td {
    display: block;
    width: 100%;
  }

  .buyer-table tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .buyer-table tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 9px 11px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
  }

  .buyer-table tbody tr.selected {
    border-color: var(--brand-weak);
    box-shadow: inset 3px 0 #526ee1;
  }

  .buyer-table td {
    padding: 0;
    border: 0;
  }

  .buyer-table td:first-child {
    grid-row: 1 / 4;
  }

  .buyer-table td:nth-child(2),
  .buyer-table td:nth-child(4),
  .buyer-table td:nth-child(5) {
    grid-column: 2;
  }

  .buyer-table td:nth-child(3) {
    display: none;
  }

  .buyer-table .buyer-action-cell {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  .buyer-table td:nth-child(5) {
    padding-right: 75px;
  }

  .buyer-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .buyer-detail-actions .buyer-match-status {
    width: fit-content;
  }

  .buyer-detail-meta {
    margin-inline: 20px;
  }

  .buyer-insight-grid {
    padding: 16px 20px 20px;
  }

  .buyer-contact-panel {
    margin: 0 20px 20px;
  }

  .buyer-contact-grid {
    grid-template-columns: 1fr;
  }

  .buyer-contact-item,
  .buyer-contact-item:nth-child(2n),
  .buyer-contact-item:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .buyer-contact-item:last-child {
    border-bottom: 0;
  }

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

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .activity-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .activity-row time {
    display: none;
  }

  .welcome-card {
    padding: 32px 25px;
  }

  .primary-action {
    width: 100%;
    justify-content: center;
  }

  .module-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .new-note-button {
    width: fit-content;
  }

  .notes-workspace {
    grid-template-columns: 1fr;
  }

  .notes-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .notes-list {
    display: flex;
    min-height: 0;
    max-height: 210px;
    gap: 7px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .note-list-item {
    min-width: 235px;
  }

  .notes-empty-list {
    width: 100%;
    min-height: 150px;
  }

  .note-editor,
  .note-editor-panel {
    min-height: 480px;
  }

  .calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-month-navigation {
    justify-content: space-between;
  }

  .calendar-month-navigation h2 {
    min-width: 0;
    font-size: 20px;
  }

  .calendar-today-button {
    width: fit-content;
  }

  .calendar-date-picker {
    width: 100%;
  }

  .calendar-grid {
    min-width: 700px;
  }

  .calendar-card {
    overflow-x: auto;
  }

  .calendar-weekdays {
    min-width: 700px;
  }

  .calendar-side-panel {
    display: block;
  }

  .calendar-event-form {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .fairs-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .fairs-search,
  .fairs-country-filter,
  .fairs-sector-filter,
  .fairs-date-range {
    width: 100%;
  }

  .fairs-date-range {
    flex-wrap: wrap;
  }

  .fairs-date-range input {
    flex: 1;
  }

  .tender-filter-group {
    width: 100%;
  }

  .tender-filter-group .fairs-country-filter {
    min-width: 0;
  }

  .fair-list-card {
    min-width: 300px;
  }

  .fair-detail-panel {
    padding: 24px 19px;
  }

  .fair-detail-hero {
    flex-direction: column;
  }

  .fair-detail-grid {
    grid-template-columns: 1fr;
  }

  .tender-info-card .organizer-detail-row {
    grid-template-columns: 1fr;
  }

  .tender-lot-grid {
    grid-template-columns: 1fr;
  }

  .company-sector-card {
    grid-template-columns: 1fr;
  }

  .company-info-grid {
    grid-template-columns: 1fr;
  }

  .company-info-item,
  .company-info-item:nth-child(2n),
  .company-info-item:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .company-info-item:last-child {
    border-bottom: 0;
  }

  .organizer-detail-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .company-profile-heading,
  .company-sector-form {
    align-items: stretch;
    flex-direction: column;
  }

  .company-credit {
    text-align: left;
  }

  .note-editor-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .note-editor-actions {
    width: 100%;
  }

  .save-note-button,
  .delete-note-button {
    flex: 1;
  }

  .note-editor {
    padding: 24px 20px;
  }
}

/* Root administration */

.admin-page,
.mail-page {
  display: grid;
  gap: 18px;
}

.admin-summary {
  display: flex;
  min-height: 145px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 30px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(36, 51, 85, 0.05);
}

.admin-summary > div:first-child > span {
  color: #5573d2;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.admin-summary h2 {
  margin: 8px 0 6px;
  color: #273146;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  letter-spacing: -0.035em;
}

.admin-summary p {
  margin: 0;
  color: #788398;
  font-size: 13px;
  line-height: 1.6;
}

.admin-summary-counts {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 12px;
  align-items: baseline;
  padding: 16px 20px;
  border: 1px solid var(--brand-weak);
  border-radius: 14px;
  background: #f5f7ff;
}

.admin-summary-counts strong {
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 22px;
  text-align: right;
}

.admin-summary-counts span {
  color: #69758b;
  font-size: 13px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.admin-form-card,
.admin-list-card,
.smtp-settings-card,
.mail-history-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(37, 49, 77, 0.05);
}

.admin-form-card {
  padding: 24px;
}

.admin-form-card > header,
.smtp-settings-card > header {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 22px;
}

.admin-card-icon,
.mail-card-icon {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  color: var(--brand);
  background: #edf1ff;
}

.admin-card-icon svg,
.mail-card-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-form-card h3,
.admin-list-card h3,
.smtp-settings-card h2,
.mail-history-card h2 {
  margin: 0;
  color: #2c364a;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.025em;
}

.admin-form-card header p,
.smtp-settings-card header p,
.mail-history-card header p {
  margin: 5px 0 0;
  color: #838da0;
  font-size: 13px;
  line-height: 1.5;
}

.admin-fields,
.smtp-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.admin-fields label,
.smtp-fields label {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.admin-fields label > span,
.smtp-fields label > span {
  color: #657086;
  font-size: 12px;
  font-weight: 700;
}

.admin-fields input,
.admin-fields select,
.admin-fields textarea,
.smtp-fields input,
.smtp-fields select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #303b50;
  background: #fff;
  font: inherit;
  font-size: 13px;
}

.admin-fields input,
.admin-fields select,
.smtp-fields input,
.smtp-fields select {
  height: 42px;
  padding: 0 12px;
}

.admin-fields textarea {
  min-height: 82px;
  padding: 11px 12px;
  resize: vertical;
}

.admin-fields input:focus,
.admin-fields select:focus,
.admin-fields textarea:focus,
.smtp-fields input:focus,
.smtp-fields select:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(65, 105, 223, 0.1);
}

.admin-field-wide {
  grid-column: 1 / -1;
}

.admin-submit-button,
.smtp-save-button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding: 0 18px;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.admin-submit-button:hover:not(:disabled),
.smtp-save-button:hover:not(:disabled) {
  background: #3159cf;
}

.admin-submit-button:disabled,
.smtp-save-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.admin-list-card {
  overflow: hidden;
}

.admin-list-card > header,
.mail-history-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--border);
}

.admin-list-card > header > span,
.mail-history-card > header > span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #4c65b7;
  background: #edf1ff;
  font-size: 12px;
  font-weight: 700;
}

.table-edit-button {
  min-width: 66px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--brand);
  background: #f7f9ff;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.table-edit-button:hover:not(:disabled) {
  border-color: var(--brand);
  background: #eef2ff;
}

.table-edit-button:disabled {
  color: #929bad;
  background: #f3f4f6;
  cursor: not-allowed;
}

.admin-empty-state {
  display: grid;
  min-height: 120px;
  place-items: center;
  color: #8a94a7;
  font-size: 13px;
}

.admin-actions-col {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.admin-row-delete-button {
  min-width: 58px;
  height: 32px;
  padding: 0 13px;
  border: 1px solid #f0c8cc;
  border-radius: 8px;
  color: #cc3344;
  background: #fdf3f4;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.admin-row-delete-button:hover {
  border-color: #e39aa2;
  background: #fbe7e9;
}

.demo-request-table {
  min-width: 680px;
}

.admin-edit-overlay,
.demo-dialog-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 29, 48, 0.48);
  backdrop-filter: blur(3px);
}

.admin-edit-dialog,
.demo-dialog {
  width: min(100%, 680px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(18, 29, 55, 0.24);
}

.company-edit-dialog {
  width: min(100%, 820px);
}

.admin-edit-dialog > header,
.demo-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.admin-edit-dialog h3,
.demo-dialog h2 {
  margin: 0;
  color: #293449;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.03em;
}

.admin-edit-dialog header p,
.demo-dialog header p {
  margin: 6px 0 0;
  color: #818ca0;
  font-size: 13px;
  line-height: 1.55;
}

.dialog-close-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: #657086;
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.dialog-close-button:hover {
  color: #263249;
  background: #f5f7fa;
}

.edit-active-field {
  display: flex !important;
  min-height: 42px;
  align-items: center;
  align-self: end;
  gap: 9px !important;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
}

.edit-active-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.admin-readonly-field {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.admin-readonly-field > span {
  color: #657086;
  font-size: 12px;
  font-weight: 700;
}

.admin-readonly-field strong {
  color: #2c3950;
  font-family: var(--font-display);
  font-size: 13px;
}

.admin-readonly-field small {
  color: #8a94a7;
  font-size: 12px;
}

.trade-code-editor {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafbfe;
}

.trade-code-editor > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.trade-code-editor > header > div {
  display: grid;
  gap: 4px;
}

.trade-code-editor header strong {
  color: #303b50;
  font-family: var(--font-display);
  font-size: 13px;
}

.trade-code-editor header small {
  color: #838da0;
  font-size: 12px;
}

.trade-code-add-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 9px;
}

.trade-code-add-button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.trade-code-add-button:hover {
  background: #3159cf;
}

.trade-code-list {
  display: grid;
  gap: 8px;
}

.trade-code-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
}

.trade-code-type {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.trade-code-item code {
  overflow: hidden;
  color: #344158;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.trade-code-item button {
  padding: 5px 8px;
  border-radius: 7px;
  color: #b24653;
  background: #fff1f2;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.trade-code-item button:hover {
  background: #ffe4e7;
}

.trade-code-empty {
  padding: 11px;
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  color: #8a94a7;
  background: #fff;
  font-size: 12px;
  text-align: center;
}

.admin-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 21px;
}

.admin-edit-actions .admin-submit-button {
  margin-top: 0;
}

.secondary-admin-button {
  min-height: 43px;
  padding: 0 17px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #536075;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-admin-button:hover {
  background: #f5f7fa;
}

.admin-table-wrap,
.mail-history-table-wrap {
  overflow-x: auto;
}

.admin-table,
.mail-history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table {
  min-width: 780px;
}

.admin-table th,
.admin-table td,
.mail-history-table th,
.mail-history-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  color: #505b70;
  font-size: 13px;
  vertical-align: middle;
}

.admin-table th,
.mail-history-table th {
  color: #8993a4;
  background: #fafbfc;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-table tbody tr:last-child td,
.mail-history-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table td span:not(.status-pill),
.admin-table td small,
.mail-history-table td span:not(.mail-status),
.mail-history-table td small {
  display: block;
}

.admin-table td small,
.mail-history-table td small {
  max-width: 340px;
  margin-top: 3px;
  overflow: hidden;
  color: #929bad;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge,
.status-pill,
.mail-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #4c5568;
  background: #fafbfc;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.status-badge::before,
.status-pill::before,
.mail-status::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #abb3c0;
  content: "";
}

/* Olumlu durumlar — yeşil nokta */
.status-badge.completed::before,
.status-pill.active::before,
.mail-status.sent::before {
  background: #2e9e63;
}

/* Beklemede / işleniyor — kehribar nokta */
.status-badge.processing::before,
.mail-status.queued::before {
  background: #d39a2a;
}

/* Hata — kırmızı nokta */
.mail-status.failed::before {
  background: #d24b4b;
}

.access-denied {
  color: #9f2f2f;
  font-weight: 700;
}

/* Gümrük Tarife Sorgulama (GTİP) */

.gtip-page {
  min-height: calc(100vh - 72px);
  container-type: inline-size;
}

.gtip-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.gtip-search {
  position: relative;
  display: flex;
  flex: 1 1 320px;
  align-items: center;
}

.gtip-search svg {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #97a0b0;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.gtip-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  color: #2f3a4e;
  background: #fff;
  font-size: 13px;
}

.gtip-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(65, 105, 223, 0.09);
}

.gtip-section-filter {
  height: 44px;
  min-width: 220px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  color: #3b465a;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.gtip-workspace {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(42, 54, 83, 0.045);
}

.gtip-list-panel {
  min-width: 0;
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
}

@container (min-width: 840px) {
  .gtip-workspace {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    min-height: 600px;
  }

  .gtip-list-panel {
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }
}

.gtip-list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.gtip-list-heading h2 {
  margin: 0;
  color: #283144;
  font-family: var(--font-display);
  font-size: 15px;
}

.gtip-list-heading span {
  color: #8e97a6;
  font-size: 12px;
}

.gtip-list {
  max-height: calc(100vh - 250px);
  min-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.gtip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.gtip-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: #828c9d;
  background: #f6f8fb;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.gtip-th-code {
  width: 150px;
}

.gtip-th-tax {
  width: 64px;
  text-align: right;
}

.gtip-row {
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.gtip-row td {
  padding: 9px 14px;
  vertical-align: top;
}

.gtip-row:hover {
  background: var(--brand-weak);
}

.gtip-cell-code {
  color: #34508f;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gtip-cell-desc {
  color: #3a4459;
  line-height: 1.45;
}

.gtip-cell-tax {
  color: #5a6478;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* Hiyerarşi: pozisyon (4) kalın ve tonlu, alt pozisyon (6) girintili,
   GTİP (12) daha fazla girintili — resmi cetvel gibi. */
.gtip-row.level-4 {
  background: #fafbfe;
}

.gtip-row.level-4 .gtip-cell-code,
.gtip-row.level-4 .gtip-cell-desc {
  color: #273144;
  font-weight: 700;
}

.gtip-row.level-6 .gtip-cell-desc {
  padding-left: 26px;
  font-weight: 600;
}

.gtip-row.level-12 .gtip-cell-desc {
  padding-left: 42px;
}

.gtip-row.active {
  background: var(--brand-weak);
  box-shadow: inset 3px 0 0 var(--brand);
}

.gtip-empty-cell {
  padding: 40px 16px !important;
  color: #98a1b0;
  font-size: 13px;
  text-align: center;
}

.gtip-detail-panel {
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
}

.gtip-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gtip-detail-code {
  color: #1f2a3d;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.gtip-copy-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--brand);
  background: var(--brand-weak);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.gtip-copy-button:hover {
  border-color: var(--brand);
  background: #ecf1ff;
}

.gtip-copy-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gtip-detail-name {
  margin: 16px 0 22px;
  color: #313c50;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
}

.gtip-breadcrumb {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--border);
}

.gtip-breadcrumb-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: #fbfcfe;
}

.gtip-breadcrumb-row span {
  color: #939bad;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gtip-breadcrumb-row strong {
  color: #38445a;
  font-size: 12.5px;
  font-weight: 600;
}

.gtip-breadcrumb-row .gtip-breadcrumb-code {
  color: #34508f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.gtip-detail-note {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 11px;
  color: #6f7a8d;
  background: #f7f8fb;
  font-size: 11.5px;
  line-height: 1.6;
}

.gtip-empty {
  display: grid;
  min-height: 240px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 30px;
  color: #97a0b0;
  text-align: center;
}

.gtip-empty svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #aeb6c4;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.gtip-empty strong {
  color: #525c6e;
  font-family: var(--font-display);
  font-size: 14px;
}

/* Demo request */

.demo-dialog {
  width: min(100%, 520px);
}

.demo-request-form {
  display: grid;
  gap: 15px;
}

.demo-request-form > label {
  display: grid;
  gap: 7px;
}

.demo-request-form > label > span {
  color: #59657b;
  font-size: 12px;
  font-weight: 700;
}

.demo-request-form input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #303b50;
  background: #fff;
  font: inherit;
  font-size: 13px;
}

.demo-request-form input:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(65, 105, 223, 0.1);
}

.captcha-field {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 100px auto;
  align-items: center;
  gap: 8px;
}

.captcha-field strong {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--brand-weak);
  border-radius: 10px;
  color: #334a8e;
  background: #f5f7ff;
  font-size: 13px;
}

.captcha-field button {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #4d5b72;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.demo-form-message {
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.5;
}

.demo-form-message.error {
  border: 1px solid #f1c7c7;
  color: #9f2f2f;
  background: #fff2f2;
}

.demo-submit-button,
.demo-success-state button {
  min-height: 45px;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.demo-submit-button:hover:not(:disabled),
.demo-success-state button:hover {
  background: #3159cf;
}

.demo-submit-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.demo-success-state {
  display: grid;
  min-height: 230px;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.demo-success-state strong {
  color: #286c43;
  font-family: var(--font-display);
  font-size: 20px;
}

.demo-success-state p {
  max-width: 360px;
  margin: 0;
  color: #68758b;
  font-size: 13px;
  line-height: 1.6;
}

.demo-success-state button {
  min-width: 110px;
  margin-top: 7px;
  padding: 0 18px;
}

/* Mail */

.mail-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.8fr) minmax(520px, 1.2fr);
  gap: 18px;
  align-items: start;
}

.smtp-settings-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  align-self: start;
}

.smtp-settings-card > header {
  margin-bottom: 0;
  align-items: center;
}

.smtp-standalone {
  max-width: 760px;
}

.mail-history-standalone {
  max-width: 100%;
}

.smtp-host-field {
  grid-column: span 1;
}

.smtp-fields label small {
  color: #79849a;
  font-size: 12px;
  line-height: 1.45;
}

.smtp-active-field {
  display: flex !important;
  min-height: 42px;
  align-items: center;
  align-self: end;
  gap: 9px !important;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
}

.smtp-active-field input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.smtp-active-field span {
  font-size: 12px !important;
}

.mail-history-card {
  overflow: hidden;
}

.mail-history-table {
  min-width: 700px;
}

.mail-history-table th:nth-child(1) {
  width: 27%;
}

.mail-history-table th:nth-child(2) {
  width: 39%;
}

.mail-empty-state {
  display: grid;
  min-height: 310px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 40px;
  color: #8a94a7;
  text-align: center;
}

.mail-empty-state svg {
  width: 32px;
  height: 32px;
  margin-bottom: 5px;
  fill: none;
  stroke: #7187d1;
  stroke-width: 1.5;
}

.mail-empty-state strong {
  color: #465167;
  font-family: var(--font-display);
  font-size: 14px;
}

.mail-empty-state p {
  max-width: 340px;
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

/* Mail Oluşturucu */

.composer-card,
.composer-saved-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(37, 49, 77, 0.05);
}

.composer-card {
  padding: 22px;
}

.composer-toolbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.composer-field {
  display: grid;
  gap: 6px;
}

.composer-field > span {
  color: #687386;
  font-size: 12px;
  font-weight: 600;
}

.composer-subject {
  flex: 1 1 280px;
}

.composer-field input,
.composer-field select {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  color: #364155;
  background: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
}

.composer-field select {
  min-width: 180px;
  cursor: pointer;
}

.composer-field input:focus,
.composer-field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(65, 105, 223, 0.09);
}

.composer-translate-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease;
}

.composer-translate-button:hover:not(:disabled) {
  background: #3159cf;
}

.composer-translate-button:disabled {
  background: var(--brand);
  cursor: not-allowed;
}

.composer-translate-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-panes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.composer-pane {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfcfe;
  overflow: hidden;
}

.composer-pane > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.composer-pane h3 {
  margin: 0;
  color: #2c3547;
  font-family: var(--font-display);
  font-size: 13px;
}

.composer-lang-badge {
  padding: 3px 9px;
  border-radius: 999px;
  color: #4763c7;
  background: #edf1ff;
  font-size: 12px;
  font-weight: 700;
}

.composer-lang-badge.muted {
  color: #6b7488;
  background: #eef0f4;
}

.composer-pane-subject {
  width: 100%;
  padding: 11px 15px;
  border: 0;
  border-bottom: 1px solid var(--border);
  outline: none;
  color: #2c3547;
  background: transparent;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.composer-pane-subject::placeholder {
  color: #aab1bf;
  font-weight: 600;
}

.composer-pane-subject:focus {
  border-bottom-color: var(--brand-weak);
}

.composer-textarea {
  width: 100%;
  min-height: 300px;
  flex: 1;
  padding: 15px;
  border: 0;
  outline: none;
  resize: vertical;
  color: #384154;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.7;
}

.composer-textarea::placeholder {
  color: #aab1bf;
}

.composer-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.composer-charcount {
  color: #8a93a3;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.composer-charcount.over {
  color: #cc3344;
}

.composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.composer-outlook-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--brand);
  background: var(--brand-weak);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.composer-outlook-button:hover:not(:disabled) {
  border-color: var(--brand);
  background: #ecf1ff;
}

.composer-outlook-button:disabled {
  color: #aab1bf;
  background: #f3f4f6;
  cursor: not-allowed;
}

.composer-outlook-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-save-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--brand);
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease;
}

.composer-save-button:hover:not(:disabled) {
  background: #3159cf;
}

.composer-save-button:disabled {
  border-color: var(--brand);
  background: var(--brand);
  cursor: not-allowed;
}

.composer-save-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-saved-card {
  margin-top: 18px;
  overflow: hidden;
}

.composer-saved-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.composer-saved-card h3 {
  margin: 0;
  color: #2c364a;
  font-family: var(--font-display);
  font-size: 15px;
}

.composer-saved-card > header span {
  color: #9aa2b0;
  font-size: 12px;
}

.composer-saved-empty {
  display: grid;
  min-height: 90px;
  place-items: center;
  color: #99a1b0;
  font-size: 13px;
}

.composer-saved-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.composer-saved-item {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.composer-saved-main {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 5px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.composer-saved-main:hover {
  border-color: var(--brand-weak);
  background: #f7f9ff;
}

.composer-saved-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.composer-saved-head strong {
  overflow: hidden;
  color: #2d3749;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-saved-pair {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: 999px;
  color: #4763c7;
  background: #edf1ff;
  font-size: 12px;
  font-weight: 700;
}

.composer-saved-preview {
  display: -webkit-box;
  overflow: hidden;
  color: #7e8797;
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.composer-saved-main time {
  color: #a1a8b4;
  font-size: 12px;
}

.composer-saved-author {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 2px;
  padding: 1px 7px;
  border-radius: 999px;
  color: #5b6472;
  background: var(--border);
  font-size: 12px;
  font-weight: 600;
}

.composer-saved-outlook {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  color: var(--brand);
  background: var(--brand-weak);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.composer-saved-outlook:hover {
  border-color: var(--brand);
  background: #ecf1ff;
}

.composer-saved-outlook svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-saved-delete {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  place-items: center;
  border: 1px solid #f0d8dc;
  border-radius: 11px;
  color: #ba4658;
  background: #fff8f9;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.composer-saved-delete:hover {
  border-color: #e8bcc4;
  background: #fff1f3;
}

.composer-saved-delete svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 860px) {
  .composer-panes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .admin-form-grid,
  .mail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-summary-counts {
    width: 100%;
    grid-template-columns: auto 1fr auto 1fr;
  }

  .admin-summary-counts strong {
    text-align: left;
  }

  .admin-fields,
  .smtp-fields {
    grid-template-columns: 1fr;
  }

  .trade-code-add-row {
    grid-template-columns: 1fr;
  }

  .admin-field-wide {
    grid-column: auto;
  }

  .captcha-field {
    grid-template-columns: 1fr 90px;
  }

  .captcha-field strong {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .admin-summary,
  .admin-form-card,
  .smtp-settings-card {
    padding: 20px;
  }

  .admin-summary-counts {
    grid-template-columns: auto 1fr;
  }

  .admin-submit-button,
  .smtp-save-button {
    width: 100%;
  }

  .admin-edit-actions {
    flex-direction: column-reverse;
  }

  .admin-edit-actions button {
    width: 100%;
  }
}

/* Mail gönderme butonu ve popup */
.composer-send-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border: none;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.composer-send-button:hover:not(:disabled) { background: #1d4ed8; }
.composer-send-button:disabled { opacity: 0.5; cursor: not-allowed; }
.composer-send-button svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }

.mail-send-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.mail-send-modal {
    background: #fff;
    border-radius: 14px;
    width: min(560px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.mail-send-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mail-send-header h3 { margin: 0; font-size: 1.15rem; }
.mail-send-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}
.mail-send-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
}
.mail-send-field input,
.mail-send-field textarea {
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    font: inherit;
    font-weight: 400;
    resize: vertical;
}
.mail-send-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.4rem;
}
.mail-send-cancel {
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
}
.mail-send-submit {
    padding: 0.6rem 1.3rem;
    border: none;
    border-radius: 8px;
    background: #16a34a;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.mail-send-submit:hover:not(:disabled) { background: #15803d; }
.mail-send-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Mail açılma durumu rozeti */
.mail-open.yes { color: #15803d; font-weight: 600; }
.mail-open.no { color: #94a3b8; }

.mail-send-hint { font-weight: 400; color: #64748b; font-size: 0.8rem; line-height: 1.3; }
.mail-send-hint strong { color: #334155; }

/* Potansiyel alıcı analiz aksiyonları */
.buyer-results-actions { display: flex; gap: 0.5rem; }
.buyer-refresh-button, .buyer-analyze-button {
    padding: 0.5rem 1rem; border-radius: 8px; font-weight: 600; cursor: pointer; border: 1px solid var(--border-strong); background: #fff;
}
.buyer-analyze-button { background: var(--brand); color: #fff; border-color: var(--brand); }
.buyer-analyze-button:hover:not(:disabled) { background: #1d4ed8; }
.buyer-refresh-button:hover:not(:disabled) { background: #f1f5f9; }
.buyer-refresh-button:disabled, .buyer-analyze-button:disabled { opacity: 0.6; cursor: not-allowed; }
.buyer-empty-row { text-align: center; color: #64748b; padding: 1.5rem; }


/* ===== Mail Görevleri ===== */
.mail-tasks-header h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.mail-tasks-subtitle {
  margin: 0 0 16px;
  color: #7e8797;
  font-size: 13px;
}

.mail-tasks-alert {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
}

.mail-tasks-alert.error {
  color: #9b1c1c;
  background: #fdecec;
  border: 1px solid #f5c2c2;
}

.mail-tasks-alert.info {
  color: #1e4620;
  background: #eaf7ec;
  border: 1px solid #bfe3c4;
}

.mail-tasks-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  align-items: start;
}

.mail-tasks-list,
.mail-tasks-detail {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.mail-tasks-create {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mail-tasks-input,
.mail-tasks-select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 13px;
  background: #fff;
}

.mail-tasks-select.small {
  width: auto;
  min-width: 120px;
  padding: 6px 9px;
}

.mail-tasks-btn {
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: #2f3a4d;
  background: var(--brand-weak);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 150ms ease, background 150ms ease;
}

.mail-tasks-btn:hover {
  border-color: var(--brand);
}

.mail-tasks-btn.primary {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.mail-tasks-btn.primary:hover {
  background: var(--brand-strong);
}

.mail-tasks-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.mail-tasks-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mail-task-item {
  display: flex;
  align-items: stretch;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
}

.mail-task-item.active {
  border-color: var(--brand);
  background: var(--brand-weak);
}

.mail-task-item-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.mail-task-item-main strong {
  font-size: 13px;
}

.mail-task-item-sub {
  color: #5b6472;
  font-size: 13px;
}

.mail-task-item-meta {
  color: #a1a8b4;
  font-size: 12px;
}

.mail-task-item-delete {
  flex: 0 0 auto;
  width: 34px;
  border: none;
  color: #b23b3b;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.mail-task-item-delete:hover {
  background: #fdecec;
}

.mail-tasks-empty {
  padding: 14px;
  color: #7e8797;
  font-size: 13px;
  text-align: center;
}

.mail-tasks-empty.large {
  padding: 48px 14px;
}

.mail-task-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.mail-task-field label {
  color: #5b6472;
  font-size: 13px;
  font-weight: 600;
}

.mail-task-recipients-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mail-task-recipients-head h3 {
  margin: 0;
  font-size: 15px;
}

.mail-task-picker {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px dashed var(--brand-weak);
  border-radius: 12px;
  background: #fafbfe;
}

.mail-task-picker-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 260px;
  margin-bottom: 10px;
  overflow-y: auto;
}

.mail-task-picker-item {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: #2f3a4d;
  background: #fff;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.mail-task-picker-item.selected {
  border-color: var(--brand);
  background: var(--brand-weak);
}

.mail-task-picker-item.disabled {
  opacity: 0.5;
  cursor: default;
}

.mail-task-recipient-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mail-task-recipient-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
}

.mail-task-recipient-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mail-task-recipient-info strong {
  font-size: 13px;
}

.mail-task-recipient-info span {
  color: #7e8797;
  font-size: 13px;
}

.mail-task-recipient-country {
  align-self: flex-start;
  color: #5b6472 !important;
}

.mail-task-preview-actions {
  margin: 18px 0 12px;
}

.mail-task-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mail-task-preview-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafbfe;
}

.mail-task-preview-item.error {
  border-color: #f5c2c2;
  background: #fdf2f2;
}

.mail-task-preview-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mail-task-preview-head strong {
  font-size: 13px;
}

.mail-task-preview-head span {
  color: #7e8797;
  font-size: 13px;
}

.mail-task-preview-lang {
  margin-left: auto;
  padding: 1px 9px;
  border-radius: 999px;
  color: var(--brand-strong) !important;
  background: var(--brand-weak);
  font-size: 12px;
  font-weight: 600;
}

.mail-task-preview-subject {
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
}

.mail-task-preview-text {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  color: #3a4150;
  font-size: 13px;
  line-height: 1.55;
}

.mail-task-preview-error {
  color: #9b1c1c;
  font-size: 13px;
}

@media (max-width: 900px) {
  .mail-tasks-layout {
    grid-template-columns: 1fr;
  }
}

/* ===== Paylaşılan UI bileşenleri (components/ui.rs) ===== */
.ui-empty {
  padding: 14px;
  color: #7e8797;
  font-size: 13px;
  text-align: center;
}
.ui-empty.large { padding: 48px 14px; }

.ui-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.ui-btn {
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 150ms ease, background 150ms ease;
}
.ui-btn-primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.ui-btn-primary:hover { background: var(--brand-strong); }
.ui-btn-secondary { color: #2f3a4d; background: var(--brand-weak); }
.ui-btn-secondary:hover { border-color: var(--brand); }
.ui-btn-danger { color: #fff; background: #c0392b; border-color: #c0392b; }
.ui-btn-danger:hover { background: #a93226; }
.ui-btn:disabled { opacity: 0.6; cursor: default; }

.ui-toast-viewport {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
}
.ui-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 11px;
  box-shadow: 0 8px 24px rgba(42, 54, 83, 0.14);
  font-size: 13px;
  animation: ui-toast-in 180ms ease;
}
.ui-toast.success { color: #1e4620; background: #eaf7ec; border: 1px solid #bfe3c4; }
.ui-toast.error   { color: #9b1c1c; background: #fdecec; border: 1px solid #f5c2c2; }
.ui-toast.info    { color: #1d3b6e; background: var(--brand-weak); border: 1px solid var(--brand); }
.ui-toast-msg { flex: 1; line-height: 1.45; }
.ui-toast-close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}
.ui-toast-close:hover { opacity: 1; }
@keyframes ui-toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 560px) {
  .ui-toast-viewport { left: 12px; right: 12px; max-width: none; }
}


/* ===== Temel görünüm katmanı (foundation) ===== */
::selection { background: var(--brand-weak); color: var(--brand-strong); }
:where(a) { color: var(--brand); }
:where(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
* { scrollbar-width: thin; scrollbar-color: #c5cdc6 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #cdd5cd;
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
  background: #b3bcb3;
  background-clip: padding-box;
}


/* ===== Potansiyel Alıcılar — web3forms tarzı: temiz, ferah, profesyonel ===== */
.buyer-analysis-page { display: grid; gap: 18px; }
.buyer-analysis-intro,
.buyer-results-card,
.buyer-detail-card {
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
.buyer-analysis-intro { padding: 22px 24px; }
.buyer-intro-icon { width: 44px; height: 44px; border-radius: 11px; background: #eef1fb; color: var(--brand); }
.buyer-intro-icon svg { width: 21px; height: 21px; }
.buyer-analysis-intro h2 { font-size: 16px; font-weight: 600; color: #1a2230; }
.buyer-analysis-intro p { font-size: 13px; color: #6b7480; }
.buyer-intro-summary { border: 1px solid #e6e8ee; border-radius: 11px; background: #fafbfc; }
.buyer-intro-summary strong { color: var(--brand); }
.buyer-results-header { padding: 18px 22px; }
.buyer-results-header h3,
.buyer-contact-panel h4 {
  font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: #1a2230;
  letter-spacing: 0; text-transform: none;
}
.buyer-table th {
  background: #fff; color: #98a1ad; font-size: 11px; font-weight: 600; letter-spacing: 0.01em;
  text-transform: none; padding: 12px 22px; border-bottom: 1px solid #eef0f3;
}
.buyer-table td { padding: 15px 22px; border-top: 1px solid #f2f3f6; font-size: 13px; color: #3f4a5c; }
.buyer-table tbody tr:hover { background: #fafbfc; }
.buyer-table tbody tr.selected { background: #f5f8fe; }
.buyer-score { width: 42px; height: 42px; border-radius: 11px; font-size: 15px; font-weight: 600;
  background: #eef1fb; color: var(--brand); }
.buyer-score.high { background: #e7f4ec; color: #1f7a45; }
.buyer-score.medium { background: #fdf4e3; color: #9a6a12; }
.buyer-score.low { background: #eef0f3; color: #5f6b7a; }
.buyer-match-status {
  border-radius: 7px; font-size: 11px; font-weight: 600; padding: 4px 10px;
  letter-spacing: 0; text-transform: none; min-height: 0;
}
.buyer-match-status.high { background: #e7f4ec; color: #1f7a45; }
.buyer-match-status.medium { background: #fdf4e3; color: #9a6a12; }
.buyer-match-status.low { background: #eef0f3; color: #5f6b7a; }
.buyer-action-cell button {
  border: 1px solid #d8dce4; border-radius: 8px; color: #44506a; background: #fff;
  font-size: 12px; font-weight: 600; padding: 6px 13px; height: auto;
}
.buyer-action-cell button:hover { border-color: var(--brand); color: var(--brand); }
.buyer-detail-header { padding: 20px 24px; }
.buyer-detail-header h3 { font-size: 17px; font-weight: 600; }
.buyer-detail-actions button {
  border-radius: 9px; background: var(--brand); border: 1px solid var(--brand); color: #fff;
  font-size: 12px; font-weight: 600; padding: 9px 16px;
}
.buyer-detail-meta { margin: 20px 24px 0; border: 1px solid #eef0f3; border-radius: 12px; background: #eef0f3; }
.buyer-detail-meta > div { padding: 14px 16px; }
.buyer-insight-grid { padding: 18px 24px; gap: 14px; }
.buyer-insight-card { border: 1px solid #eef0f3; border-radius: 12px; background: #fff; }
.buyer-contact-panel { margin: 0 24px 24px; border: 1px solid #eef0f3; border-radius: 12px; }
.buyer-contact-panel > header { background: #fafbfc; }

/* Sayılar standart arayüz fontunda kalsın (özel/monospace font dayatma) */
.buyer-score { font-family: var(--font-sans); }
.buyer-code-list code { font-family: var(--font-sans); }

/* ===== Mail Oluşturucu — ağaç (ana metin + çeviriler) ===== */
.composer-page { display: grid; gap: 18px; }
.composer-card, .composer-tree-card {
  border: 1px solid #e6e8ee; border-radius: 14px; background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); padding: 18px 20px;
}
.composer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.composer-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: #1a2230; }
.composer-head-sub { font-size: 12px; color: #8a93a3; }
.composer-pane-subject {
  width: 100%; height: 40px; padding: 0 12px; margin-bottom: 10px;
  border: 1px solid #d8dce4; border-radius: 9px; font-size: 13px; color: #2a3342; background: #fff;
}
.composer-textarea {
  width: 100%; min-height: 340px; padding: 13px 14px; resize: vertical;
  border: 1px solid #d8dce4; border-radius: 9px; font-size: 13px; line-height: 1.6;
  color: #2a3342; background: #fff; font-family: inherit;
}
.composer-main-actions { display: flex; gap: 10px; margin-top: 12px; }
.composer-primary-btn {
  border: 1px solid var(--brand); border-radius: 9px; background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 600; padding: 9px 16px; cursor: pointer;
}
.composer-primary-btn:disabled { opacity: 0.6; cursor: default; }
.composer-ghost-btn {
  border: 1px solid #d8dce4; border-radius: 9px; background: #fff; color: #44506a;
  font-size: 13px; font-weight: 600; padding: 9px 14px; cursor: pointer;
}
.composer-ghost-btn:hover { border-color: var(--brand); color: var(--brand); }
.composer-translate-hint {
  margin-top: 16px; padding: 14px; border: 1px dashed #d3dae6; border-radius: 10px;
  color: #8a93a3; font-size: 13px; text-align: center;
}
.composer-translate-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef0f3; }
.composer-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.composer-field select {
  height: 36px; padding: 0 10px; border: 1px solid #d8dce4; border-radius: 9px;
  font-size: 13px; color: #2a3342; background: #fff;
}
.composer-translate-button {
  border: 1px solid #d8dce4; border-radius: 9px; background: #f5f7fb; color: #2f3a4d;
  font-size: 13px; font-weight: 600; padding: 8px 16px; cursor: pointer;
}
.composer-translate-button:hover { border-color: var(--brand); }
.composer-translate-button:disabled { opacity: 0.55; cursor: default; }

.composer-tree-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.composer-tree-head h3 { margin: 0; font-size: 14px; font-weight: 600; color: #1a2230; }
.composer-tree-head span { font-size: 12px; color: #8a93a3; }
.composer-tree-empty { padding: 18px; text-align: center; color: #8a93a3; font-size: 13px; }
.composer-tree { display: flex; flex-direction: column; }
.composer-tree-node { border-top: 1px solid #f1f2f5; }
.composer-tree-node:first-child { border-top: 0; }
.composer-tree-mail { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.composer-tree-mail.active { background: #f5f8fe; border-radius: 8px; }
.composer-tree-toggle {
  width: 26px; height: 30px; border: 0; background: transparent; color: #8a93a3;
  font-size: 12px; cursor: pointer; flex: 0 0 26px;
}
.composer-tree-main {
  flex: 1; min-width: 0; display: grid; gap: 2px; padding: 8px 6px;
  border: 0; background: transparent; text-align: left; cursor: pointer;
}
.composer-tree-main strong { font-size: 13px; color: #1f2a3d; }
.composer-tree-main span { font-size: 12px; color: #8a93a3; }
.composer-tree-del {
  width: 30px; height: 30px; border: 0; background: transparent; color: #b06a6a;
  font-size: 17px; line-height: 1; cursor: pointer; flex: 0 0 30px;
}
.composer-tree-children {
  margin-left: 26px; padding-left: 8px; border-left: 1px solid #e6e8ee; margin-bottom: 6px;
}
.composer-tree-translation { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.composer-tree-lang {
  flex: 0 0 auto; font-size: 11px; font-weight: 600; color: #1f4e9b;
  background: #eef2fd; border-radius: 6px; padding: 2px 8px;
}
.composer-tree-tr-main {
  flex: 1; min-width: 0; border: 0; background: transparent; text-align: left; cursor: pointer; padding: 4px 0;
}
.composer-tree-preview {
  display: block; font-size: 12px; color: #3f4a5c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.composer-tree-icon {
  width: 28px; height: 28px; border: 1px solid #e6e8ee; border-radius: 7px; background: #fff;
  color: #5f6b7a; font-size: 13px; cursor: pointer; flex: 0 0 28px;
}
.composer-tree-icon:hover { border-color: var(--brand); color: var(--brand); }
.composer-tree-icon.danger { color: #b06a6a; }
.composer-tree-icon.danger:hover { border-color: #b06a6a; color: #b06a6a; }
.composer-tree-add {
  display: inline-flex; margin: 4px 0 2px; padding: 6px 4px;
  border: 0; background: transparent; color: var(--brand); font-size: 12px; font-weight: 600; cursor: pointer;
}

/* Mail Oluşturucu — okunabilirlik + çeviri editörü başlığı */
.composer-pane-subject, .composer-textarea { font-size: 14px; }
.composer-head h3 { font-size: 16px; }
.composer-head-sub { font-size: 13px; }
.composer-tree-head h3 { font-size: 15px; }
.composer-tree-head span { font-size: 13px; }
.composer-tree-main strong { font-size: 14px; }
.composer-tree-main span { font-size: 13px; }
.composer-tree-lang { font-size: 12px; }
.composer-tree-preview { font-size: 13px; }
.composer-tree-add { font-size: 13px; }
.composer-tree-icon { font-size: 14px; }
.composer-field select, .composer-translate-button { font-size: 14px; }
.composer-translate-hint { font-size: 13px; }
.composer-primary-btn, .composer-ghost-btn { font-size: 14px; }
.composer-translate-head {
  font-size: 13px; font-weight: 600; color: #44506a; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid #f1f2f5;
}

/* Gönderim modalı — açılma takibi seçeneği */
.mail-send-track {
  display: flex; align-items: center; gap: 9px; margin: 6px 0 14px;
  font-size: 13px; color: #44506a; cursor: pointer;
}
.mail-send-track input { width: 16px; height: 16px; accent-color: var(--brand); }

/* Şirket Yönetimi — hedef pazar bölgeleri (çoklu seçim) */
.admin-regions-field { display: flex; flex-direction: column; gap: 8px; grid-column: 1 / -1; }
.admin-regions-title { font-size: 13px; font-weight: 600; color: #44506a; }
.admin-region-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 7px; }
.admin-region-chip {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border: 1px solid #d8dce4; border-radius: 9px; font-size: 13px; color: #2a3342; cursor: pointer; background: #fff;
}
.admin-region-chip.selected { border-color: var(--brand); background: #eef2fd; color: var(--brand); }
.admin-region-chip input { width: 15px; height: 15px; accent-color: var(--brand); flex: 0 0 15px; }

/* Potansiyel Alıcı — tıklanabilir iletişim linkleri */
.buyer-contact-link { color: var(--brand); font-weight: 600; text-decoration: none; word-break: break-all; }
.buyer-contact-link:hover { text-decoration: underline; }

/* Mail ağacı — ikon & tipografi düzeltmesi */
.composer-tree-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 30px; flex: 0 0 24px; padding: 0;
}
.composer-tree-chevron {
  width: 14px; height: 14px; fill: none; stroke: #8a93a3; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transform: rotate(-90deg); transition: transform 140ms ease;
}
.composer-tree-chevron.open { transform: rotate(0deg); }
.composer-tree-action {
  flex: 0 0 auto; padding: 4px 11px; border: 1px solid #e1e5dd; border-radius: 7px;
  background: #fff; color: #51607b; font-size: 12px; font-weight: 600; cursor: pointer; line-height: 1.4;
  transition: border-color 140ms ease, color 140ms ease;
}
.composer-tree-action:hover { border-color: var(--brand); color: var(--brand); }
.composer-tree-action.danger { color: #b06a6a; }
.composer-tree-action.danger:hover { border-color: #b06a6a; color: #b06a6a; }
.composer-tree-del { font-size: 16px; }
.composer-tree-main strong { font-size: 14px; }
.composer-tree-main span { font-size: 13px; }
.composer-tree-lang { font-size: 12px; padding: 3px 9px; }
.composer-tree-preview { font-size: 13px; }
.composer-tree-add { font-size: 13px; }

/* composer-tree-main görünürlük düzeltmesi (<button> + grid yerine block) */
.composer-tree-main {
  display: block; width: 100%; min-width: 0; color: #1f2a3d;
}
.composer-tree-main strong { display: block; line-height: 1.35; }
.composer-tree-main span { display: block; margin-top: 2px; line-height: 1.3; }
.composer-tree-mail:hover { background: #fafbfc; border-radius: 8px; }

/* ===== Gönderilen Mailler — temiz/tutarlı UI ===== */
.mail-history-card {
  border-color: #e6e8ee; border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
.mail-history-card > header { padding: 16px 20px; }
.mail-history-card header h2 { font-size: 16px; font-weight: 600; }
.mail-history-card header p { font-size: 13px; }
.mail-history-card > header > span {
  color: var(--brand); background: var(--brand-weak); font-weight: 600; font-size: 12px; padding: 4px 11px;
}
.mail-history-table th { font-weight: 600; letter-spacing: 0.03em; }
.mail-history-table th, .mail-history-table td { padding: 13px 20px; }
.mail-history-table td span:not(.mail-status) { font-size: 13px; color: #2a3342; }
.mail-history-table td small { font-size: 12px; color: #8a93a3; max-width: 360px; }
.mail-history-table tbody tr:hover { background: #fafbfc; }
.mail-status { border-radius: 7px; }
.mail-status.sent { color: #1f7a45; background: #eef7f1; border-color: #cfe9da; }
.mail-status.failed { color: #9b1c1c; background: #fdecec; border-color: #f3cccc; }
.mail-open.yes { color: #1f7a45; font-weight: 600; }
.mail-open.no { color: #8a93a3; }

/* ============ Mail Görevleri — Gönderim Zamanlaması ============ */
.mail-task-schedule {
    margin-top: 1.25rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface, #fff);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.mail-task-schedule-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.mail-task-schedule-head h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.02rem;
    color: var(--text-strong, #1d2433);
}
.mail-task-status {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border-strong, #cbd5e1);
    color: #475569;
    background: #f1f5f9;
    white-space: nowrap;
}
.mail-task-status.status-scheduled { color: #1d4ed8; background: #eff4ff; border-color: #bcd0ff; }
.mail-task-status.status-sending   { color: #b45309; background: #fff7ed; border-color: #fed7aa; }
.mail-task-status.status-sent      { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.mail-task-status.status-failed    { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }

.mail-task-schedule-current {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: #475569;
    padding: 0.5rem 0.7rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.mail-task-schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}
.mail-task-schedule-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.mail-task-schedule-field > span {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}
.mail-task-track {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    color: #334155;
    cursor: pointer;
}
.mail-task-track input { width: 16px; height: 16px; accent-color: var(--brand); }
.mail-task-schedule-hint {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    line-height: 1.45;
    color: #64748b;
}
.mail-task-schedule-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.mail-tasks-btn.ghost {
    background: transparent;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.mail-tasks-btn.ghost:hover { background: #fef2f2; }

.mail-task-recipient-status {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--border-strong, #cbd5e1);
    color: #475569;
    background: #f1f5f9;
}
.mail-task-recipient-status.status-sent    { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.mail-task-recipient-status.status-failed  { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.mail-task-recipient-status.status-skipped { color: #92400e; background: #fffbeb; border-color: #fde68a; }

/* ============ GTİP/HS Kod Öncelik ============ */
.trade-code-priority-select {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border-strong, #cbd5e1);
    border-radius: 8px;
    background: #fff;
    color: #334155;
}
.trade-code-item {
    align-items: center;
}
/* Önceliğe göre soldan ince renk şeridi */
.trade-code-item.priority-high {
    border-left: 3px solid #c2410c;
    background: #fff7ed;
}
.trade-code-item.priority-low {
    border-left: 3px solid #94a3b8;
}
.trade-code-item:not(.priority-high):not(.priority-low) {
    border-left: 3px solid var(--brand);
}

/* ============ Tüm Alıcılar (Root) ============ */
.all-buyers-header { margin-bottom: 1.25rem; }
.all-buyers-header h2 {
    font-family: var(--font-display);
    margin: 0 0 0.3rem;
}
.all-buyers-header p {
    margin: 0;
    color: #64748b;
    font-family: var(--font-sans);
    font-size: 0.9rem;
}
.all-buyers-total {
    display: inline-block;
    margin-top: 0.6rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand);
    background: var(--brand-weak, #eef2fb);
    border: 1px solid var(--border);
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
}
.all-buyers-group {
    margin-top: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
.all-buyers-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}
.all-buyers-group-head h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-strong, #1d2433);
}
.all-buyers-meta {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    color: #64748b;
    white-space: nowrap;
}
.all-buyers-contact {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-family: var(--font-sans);
    font-size: 0.82rem;
}
.all-buyers-contact a { color: var(--brand); text-decoration: none; }
.all-buyers-contact a:hover { text-decoration: underline; }

/* ===== Tüm Alıcılar tablosu — hizalama (kayma) düzeltmesi ===== */
/* buyer-table sütun genişlikleri buyer-analiz sayfasına göreydi; burada kendi 6 sütunumuza göre ayarlıyoruz. */
.all-buyers-group .buyer-table th,
.all-buyers-group .buyer-table td { white-space: normal; vertical-align: middle; }
.all-buyers-group .buyer-table th:first-child,
.all-buyers-group .buyer-table td:first-child { width: 76px; }          /* Skor */
.all-buyers-group .buyer-table th:nth-child(2),
.all-buyers-group .buyer-table td:nth-child(2) { width: 24%; }           /* Firma */
.all-buyers-group .buyer-table th:nth-child(3),
.all-buyers-group .buyer-table td:nth-child(3) { width: 12%; }           /* Ülke */
.all-buyers-group .buyer-table th:nth-child(4),
.all-buyers-group .buyer-table td:nth-child(4) { width: 22%; }           /* Tip */
.all-buyers-group .buyer-table th:nth-child(5),
.all-buyers-group .buyer-table td:nth-child(5) { width: 13%; }           /* Durum */
.all-buyers-group .buyer-table th:last-child,
.all-buyers-group .buyer-table td:last-child { width: auto; }            /* İletişim (kalan alan) */
.all-buyers-group .buyer-table tbody tr { cursor: default; }
.all-buyers-group .buyer-table tbody tr:hover { background: #f8faff; }
.all-buyers-contact { overflow-wrap: anywhere; word-break: break-word; }

/* Mobilde buyer-analiz'in kart dönüşümü bu tabloyu bozuyor; normal, yatay kaydırılır tabloya çeviriyoruz. */
@media (max-width: 620px) {
  .all-buyers-group .buyer-table { table-layout: auto; min-width: 640px; }
  .all-buyers-group .buyer-table thead { display: table-header-group; }
  .all-buyers-group .buyer-table tbody { display: table-row-group; gap: 0; padding: 0; }
  .all-buyers-group .buyer-table tbody tr {
    display: table-row; grid-template-columns: none; gap: 0; padding: 0; border: 0; border-radius: 0;
  }
  .all-buyers-group .buyer-table td {
    display: table-cell; width: auto; padding: 12px 14px; border: 0; border-top: 1px solid var(--border);
  }
  .all-buyers-group .buyer-table td:first-child { grid-row: auto; }
  .all-buyers-group .buyer-table td:nth-child(3) { display: table-cell; }
}

/* ===== Tüm Alıcılar — Durum rozeti taşma düzeltmesi ===== */
/* Uzun durum metni rozet içinde sarsın, sütunundan taşıp İletişim'e binmesin. */
.all-buyers-group .buyer-match-status {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
  min-height: 0;
  line-height: 1.3;
  padding: 3px 8px;
  text-align: left;
}
/* Durum'a daha fazla yer, Tip/Firma'dan al. */
.all-buyers-group .buyer-table th:nth-child(2),
.all-buyers-group .buyer-table td:nth-child(2) { width: 22%; }   /* Firma */
.all-buyers-group .buyer-table th:nth-child(3),
.all-buyers-group .buyer-table td:nth-child(3) { width: 11%; }   /* Ülke */
.all-buyers-group .buyer-table th:nth-child(4),
.all-buyers-group .buyer-table td:nth-child(4) { width: 18%; }   /* Tip */
.all-buyers-group .buyer-table th:nth-child(5),
.all-buyers-group .buyer-table td:nth-child(5) { width: 21%; }   /* Durum */
.all-buyers-contact { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }

/* ============ Gönderilen Mailler — profesyonel yeniden tasarım ============ */
.sent-mails-page .mail-history-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.sent-mails-page .mail-history-card > header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; border-bottom: 1px solid var(--border); background: #fff;
}
.sent-mails-page .mail-history-card > header h2 {
  margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 600;
  color: var(--text-strong, #1d2433);
}
.sent-mails-page .mail-history-card > header p {
  margin: 3px 0 0; font-size: 13px; color: #667085;
}
.sent-mails-page .mail-history-card > header > span {
  flex: none; padding: 5px 12px; border-radius: 999px;
  background: var(--brand-weak, #eef2fb); color: var(--brand);
  border: 1px solid var(--border);
  font-family: var(--font-sans); font-size: 12px; font-weight: 700; line-height: 1;
}
.sent-mails-page .mail-history-card > header > span::after { content: " mail"; font-weight: 600; }

.sent-mails-page .mail-history-table-wrap { overflow-x: auto; }
.sent-mails-page .mail-history-table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 0; }
.sent-mails-page .mail-history-table th {
  position: sticky; top: 0; z-index: 1; text-align: left; padding: 11px 22px;
  background: #f8fafc; border-bottom: 1px solid var(--border);
  font-family: var(--font-sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: #8995aa;
}
.sent-mails-page .mail-history-table td {
  padding: 14px 22px; border-bottom: 1px solid var(--border); vertical-align: middle;
  font-family: var(--font-sans); font-size: 13px; color: #3a4459;
}
.sent-mails-page .mail-history-table tbody tr:last-child td { border-bottom: 0; }
.sent-mails-page .mail-history-table tbody tr:hover { background: #f9fafb; }
.sent-mails-page .mail-history-table th:nth-child(1) { width: 24%; }
.sent-mails-page .mail-history-table th:nth-child(2) { width: 34%; }
.sent-mails-page .mail-history-table th:nth-child(3) { width: 13%; }
.sent-mails-page .mail-history-table th:nth-child(4) { width: 17%; }
.sent-mails-page .mail-history-table th:nth-child(5) { width: 12%; }
.sent-mails-page .mail-history-table td span:not(.mail-status):not(.mail-open) {
  display: block; color: #1d2433; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sent-mails-page .mail-history-table td small {
  display: block; margin-top: 3px; font-size: 12px; color: #98a2b3; font-weight: 400;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sent-mails-page .mail-status {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.sent-mails-page .mail-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sent-mails-page .mail-status.sent   { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.sent-mails-page .mail-status.failed { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.sent-mails-page .mail-status.queued { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.sent-mails-page .mail-open.yes { color: #15803d; font-weight: 600; }
.sent-mails-page .mail-open.no  { color: #98a2b3; }
.sent-mails-page .mail-history-table td:last-child { color: #667085; white-space: nowrap; }
.sent-mails-page .mail-empty-state { padding: 56px 24px; text-align: center; color: #667085; }
.sent-mails-page .mail-empty-state strong { display: block; margin-top: 10px; color: #1d2433; font-size: 15px; }

/* ===== Gönderilen Mailler — sayfalama ===== */
.sent-mails-page .mail-pagination {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--border);
}
.sent-mails-page .mail-page-btn {
  min-width: 32px; height: 32px; padding: 0 9px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; color: #475569;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600; cursor: pointer;
}
.sent-mails-page .mail-page-btn:hover:not(:disabled) { background: #f1f5f9; }
.sent-mails-page .mail-page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.sent-mails-page .mail-page-btn:disabled { opacity: 0.45; cursor: default; }

/* ===== Potansiyel Alıcılar — sayfalama ===== */
.buyer-analysis-page .buyer-pagination {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--border);
}
.buyer-analysis-page .mail-page-btn {
  min-width: 32px; height: 32px; padding: 0 9px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; color: #475569;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600; cursor: pointer;
}
.buyer-analysis-page .mail-page-btn:hover:not(:disabled) { background: #f1f5f9; }
.buyer-analysis-page .mail-page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.buyer-analysis-page .mail-page-btn:disabled { opacity: 0.45; cursor: default; }

/* ===== Potansiyel Alıcı — detay modal ===== */
.buyer-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(16, 24, 40, 0.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 20px; overflow-y: auto;
}
.buyer-analysis-page .buyer-modal {
  position: relative; width: 100%; max-width: 1060px; margin: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 24px 64px rgba(16, 24, 40, 0.28);
  padding: 26px 28px; max-height: calc(100vh - 96px); overflow-y: auto;
}
.buyer-modal-close {
  position: absolute; top: 14px; right: 16px; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 9px; background: #fff;
  color: #667085; font-size: 20px; line-height: 1; cursor: pointer;
}
.buyer-modal-close:hover { background: #f1f5f9; color: #1d2433; }

/* ===== Detay modal — fontları biraz büyüt (yalnızca popup) ===== */
.buyer-analysis-page .buyer-modal .buyer-detail-header h3 { font-size: 20px; }
.buyer-analysis-page .buyer-modal .buyer-detail-header p { font-size: 14px; }
.buyer-analysis-page .buyer-modal .buyer-detail-meta span { font-size: 12px; }
.buyer-analysis-page .buyer-modal .buyer-detail-meta strong { font-size: 14px; }
.buyer-analysis-page .buyer-modal .buyer-insight-card h4 { font-size: 14px; }
.buyer-analysis-page .buyer-modal .buyer-insight-card p { font-size: 13px; line-height: 1.6; }
.buyer-analysis-page .buyer-modal .buyer-contact-panel h4 { font-size: 15px; }
.buyer-analysis-page .buyer-modal .buyer-contact-item span { font-size: 12px; }
.buyer-analysis-page .buyer-modal .buyer-contact-item strong,
.buyer-analysis-page .buyer-modal .buyer-contact-item a { font-size: 14px; }
.buyer-analysis-page .buyer-modal code { font-size: 12px; }

/* ===== Tüm Alıcılar — katlanır şirketler + sayfalama + modal ===== */
.all-buyers-group-head {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 18px; background: #f8fafc; border: 0; border-bottom: 1px solid var(--border);
  text-align: left; cursor: pointer; font-family: inherit;
}
.all-buyers-group-head:hover { background: #f1f5f9; }
.all-buyers-toggle {
  flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong, #cbd5e1); border-radius: 7px; background: #fff;
  color: var(--brand); font-size: 16px; font-weight: 700; line-height: 1;
}
.all-buyers-group-head h3 {
  margin: 0; font-family: var(--font-display); font-size: 15px; color: var(--text-strong, #1d2433);
}
.all-buyers-group-head .all-buyers-meta { margin-left: auto; }
.all-buyers-row { cursor: pointer; }

.all-buyers-page .buyer-pagination {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
  padding: 12px 18px; border-top: 1px solid var(--border);
}
.all-buyers-page .mail-page-btn {
  min-width: 32px; height: 32px; padding: 0 9px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; color: #475569;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600; cursor: pointer;
}
.all-buyers-page .mail-page-btn:hover:not(:disabled) { background: #f1f5f9; }
.all-buyers-page .mail-page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.all-buyers-page .mail-page-btn:disabled { opacity: 0.45; cursor: default; }

/* modal — her iki sayfa için ortak */
.buyer-modal {
  position: relative; width: 100%; max-width: 1060px; margin: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 24px 64px rgba(16, 24, 40, 0.28);
  padding: 26px 28px; max-height: calc(100vh - 96px); overflow-y: auto;
}
.buyer-modal .buyer-detail-header h3 { font-size: 20px; }
.buyer-modal .buyer-detail-header p { font-size: 14px; }
.buyer-modal .buyer-detail-meta span { font-size: 12px; }
.buyer-modal .buyer-detail-meta strong { font-size: 14px; }
.buyer-modal .buyer-insight-card h4 { font-size: 14px; }
.buyer-modal .buyer-insight-card p { font-size: 13px; line-height: 1.6; }
.buyer-modal .buyer-contact-panel h4 { font-size: 15px; }
.buyer-modal .buyer-contact-item span { font-size: 12px; }
.buyer-modal .buyer-contact-item strong,
.buyer-modal .buyer-contact-item a { font-size: 14px; }
.buyer-modal code { font-size: 12px; }

/* ===== Gönderilen mail görüntüleme modal ===== */
.sent-mails-page .mail-history-table tbody tr.mail-row { cursor: pointer; }
.sent-mails-page .buyer-modal.mail-view-modal { max-width: 760px; }
.mail-view-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; padding-right: 34px; }
.mail-view-head h3 { margin: 0; font-family: var(--font-display); font-size: 18px; color: var(--text-strong, #1d2433); }
.mail-view-meta {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px;
  padding: 14px 16px; background: #f8fafc; border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 16px;
}
.mail-view-meta > div { display: flex; flex-direction: column; gap: 3px; }
.mail-view-meta span { font-size: 11px; color: #909aab; text-transform: uppercase; letter-spacing: 0.03em; }
.mail-view-meta strong { font-size: 13px; color: #354055; font-weight: 600; word-break: break-word; }
.mail-view-body { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; max-height: 50vh; overflow-y: auto; background: #fff; }
.mail-view-body pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--font-sans); font-size: 13.5px; line-height: 1.65; color: #2a3342; }

/* ===== Potansiyel Alıcı Analizi intro — sabit yükseklik ===== */
.buyer-analysis-page .buyer-analysis-intro {
  box-sizing: border-box;
  min-height: 104px;
}

/* Alıcı Analizi grid'i: satırları germe, içeriğe göre üstten hizala (intro boşluğu düzeltmesi) */
.buyer-analysis-page { align-content: start; }

/* ===== Bildirimler (zil) ===== */
.notification-wrap { position: relative; }
.notification-badge {
  position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  border-radius: 999px; background: #e5484d; color: #fff;
  font-family: var(--font-sans); font-size: 10px; font-weight: 700; line-height: 1;
}
.notification-overlay { position: fixed; inset: 0; z-index: 60; }
.notification-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 70;
  width: 340px; max-height: 440px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 16px 44px rgba(16, 24, 40, 0.18);
}
.notification-panel-head {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-size: 14px; color: var(--text-strong, #1d2433);
}
.notification-list { list-style: none; margin: 0; padding: 0; }
.notification-item {
  display: flex; flex-direction: column; gap: 3px; padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
.notification-item:last-child { border-bottom: 0; }
.notification-item.unread { background: #f4f7ff; }
.notification-item strong { font-size: 13px; color: #1d2433; font-weight: 600; }
.notification-item span { font-size: 12px; color: #4a5569; }
.notification-item small { font-size: 11px; color: #98a2b3; }
.notification-empty { padding: 22px 16px; text-align: center; color: #667085; font-size: 13px; }

/* ===== Şirketim — profesyonel düzenleme ===== */
.company-avatar {
  flex: none; width: 60px; height: 60px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
  font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1;
}
.company-page .company-profile-heading { gap: 18px; }
.company-page .company-identity-text { flex: 1; }
/* bilgi grid: tablo çizgileri yerine havadar boşluk */
.company-page .company-info-grid { gap: 20px 44px; padding: 24px 27px; }
.company-page .company-info-item { border: 0; padding: 0; gap: 5px; }
.company-page .company-info-item span {
  text-transform: none; letter-spacing: 0; color: #8791a3; font-size: 12px; font-weight: 600;
}
.company-page .company-info-item strong { font-size: 13.5px; color: #2a3447; line-height: 1.55; }
.company-page .company-info-item strong.muted { color: #aeb6c4; font-weight: 500; }
.company-page .company-website-link { font-size: 13.5px; }

/* ===== Dashboard hedef pazar haritası ===== */
.target-map-wrap { margin-top: 16px; }
.target-map-svg { width: 100%; height: auto; display: block; }
.target-map-bg { fill: #f1f6fb; }
.target-map-grid { stroke: #dce5f0; stroke-width: 1; stroke-dasharray: 4 7; }
.map-region { cursor: pointer; }
.map-region rect {
  fill: #ffffff; stroke: #cdd5e1; stroke-width: 1.4;
  transition: fill 120ms ease, stroke 120ms ease;
}
.map-region text {
  fill: #475569; font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  pointer-events: none;
}
.map-region:hover rect { fill: #eef2fb; stroke: var(--brand); }
.map-region.selected rect { fill: var(--brand); stroke: var(--brand); }
.map-region.selected text { fill: #ffffff; }
.target-map-status { font-size: 12px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.target-map-hint { margin: 10px 0 0; font-size: 12px; color: #98a2b3; }

/* ===== Hedef pazar — gerçek dünya haritası + işaretçiler ===== */
.target-map-globe {
  position: relative; width: 100%; max-width: 700px; margin: 16px auto 4px;
}
.target-map-img { display: block; width: 100%; height: auto; }
.map-pin {
  position: absolute; transform: translate(-7px, -50%);
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 0; padding: 0; cursor: pointer; white-space: nowrap;
}
.map-pin-dot {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: #9aa6bf; box-shadow: 0 0 0 4px rgba(154, 166, 191, 0.22);
  transition: background 120ms ease, box-shadow 120ms ease;
}
.map-pin-label {
  font-family: var(--font-sans); font-size: 11.5px; font-weight: 600; color: #475569;
  background: rgba(255, 255, 255, 0.88); padding: 1px 6px; border-radius: 6px;
}
.map-pin:hover .map-pin-dot { background: var(--brand); }
.map-pin:hover .map-pin-label { color: #1d2433; }
.map-pin.selected .map-pin-dot { background: var(--brand); box-shadow: 0 0 0 5px rgba(53, 80, 126, 0.25); }
.map-pin.selected .map-pin-label { color: #fff; background: var(--brand); }
.target-map-status { font-size: 12px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.target-map-hint { margin: 8px 0 0; font-size: 12px; color: #98a2b3; }

/* Detay meta hücreleri: içeriği üstten hizala (GTİP kodlarının sarkmasını önler) */
.buyer-detail-meta > div { align-content: start; }

/* Dashboard son çalışmalar — tıklanabilir satır + mail modal genişliği */
.activity-row.activity-clickable { cursor: pointer; border-radius: 10px; transition: background 120ms ease; }
.activity-row.activity-clickable:hover { background: #f6f8fc; }
.buyer-modal.mail-view-modal { max-width: 760px; }

/* Mail Oluşturucu ağaç — çeviri önizleme sağa taşmasını engelle (min-width:0 zinciri) */
.composer-page { min-width: 0; }
.composer-card, .composer-tree-card { min-width: 0; }
.composer-tree, .composer-tree-node, .composer-tree-children { min-width: 0; }
.composer-tree-translation { min-width: 0; overflow: hidden; }
.composer-tree-tr-main { overflow: hidden; }


/* Potansiyel alıcılar — dışa aktarma (XLS) */
.buyer-export-card {
  background: #fff;
  border: 1px solid #e4e9f1;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 24px;
}
.buyer-export-head { min-width: 0; flex: 1 1 220px; }
.buyer-export-head h3 { margin: 0 0 4px; font-size: 1rem; color: #1f2937; }
.buyer-export-head p { margin: 0; font-size: 0.82rem; color: #6b7280; line-height: 1.4; }
.buyer-export-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.buyer-export-field { display: flex; flex-direction: column; gap: 4px; }
.buyer-export-field span { font-size: 0.72rem; font-weight: 600; color: #6b7280; text-transform: none; }
.buyer-export-field select,
.buyer-export-field input {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d5dbe6;
  border-radius: 9px;
  font-size: 0.85rem;
  color: #1f2937;
  background: #fff;
}
.buyer-export-btn {
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 9px;
  background: #6366f1;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.buyer-export-btn:hover { background: #4f46e5; }


/* Mail Kuralları */
.mail-rules-page { display: flex; flex-direction: column; gap: 18px; align-content: start; }
.mail-rules-intro h2 { margin: 0 0 6px; font-size: 1.15rem; color: #1f2937; }
.mail-rules-intro p { margin: 0; color: #6b7280; font-size: 0.86rem; line-height: 1.5; }
.mail-rule-form-card, .mail-rules-list {
  background: #fff; border: 1px solid #e4e9f1; border-radius: 14px; padding: 20px;
}
.mail-rule-form-card h3, .mail-rules-list-head h3 { margin: 0 0 14px; font-size: 1rem; color: #1f2937; }
.mail-rule-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.mail-rule-field span { font-size: 0.75rem; font-weight: 600; color: #6b7280; }
.mail-rule-field input, .mail-rule-field select,
.mail-rule-condition-row input, .mail-rule-condition-row select {
  height: 38px; padding: 0 10px; border: 1px solid #d5dbe6; border-radius: 9px;
  font-size: 0.85rem; color: #1f2937; background: #fff;
}
.mail-rule-conditions { margin-bottom: 14px; }
.mail-rule-conditions-title { display: block; font-size: 0.75rem; font-weight: 600; color: #6b7280; margin-bottom: 8px; }
.mail-rule-condition-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.mail-rule-condition-row input { flex: 1 1 auto; min-width: 0; }
.mail-rule-remove {
  width: 34px; height: 34px; border: 1px solid #e4e9f1; border-radius: 8px;
  background: #f8fafc; color: #b91c1c; font-size: 1.1rem; cursor: pointer; line-height: 1;
}
.mail-rule-add {
  border: 1px dashed #c7d0de; background: #f8fafc; color: #4f46e5; border-radius: 8px;
  padding: 7px 12px; font-size: 0.8rem; cursor: pointer;
}
.mail-rule-check { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 0.85rem; color: #374151; }
.mail-rule-check input { width: 16px; height: 16px; }
.mail-rule-form-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.mail-rule-preview-btn, .mail-rule-run-btn {
  height: 38px; padding: 0 16px; border: 1px solid #c7d0de; border-radius: 9px;
  background: #f8fafc; color: #374151; font-size: 0.83rem; font-weight: 600; cursor: pointer;
}
.mail-rule-preview-count { font-size: 0.85rem; font-weight: 600; color: #4f46e5; }
.mail-rule-save-btn {
  height: 38px; padding: 0 20px; border: none; border-radius: 9px; margin-left: auto;
  background: #6366f1; color: #fff; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.mail-rule-save-btn:hover { background: #4f46e5; }
.mail-rules-list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mail-rules-list-head h3 { margin: 0; }
.mail-rules-empty { color: #6b7280; font-size: 0.86rem; margin: 0; }
.mail-rules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.mail-rule-card { border: 1px solid #e4e9f1; border-radius: 12px; padding: 14px; background: #fff; }
.mail-rule-card.passive { opacity: 0.62; }
.mail-rule-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mail-rule-card-head strong { font-size: 0.92rem; color: #1f2937; }
.mail-rule-badge { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: #4f46e5; background: #eef2ff; border-radius: 999px; padding: 3px 9px; }
.mail-rule-card.passive .mail-rule-badge { color: #6b7280; background: #f1f5f9; }
.mail-rule-card-cond { font-size: 0.82rem; color: #374151; margin: 0 0 8px; line-height: 1.5; }
.mail-rule-card-meta { font-size: 0.78rem; color: #6b7280; margin: 0 0 12px; line-height: 1.4; }
.mail-rule-card-actions { display: flex; gap: 8px; }
.mail-rule-card-actions button {
  border: 1px solid #c7d0de; background: #f8fafc; color: #374151; border-radius: 8px;
  padding: 6px 12px; font-size: 0.78rem; cursor: pointer;
}
.mail-rule-card-actions .mail-rule-delete { color: #b91c1c; }


/* Potansiyel alıcılar — sayfa başına sonuç seçici */
.buyer-results-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.buyer-pagesize { display: inline-flex; align-items: center; gap: 8px; }
.buyer-pagesize span { font-size: 0.78rem; font-weight: 600; color: #6b7280; }
.buyer-pagesize select {
  height: 34px; padding: 0 8px; border: 1px solid #d5dbe6; border-radius: 8px;
  font-size: 0.83rem; color: #1f2937; background: #fff;
}

.buyer-date-cell { white-space: nowrap; color: #6b7280; font-size: 0.82rem; }

/* Sıralanabilir başlıklar: pasifken de tıklanabilir olduğu belli olsun. */
.buyer-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    border-radius: 6px;
    transition: background-color 0.12s ease, color 0.12s ease;
}
.buyer-sortable:hover { color: #4f46e5; background: rgba(79, 70, 229, 0.07); }
.buyer-sortable.is-sorted { color: #4f46e5; background: rgba(79, 70, 229, 0.1); }

.buyer-sort-ind {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1em;
    margin-left: 0.3em;
    font-size: 0.7rem;
    line-height: 1;
    color: #9aa2b1;               /* pasif: soluk ama görünür */
    transition: color 0.12s ease;
}
.buyer-sortable:hover .buyer-sort-ind { color: #4f46e5; }
.buyer-sort-ind.is-active { color: #4f46e5; font-size: 0.78rem; font-weight: 700; }


/* === Potansiyel alıcılar: Tarih kolonu + küçük ekran görsel düzeltmeleri === */
.buyer-table th:nth-child(2) { width: 24%; }
.buyer-table th:nth-child(6) { width: 104px; }
.buyer-date-cell { white-space: nowrap; }

@media (max-width: 620px) {
  /* Tarih hücresini kartta doğru sütuna yerleştir — skor rozetiyle iç içe geçmeyi önler */
  .buyer-table td:nth-child(6) {
    grid-column: 2;
    padding-right: 75px;
    color: #7a8496;
    font-size: 11px;
  }
  .buyer-table td:nth-child(6)::before {
    content: "Tarih: ";
    color: #9aa4b5;
    font-weight: 600;
  }
  /* Skor rozeti tüm satırları kapsasın (4 içerik satırı) */
  .buyer-table td:first-child { grid-row: 1 / 5; }

  /* Sayfa başına seçici + dışa aktarma kartı: küçük ekranda temiz sığsın */
  .buyer-pagesize { justify-content: flex-start; flex-wrap: wrap; }
  .buyer-export-card { flex-direction: column; align-items: stretch; gap: 14px; }
  .buyer-export-form { width: 100%; }
  .buyer-export-field { flex: 1 1 100%; }
  .buyer-export-field select,
  .buyer-export-field input { width: 100%; }
}


/* Potansiyel alıcılar — küçük ekranda "Durum" rozeti / aksiyon butonu çakışması düzeltmesi */
@media (max-width: 620px) {
  /* Aksiyon butonunu absolute yerine kart akışına al -> çakışma biter */
  .buyer-table .buyer-action-cell {
    position: static;
    grid-column: 2;
    justify-self: start;
    width: auto;
    margin-top: 2px;
  }
  /* Absolute buton için ayrılan sağ boşluğa gerek kalmadı */
  .buyer-table td:nth-child(5),
  .buyer-table td:nth-child(6) {
    padding-right: 0;
  }
  /* Uzun durum metni tek satırda taşmasın, sarsın */
  .buyer-match-status { white-space: normal; }
}

/* Durum rozeti: uzun metin her ekranda alt satıra sarsın */
.buyer-table .buyer-match-status { white-space: normal; }


/* Dashboard — canlı akış konsolu (harita üstü, açık tema) */
.console-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 17px;
  box-shadow: 0 8px 25px rgba(45, 57, 87, 0.035);
  overflow: hidden;
  margin-bottom: 16px;
}
.console-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; background: #fafbfd; border-bottom: 1px solid var(--border);
}
.console-title { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.console-title strong { font-size: 14px; color: #293348; font-family: var(--font-display); letter-spacing: -0.02em; }
.console-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); flex: none; }
.console-dot.live { background: var(--brand); box-shadow: 0 0 0 4px rgba(82,110,225,0.18); }
.console-actions { display: inline-flex; gap: 8px; }
.console-actions button {
  border: 1px solid var(--border); background: #f8fafc; color: #536075;
  border-radius: 8px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.console-actions button:hover { background: #eef2f8; color: #293348; }
.console-log {
  height: 494px; overflow-y: auto; padding: 12px 18px; background: #fbfcfe;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.65;
}
.console-empty { color: #98a2b3; margin: 0; }
.console-line { display: flex; gap: 10px; padding: 2px 0; white-space: pre-wrap; word-break: break-word; }
.console-ts { color: #98a2b3; flex: none; }
.console-src { color: var(--brand); flex: none; font-weight: 700; }
.console-msg { color: #4a5569; min-width: 0; }
.console-line.lvl-warn .console-msg { color: #9a6a12; }
.console-line.lvl-error .console-msg { color: #c0392b; }
.console-line.lvl-error .console-src { color: #c0392b; }
.console-line.lvl-success .console-msg { color: #1f7a45; }

.console-caret { color: var(--brand); margin-left: 1px; animation: console-caret-blink 1s steps(1) infinite; }
@keyframes console-caret-blink { 50% { opacity: 0; } }
.console-line.typing .console-msg { color: #293348; }

.mail-rule-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mail-rule-form-head h3 { margin: 0 0 14px; }
.mail-rule-cancel {
  border: 1px solid #c7d0de; background: #f8fafc; color: #536075;
  border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer;
}

.console-listening { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: #94a3b8; font-size: 11.5px; }
.console-pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex: none; animation: console-pulse 1.4s ease-in-out infinite; }
.console-listening.offline .console-pulse { background: #f59e0b; }
@keyframes console-pulse { 0%,100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }


/* CRM — pipeline kanban */
.crm-page { display: flex; flex-direction: column; gap: 16px; }
.crm-intro h2 { margin: 0 0 4px; font-size: 1.15rem; color: #1f2937; }
.crm-intro p { margin: 0; color: #6b7280; font-size: 0.85rem; }
.crm-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.crm-column { flex: 0 0 250px; background: #f4f6fa; border: 1px solid #e4e9f1; border-radius: 12px; padding: 10px; }
.crm-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 0.82rem; font-weight: 700; color: #374151; }
.crm-col-count { background: #fff; border: 1px solid #e4e9f1; border-radius: 999px; padding: 1px 8px; font-size: 0.72rem; color: #6b7280; }
.crm-column.stage-won .crm-col-head { color: #1f7a45; }
.crm-column.stage-lost .crm-col-head { color: #b91c1c; }
.crm-cards { display: flex; flex-direction: column; gap: 8px; min-height: 20px; }
.crm-card { background: #fff; border: 1px solid #e4e9f1; border-radius: 10px; padding: 10px; cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.crm-card:hover { box-shadow: 0 4px 12px rgba(45,57,87,0.08); }
.crm-card.selected { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(82,110,225,0.18); }
.crm-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crm-card-top strong { font-size: 0.85rem; color: #1f2937; line-height: 1.25; }
.crm-card-top .buyer-score { width: 34px; height: 34px; font-size: 11px; flex: none; }
.crm-card-loc { margin: 6px 0; font-size: 0.75rem; color: #8d97a8; }
.crm-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crm-card-foot select { height: 28px; border: 1px solid #d5dbe6; border-radius: 7px; font-size: 0.72rem; color: #374151; background: #fff; max-width: 130px; }
.crm-card-acts { font-size: 0.7rem; color: #98a2b3; white-space: nowrap; }
/* detay */
.crm-detail { background: #fff; border: 1px solid #e4e9f1; border-radius: 14px; padding: 18px; }
.crm-detail-head { display: flex; align-items: center; justify-content: space-between; }
.crm-detail-head h3 { margin: 0; font-size: 1rem; color: #1f2937; }
.crm-detail-close { border: none; background: #f1f5f9; color: #536075; width: 30px; height: 30px; border-radius: 8px; font-size: 1.1rem; cursor: pointer; }
.crm-detail-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 14px; font-size: 0.8rem; color: #6b7280; }
.crm-detail-meta a { color: var(--brand); text-decoration: none; }
.crm-note-form { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.crm-note-form select { height: 38px; border: 1px solid #d5dbe6; border-radius: 9px; padding: 0 8px; font-size: 0.83rem; background: #fff; }
.crm-note-form input { flex: 1 1 220px; min-width: 0; height: 38px; border: 1px solid #d5dbe6; border-radius: 9px; padding: 0 10px; font-size: 0.85rem; }
.crm-note-form button { height: 38px; padding: 0 18px; border: none; border-radius: 9px; background: var(--brand); color: #fff; font-weight: 600; font-size: 0.85rem; cursor: pointer; }
.crm-timeline { display: flex; flex-direction: column; gap: 8px; }
.crm-empty { color: #98a2b3; font-size: 0.83rem; margin: 0; }
.crm-activity { display: flex; flex-direction: column; gap: 2px; border-left: 3px solid #e4e9f1; padding: 4px 0 4px 10px; }
.crm-activity-type { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; color: var(--brand); }
.crm-activity-body { font-size: 0.85rem; color: #374151; }
.crm-activity-meta { font-size: 0.72rem; color: #98a2b3; }

/* CRM v2 — takip + mail aktiviteleri */
.crm-na { display: inline-block; font-size: 0.7rem; color: #6b7280; background: #eef2f8; border-radius: 6px; padding: 2px 7px; margin-bottom: 6px; }
.crm-na.overdue { color: #b91c1c; background: #fdeaea; }
.crm-followups { background: #fff; border: 1px solid #e4e9f1; border-radius: 12px; padding: 12px 16px; }
.crm-followups h4 { margin: 0 0 8px; font-size: 0.82rem; color: #374151; }
.crm-followup-list { display: flex; gap: 8px; flex-wrap: wrap; }
.crm-followup { border: 1px solid #d5dbe6; background: #f8fafc; border-radius: 8px; padding: 5px 12px; font-size: 0.78rem; color: #374151; cursor: pointer; }
.crm-followup.overdue { border-color: #f3c0c0; background: #fdeaea; color: #b91c1c; }
.crm-next-action { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.crm-next-action label { font-size: 0.8rem; color: #6b7280; }
.crm-next-action input { height: 34px; border: 1px solid #d5dbe6; border-radius: 8px; padding: 0 8px; font-size: 0.83rem; }
.crm-activity.mail_sent .crm-activity-type { color: #536ee0; }
.crm-activity.mail_opened .crm-activity-type { color: #1f7a45; }
/* CRM pipeline dashboard kartı */
.crm-pipe-card { grid-column: 1 / -1; }
.crm-pipe-row { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 24px 20px; }
.crm-pipe-stage { flex: 1 1 90px; min-width: 90px; border: 1px solid #e4e9f1; border-radius: 10px; padding: 10px 12px; background: #fafbfd; text-align: center; }
.crm-pipe-stage b { display: block; font-size: 1.4rem; color: #293348; font-family: var(--font-display); }
.crm-pipe-stage span { font-size: 0.72rem; color: #8d97a8; }
.crm-pipe-stage.won { background: #eefaf1; border-color: #cdead6; }
.crm-pipe-stage.lost { background: #fdf1f1; }

/* CRM v3 — toolbar / metrik / export */
.crm-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.crm-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.crm-metrics { font-size: 0.8rem; color: #6b7280; }
.crm-export-btn { height: 34px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid #c7d0de; border-radius: 8px; background: #f8fafc; color: #374151; font-size: 0.8rem; font-weight: 600; text-decoration: none; }
.crm-export-btn:hover { background: #eef2f8; }
.crm-stage-reason { font-size: 0.82rem; color: #374151; background: #f8fafc; border-left: 3px solid var(--brand); padding: 6px 10px; border-radius: 6px; margin: 0 0 12px; }

/* CRM — görsel tamamlamalar (yükleme, boş durum, rozet, kontroller, mobil) */
.crm-intro-text { min-width: 0; }
.crm-loading { color: #8d97a8; font-size: 0.85rem; margin: 4px 0; }
.crm-empty-state {
  background: #fff; border: 1px dashed #d5dbe6; border-radius: 14px;
  padding: 28px 24px; text-align: center;
}
.crm-empty-state h3 { margin: 0 0 6px; font-size: 1rem; color: #293348; }
.crm-empty-state p { margin: 0 auto; max-width: 460px; font-size: 0.85rem; color: #8d97a8; line-height: 1.55; }
.crm-col-empty { margin: 6px 0; text-align: center; color: #c2cbdb; font-size: 0.9rem; }

/* aşama rozeti */
.crm-stage-badge {
  font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  border-radius: 999px; padding: 3px 10px; background: #eef2f8; color: #536075; white-space: nowrap;
}
.crm-stage-badge.stage-contacted { background: #e9edff; color: #4257c4; }
.crm-stage-badge.stage-qualified { background: #eae7ff; color: #5b46c9; }
.crm-stage-badge.stage-proposal { background: #fdf4e3; color: #9a6a12; }
.crm-stage-badge.stage-won { background: #e7f4ec; color: #1f7a45; }
.crm-stage-badge.stage-lost { background: #fdeaea; color: #b91c1c; }

/* detay başlık + kontroller */
.crm-detail-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.crm-detail-title h3 { margin: 0; }
.crm-detail-title .buyer-score { width: 32px; height: 32px; font-size: 11px; flex: none; }
.crm-detail-controls { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.crm-ctl { display: flex; flex-direction: column; gap: 4px; }
.crm-ctl span { font-size: 0.72rem; font-weight: 600; color: #8d97a8; }
.crm-ctl select, .crm-ctl input {
  height: 36px; border: 1px solid #d5dbe6; border-radius: 9px; padding: 0 10px;
  font-size: 0.83rem; color: #1f2937; background: #fff;
}

/* kart okunabilirlik */
.crm-card-top strong { min-width: 0; overflow-wrap: anywhere; }
.crm-cards { min-height: 34px; }

@media (max-width: 720px) {
  .crm-intro { flex-direction: column; align-items: stretch; }
  .crm-toolbar { justify-content: space-between; }
  .crm-metrics { font-size: 0.76rem; }
  .crm-column { flex: 0 0 78vw; }
  .crm-note-form input { flex: 1 1 100%; }
  .crm-detail-controls { gap: 10px; }
  .crm-ctl { flex: 1 1 140px; }
  .crm-ctl select, .crm-ctl input { width: 100%; }
}

/* CRM — arama + kademeli gösterim (büyük listeler) */
.crm-search {
  height: 34px; min-width: 240px; flex: 1 1 240px; max-width: 340px;
  border: 1px solid #d5dbe6; border-radius: 8px; padding: 0 12px;
  font-size: 0.82rem; color: #1f2937; background: #fff;
}
.crm-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(82,110,225,.12); }
.crm-more {
  width: 100%; border: 1px dashed #c7d0de; background: #fff; color: #536075;
  border-radius: 9px; padding: 8px 10px; font-size: 0.76rem; font-weight: 600; cursor: pointer;
}
.crm-more:hover { background: #f4f6fa; color: #293348; }
@media (max-width: 720px) { .crm-search { max-width: none; min-width: 0; } }

/* CRM — üyelik (dahil et / çıkar) */
.crm-add-btn {
  height: 34px; padding: 0 14px; border: 1px solid var(--brand); border-radius: 8px;
  background: #eef1ff; color: var(--brand); font-size: 0.8rem; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.crm-add-btn:hover { background: #e2e7ff; }
.crm-add-panel { background: #fff; border: 1px solid #e4e9f1; border-radius: 12px; padding: 14px 16px; }
.crm-add-panel h4 { margin: 0 0 10px; font-size: 0.85rem; color: #374151; }
.crm-add-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.crm-add-item {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  border: 1px solid #e4e9f1; border-radius: 9px; padding: 7px 10px; background: #fafbfd;
}
.crm-add-name { flex: 1 1 auto; min-width: 0; font-size: 0.82rem; color: #293348; overflow-wrap: anywhere; }
.crm-add-loc { font-size: 0.72rem; color: #8d97a8; white-space: nowrap; }
.crm-add-item button {
  border: none; background: var(--brand); color: #fff; border-radius: 7px;
  padding: 5px 10px; font-size: 0.74rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.crm-detail-head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.crm-remove-btn {
  border: 1px solid #f0c9c9; background: #fdf3f3; color: #b91c1c;
  border-radius: 8px; padding: 6px 12px; font-size: 0.76rem; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.crm-remove-btn:hover { background: #fbe9e9; }

/* Gönderilen Mailler — rapor dışa aktarma */
.mail-history-standalone > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mail-report-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.mail-report-form label { display: flex; flex-direction: column; gap: 4px; }
.mail-report-form label span { font-size: 0.72rem; font-weight: 600; color: #8d97a8; }
.mail-report-form input {
  height: 36px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px;
  font-size: 0.83rem; color: #354055; background: #fff;
}
.mail-report-form button {
  height: 36px; padding: 0 16px; border: 1px solid var(--border); border-radius: 9px;
  background: #f8fafc; color: #536075; font-size: 0.8rem; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.mail-report-form button:hover { background: #eef2f8; color: #293348; }
@media (max-width: 720px) {
  .mail-history-standalone > header { align-items: stretch; }
  .mail-report-form { width: 100%; }
  .mail-report-form label { flex: 1 1 130px; }
  .mail-report-form input { width: 100%; }
}

/* Ajanda: etkinlik düzenleme butonu */
.selected-event-edit svg { stroke: currentColor; stroke-width: 1.8; }

/* === Fuarlar: sektör süzgeci açıkken arama kapsamı uyarısı === */
.fairs-search-scope {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 10px;
    padding: 8px 11px;
    border-radius: 8px;
    background: rgba(79, 70, 229, 0.07);
    color: #4a5268;
    font-size: 0.8rem;
    line-height: 1.35;
}
.fairs-search-scope button {
    padding: 0;
    border: 0;
    background: none;
    color: #4f46e5;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}
.fairs-search-scope button:hover { color: #3730a3; }
