:root {
  --ink: #17223b;
  --muted: #667085;
  --navy: #122343;
  --blue: #2764da;
  --blue-dark: #1e4fae;
  --aqua: #3cc4b5;
  --paper: #f7f9fc;
  --line: #e3e9f2;
  --white: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.login-page {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 40%, rgba(69, 158, 222, .10), transparent 31%),
    linear-gradient(135deg, #fafdff 0%, #f7f9fc 55%, #f3f6fb 100%);
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .38;
  background-image: linear-gradient(rgba(30, 64, 108, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(30, 64, 108, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to right, #000, transparent 72%);
}

.ambient { position: fixed; border-radius: 50%; filter: blur(4px); pointer-events: none; }
.ambient-one { width: 360px; height: 360px; left: -220px; top: 24%; border: 1px solid rgba(54, 116, 183, .14); box-shadow: 0 0 80px rgba(61, 147, 203, .08); }
.ambient-two { width: 460px; height: 460px; right: -320px; bottom: -260px; background: rgba(63, 198, 183, .05); }

.site-header {
  position: relative;
  z-index: 2;
  width: 100%;
  border-bottom: 1px solid rgba(218, 226, 237, .95);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 4px 18px rgba(35, 57, 91, .045);
  backdrop-filter: blur(14px);
}

.site-nav {
  width: min(1160px, calc(100% - 56px));
  height: 84px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-logo { display: flex; align-items: center; height: 72px; text-decoration: none; }
.navbar-logo img { display: block; width: 168px; height: 66px; object-fit: contain; object-position: left center; }
.nav-links { height: 100%; display: flex; align-items: center; gap: 34px; }
.nav-links a { position: relative; display: flex; align-items: center; height: 100%; color: #5f6e82; font-size: 13px; font-weight: 600; text-decoration: none; transition: color .18s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--blue); }

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 56px));
  margin: 0 auto;
  padding: 56px 0 68px;
  display: grid;
  grid-template-columns: 1fr 470px;
  gap: clamp(80px, 10vw, 150px);
  align-items: center;
}

.welcome-panel { padding: 10px 0 26px; }
.eyebrow, .overline { color: #55708a; font-size: 11px; font-weight: 700; letter-spacing: .2em; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.eyebrow span { display: inline-block; width: 25px; height: 2px; background: var(--aqua); }
.welcome-panel h1 { margin: 0; color: var(--navy); font: 750 clamp(47px, 5vw, 66px)/1.1 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.045em; }
.welcome-panel h1 em { color: var(--blue); font-style: normal; }
.welcome-panel > p { max-width: 480px; margin: 25px 0 39px; color: #67768b; font-size: 17px; line-height: 1.75; }

.login-card { position: relative; overflow: hidden; background: rgba(255,255,255,.93); border: 1px solid rgba(218,226,237,.95); border-radius: 20px; box-shadow: 0 24px 70px rgba(42, 66, 101, .13), 0 3px 10px rgba(42, 66, 101, .04); }
.card-topline { height: 4px; background: linear-gradient(90deg, var(--blue), #3fa4c5, var(--aqua)); }
.card-content { padding: 42px 44px 36px; text-align: center; }
.card-icon { margin: 0 auto 22px; width: 55px; height: 55px; display: grid; place-items: center; color: var(--blue); border-radius: 16px; background: #eef4ff; box-shadow: inset 0 0 0 1px #dae7fc; }
.card-icon svg { width: 31px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.login-card h2 { margin: 10px 0 11px; color: var(--navy); font: 700 25px/1.3 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.025em; }
.card-copy { max-width: 315px; margin: 0 auto 28px; color: var(--muted); font-size: 14px; line-height: 1.65; }

.login-form { display: flex; flex-direction: column; gap: 18px; text-align: left; }
.field-group { display: flex; flex-direction: column; gap: 7px; }
.field-group label { color: #3d4c61; font-size: 12px; font-weight: 700; }
.field-control { position: relative; display: flex; align-items: center; }
.field-control > svg { position: absolute; left: 14px; width: 18px; z-index: 1; fill: none; stroke: #8492a6; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.field-control input { width: 100%; height: 50px; padding: 0 44px; border: 1px solid #d9e1ec; border-radius: 9px; outline: none; color: var(--ink); background: #fbfcfe; font: 500 13px/1 Inter, ui-sans-serif, system-ui, sans-serif; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.field-control input::placeholder { color: #a0aaba; font-weight: 400; }
.field-control input:hover { border-color: #bdc9d9; background: white; }
.field-control input:focus { border-color: var(--blue); background: white; box-shadow: 0 0 0 3px rgba(39, 100, 218, .11); }
.password-toggle { position: absolute; right: 9px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 7px; color: #7d899a; background: transparent; cursor: pointer; }
.password-toggle:hover { color: var(--blue); background: #edf3fc; }
.password-toggle:focus-visible { outline: 2px solid rgba(39, 100, 218, .35); }
.password-toggle svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.login-button { position: relative; width: 100%; min-height: 52px; margin-top: 4px; padding: 0 18px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 10px; color: white; background: var(--blue); box-shadow: 0 8px 20px rgba(39, 100, 218, .22); font: 700 14px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.login-button .button-arrow { position: absolute; right: 64px; }
.login-button:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(39, 100, 218, .28); }
.login-button:focus-visible { outline: 3px solid rgba(39,100,218,.25); outline-offset: 3px; }
.login-button:disabled { opacity: .75; cursor: wait; transform: none; }

.microsoft-button { width: 100%; min-height: 54px; border-radius: 10px; padding: 0 19px; display: flex; align-items: center; gap: 14px; color: white; background: var(--blue); box-shadow: 0 8px 20px rgba(39, 100, 218, .22); text-decoration: none; font-size: 14px; font-weight: 600; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.microsoft-button:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(39, 100, 218, .28); }
.microsoft-button:focus-visible { outline: 3px solid rgba(39,100,218,.25); outline-offset: 3px; }
.microsoft-button.is-loading { opacity: .8; pointer-events: none; }
.microsoft-logo { display: grid; grid-template-columns: 8px 8px; grid-template-rows: 8px 8px; gap: 2px; }
.microsoft-logo i { display: block; background: white; }
.button-arrow { margin-left: auto; width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.alert { margin: -10px 0 18px; padding: 10px 12px; display: flex; gap: 9px; text-align: left; color: #9b3e3e; border: 1px solid #f1cfcf; border-radius: 8px; background: #fff6f6; font-size: 11.5px; line-height: 1.4; }
.alert[hidden] { display: none; }
.alert svg { flex: 0 0 auto; width: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

.site-footer { position: relative; z-index: 1; width: 100%; min-height: 76px; color: #b8c2d1; background: #11213d; font-size: 11px; }
.footer-inner { width: min(1160px, calc(100% - 56px)); min-height: 76px; margin: 0 auto; display: flex; align-items: center; justify-content: center; text-align: center; }

.dashboard-page { display: grid; grid-template-rows: auto 1fr auto; min-height: 100vh; background: linear-gradient(145deg, #f8fbff, #f3f6fb); }
.dashboard-header { position: relative; z-index: 2; height: 84px; padding: 0 clamp(28px, 6vw, 92px); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.8); }
.dashboard-actions { display: flex; align-items: center; gap: 14px; }
.dashboard-actions form { margin: 0; }
.admin-link { padding: 9px 13px; color: var(--blue); font-size: 12px; font-weight: 700; text-decoration: none; border-radius: 8px; }
.admin-link:hover { background: #edf4ff; }
.sign-out { border: 1px solid #d7e0ec; border-radius: 8px; padding: 9px 16px; color: #40516a; background: white; font: 600 12px Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.sign-out:hover { border-color: #acbbcf; }
.dashboard-main { width: min(860px, calc(100% - 48px)); margin: 0 auto; padding: 100px 0; }
.dashboard-main h1 { margin: 22px 0 8px; color: var(--navy); font: 750 clamp(38px,5vw,58px) Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.04em; }
.dashboard-main > p { color: var(--muted); font-size: 16px; }
.success-badge { display: inline-flex; align-items: center; gap: 7px; color: #277266; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.success-badge span { width: 8px; height: 8px; border-radius: 50%; background: #43b7a3; box-shadow: 0 0 0 5px rgba(67,183,163,.12); }
.profile-card { max-width: 520px; margin-top: 44px; padding: 24px; display: flex; align-items: center; gap: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 14px 40px rgba(45,68,99,.08); }
.avatar { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; color: white; background: var(--navy); font-weight: 700; }
.profile-card div:last-child { display: flex; flex-direction: column; gap: 5px; }
.profile-card small { color: #8a96a8; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.profile-card strong { color: #35445a; font-size: 14px; }

.admin-page { display: grid; grid-template-rows: auto 1fr auto; min-height: 100vh; background: #f4f7fb; }
.admin-main { width: min(1440px, calc(100% - 56px)); margin: 0 auto; padding: 58px 0 72px; }
.admin-heading { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; }
.admin-eyebrow { color: #52708f; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.admin-heading h1 { margin: 10px 0 8px; color: var(--navy); font-size: clamp(31px, 4vw, 44px); letter-spacing: -.04em; }
.admin-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.admin-alert { margin-bottom: 18px; padding: 12px 15px; border-radius: 9px; font-size: 12px; }
.admin-alert.error { color: #963d3d; border: 1px solid #edc9c9; background: #fff5f5; }
.admin-alert.success { color: #25695e; border: 1px solid #bfe1d8; background: #f1fbf8; }

.campaign-composer { margin-bottom: 28px; overflow: hidden; border: 1px solid #dce4ef; border-radius: 14px; background: white; box-shadow: 0 8px 28px rgba(39, 62, 94, .055); }
.new-campaign-button { min-height: 42px; padding: 0 18px; flex-shrink: 0; border-radius: 8px; font: 700 12px Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.new-campaign-button:hover { filter: brightness(.92); }
.new-campaign-button:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.campaign-form { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.campaign-form label { display: flex; flex-direction: column; gap: 7px; color: #405069; font-size: 11px; font-weight: 700; }
.campaign-form label > small { color: #8a96a7; font-size: 10px; font-weight: 400; }
.admin-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.campaign-form input, .campaign-form textarea { width: 100%; border: 1px solid #d8e0eb; border-radius: 8px; padding: 11px 12px; outline: 0; resize: vertical; color: #26364d; background: #fbfcfe; font: 500 12px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
.campaign-form input:focus, .campaign-form textarea:focus { border-color: var(--blue); background: white; box-shadow: 0 0 0 3px rgba(39,100,218,.1); }
.employee-picker { min-width: 0; margin: 0; padding: 0; border: 1px solid #d8e0eb; border-radius: 10px; overflow: hidden; }
.employee-picker legend { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.employee-picker-toolbar { min-height: 60px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #e3e9f1; background: #f8fafd; }
.employee-search-wrap { position: relative; flex: 1; min-width: 180px; }
.employee-search-wrap svg { position: absolute; top: 50%; left: 11px; width: 17px; transform: translateY(-50%); fill: none; stroke: #8090a5; stroke-width: 1.5; stroke-linecap: round; }
.employee-search-wrap input { height: 39px; padding-left: 36px; background: white; }
.employee-picker-toolbar > span { min-width: 72px; color: #5c6c80; font-size: 10px; font-weight: 700; text-align: center; }
.employee-picker-toolbar > .directory-count { color: #8a96a6; font-weight: 500; }
.employee-picker-toolbar > button { min-height: 34px; padding: 0 10px; color: #426994; border: 1px solid #cfdbeb; border-radius: 7px; background: white; font: 700 9.5px Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.employee-picker-toolbar > button:hover { color: var(--blue); border-color: #abc3e7; background: #f4f8ff; }
.employee-options { max-height: 330px; padding: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow-y: auto; background: white; }
.employee-option { min-width: 0; padding: 10px; display: grid !important; grid-template-columns: 18px 34px minmax(0,1fr); align-items: center; gap: 9px !important; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.employee-option:hover { border-color: #dce6f3; background: #f8fbff; }
.employee-option:has(input:checked) { border-color: #bdd2f3; background: #f0f5fe; }
.employee-option.unavailable { cursor: not-allowed; opacity: .55; background: #f7f8fa; }
.employee-option[hidden] { display: none !important; }
.employee-option input { width: 15px; height: 15px; margin: 0; accent-color: var(--blue); box-shadow: none; }
.employee-avatar { width: 34px; height: 34px; display: grid; place-items: center; color: white; border-radius: 9px; background: #294c7c; font-size: 9px; font-weight: 800; }
.employee-details { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.employee-details strong, .employee-details small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-details strong { color: #34455d; font-size: 10.5px; }
.employee-details small { color: #8591a2; font-size: 9px; font-weight: 400; }
.employee-empty { grid-column: 1 / -1; padding: 32px 15px; color: #8996a7; text-align: center; font-size: 11px; }
.campaign-actions { display: flex; justify-content: flex-end; gap: 10px; }
.campaign-actions button { min-height: 42px; padding: 0 17px; border-radius: 8px; font: 700 11px Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.secondary-action { color: #40516a; border: 1px solid #d5deea; background: white; }
.primary-action { color: white; border: 1px solid var(--blue); background: var(--blue); }

.tracking-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 22px; align-items: start; }
.campaign-list, .campaign-report { border: 1px solid #dce4ef; border-radius: 14px; background: white; box-shadow: 0 10px 32px rgba(39, 62, 94, .055); }
.campaign-list { padding: 14px; }
.campaign-list h2 { margin: 5px 8px 13px; color: #405069; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.campaign-item { margin-top: 5px; padding: 12px; display: flex; flex-direction: column; gap: 4px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; }
.campaign-item:hover { background: #f6f9fd; }
.campaign-item.selected { border-color: #cddcf5; background: #f0f5fe; }
.campaign-item strong { overflow: hidden; color: #33445c; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.campaign-item span, .campaign-item small { color: #8b96a6; font-size: 9.5px; }
.empty-copy { padding: 8px; color: #8a96a7; font-size: 11px; }
.campaign-report { min-width: 0; padding: 25px; }
.report-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.report-header span { color: #77879b; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.report-header h2 { margin: 6px 0 0; color: var(--navy); font-size: 22px; }
.report-actions { display: flex; align-items: center; gap: 10px; }
.report-actions > small { max-width: 280px; overflow: hidden; color: #8b96a5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.report-actions form { margin: 0; }
.report-actions button { padding: 7px 10px; color: #a24343; border: 1px solid #efcaca; border-radius: 7px; background: #fff5f5; font: 700 9px Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.report-actions button:hover { color: white; border-color: #b84b4b; background: #b84b4b; }
.metric-grid { margin: 24px 0; display: grid; grid-template-columns: repeat(5, minmax(125px, 1fr)); gap: 10px; }
.metric-grid article { padding: 15px; display: flex; flex-direction: column; gap: 4px; border: 1px solid #e1e7f0; border-radius: 10px; background: #fafcff; }
.metric-grid article > span { color: #66768a; font-size: 10px; font-weight: 700; }
.metric-grid article strong { color: #1f3555; font-size: 27px; letter-spacing: -.04em; }
.metric-grid article small { color: #97a1af; font-size: 8.5px; }
.metric-grid article.amber { border-color: #efdfbd; background: #fffbf2; }
.metric-grid article.green { border-color: #c9e6dd; background: #f4fbf9; }
.tracking-note { margin-bottom: 17px; padding: 10px 12px; color: #6e7c8e; border-radius: 8px; background: #f1f5fa; font-size: 10px; line-height: 1.5; }
.recipient-table-wrap { overflow-x: auto; }
.recipient-table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.recipient-table th { padding: 10px 9px; color: #8490a1; border-bottom: 1px solid #dfe6ef; text-align: left; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.recipient-table td { padding: 13px 9px; color: #5e6d80; border-bottom: 1px solid #edf0f5; vertical-align: middle; }
.recipient-table tbody tr:last-child td { border-bottom: 0; }
.recipient-table td:first-child strong, .recipient-table td:first-child small { max-width: 250px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipient-table td:first-child strong { color: #33445b; font-size: 11px; }
.recipient-table td:first-child small { margin-top: 4px; color: #929dab; font-size: 9px; }
.status { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status.failed { color: #a54141; background: #fff0f0; }
.status.logged { color: #267465; background: #e9f8f4; }
.status.clicked { color: #966412; background: #fff5dc; }
.status.sent { color: #386b9d; background: #eaf3fc; }
.status.ready { color: #657286; background: #eef1f5; }
.empty-report { padding: 90px 20px; text-align: center; }
.empty-report h2 { margin: 0 0 8px; color: var(--navy); }
.empty-report p { color: var(--muted); font-size: 12px; }

.simple-page { display: grid; place-items: center; padding: 32px; background: var(--paper); }
.simple-page main { max-width: 430px; text-align: center; }
.simple-page h1 { font: 700 40px Inter, ui-sans-serif, system-ui, sans-serif; color: var(--navy); margin: 14px 0 8px; }
.simple-page p { color: var(--muted); }
.microsoft-button.compact { width: fit-content; min-height: 46px; margin: 26px auto 0; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; gap: 45px; padding-top: 30px; max-width: 560px; }
  .welcome-panel { text-align: center; }
  .welcome-panel > p { margin-left: auto; margin-right: auto; }
  .eyebrow { justify-content: center; }
  .tracking-layout { grid-template-columns: 1fr; }
  .campaign-list { display: flex; gap: 8px; overflow-x: auto; }
  .campaign-list h2 { display: none; }
  .campaign-item { min-width: 190px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .site-nav { width: calc(100% - 32px); height: 74px; }
  .navbar-logo { height: 64px; }
  .navbar-logo img { width: 125px; height: 56px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 12px; }
  .login-shell { width: min(100% - 32px, 470px); padding: 28px 0 40px; }
  .welcome-panel h1 { font-size: 40px; }
  .welcome-panel > p { margin-top: 19px; font-size: 15px; }
  .card-content { padding: 35px 24px 30px; }
  .footer-inner { width: calc(100% - 32px); min-height: 94px; flex-direction: column; gap: 12px; justify-content: center; }
  .dashboard-header { padding: 0 16px; }
  .admin-link { font-size: 10px; }
  .sign-out { padding: 8px 11px; }
  .admin-main { width: calc(100% - 28px); padding: 38px 0 55px; }
  .admin-field-row { grid-template-columns: 1fr; }
  .campaign-actions { flex-direction: column; }
  .campaign-actions button { width: 100%; }
  .employee-picker-toolbar { flex-wrap: wrap; }
  .employee-search-wrap { flex-basis: 100%; }
  .employee-options { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .campaign-report { padding: 17px; }
}

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