* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.tcp-portal {
  background: linear-gradient(135deg, #eef3f9, #f8fafc 48%, #e8eef6);
  color: #172033;
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}
body.tcp-portal a { text-decoration: none; }
.tcp-shell {
  background: rgba(244, 247, 251, .72);
  border: 1px solid rgba(203, 213, 225, .72);
  border-radius: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  height: min(760px, calc(100vh - 40px));
  margin: max(20px, calc((100vh - 760px) / 2)) auto;
  max-width: 1286px;
  min-height: 620px;
  overflow: hidden;
  width: min(1286px, calc(100vw - 48px));
}
.tcp-left {
  display: grid;
  gap: 16px;
  grid-template-rows: 89px minmax(0, 1fr);
  margin: 28px;
  min-height: 0;
  min-width: 0;
}
.tcp-brand {
  background:
    linear-gradient(90deg, rgba(255,255,255,.88) 0, rgba(255,255,255,.66) 38%, rgba(255,255,255,.18) 63%, rgba(255,255,255,0) 76%),
    linear-gradient(135deg, rgba(37,99,235,.94), rgba(14,165,233,.82)),
    url("/assets/plugin_assets/redmine_portal/brand-background-7192d388.jpg") center/cover no-repeat;
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .12);
  isolation: isolate;
  overflow: hidden;
  padding: 13px 22px;
  position: relative;
}
.tcp-brand::before {
  background: rgba(255, 255, 255, .66);
  clip-path: polygon(0 0, 91% 0, 72% 100%, 0 100%);
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: min(504px, 86%);
  z-index: -1;
}
.tcp-brand a { color: #111; display: inline-flex; flex-direction: column; }
.tcp-brand img { display: block; height: 29px; max-width: 250px; object-fit: contain; object-position: left; }
.tcp-brand span { color: #111; font-size: 12px; font-weight: 800; line-height: 1.25; margin-top: 7px; }
.tcp-announcement {
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.tcp-announcement-body { flex: 1; min-height: 0; overflow: auto; padding: 26px; scrollbar-color: #6aa7d7 #e4edf3; }
.tcp-announcement-body h1, .tcp-announcement-body h2, .tcp-announcement-body h3 {
  border: 0;
  color: #172033;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 12px;
}
.tcp-announcement-body p { color: #334155; line-height: 1.6; margin: 0 0 16px; }
.tcp-announcement-body a { color: #2563eb; overflow-wrap: anywhere; }
.tcp-announcement-body .wiki-anchor { display: none; }
.tcp-announcement-body a:hover { text-decoration: underline; }
.tcp-resources { border-top: 1px solid #cbd5e1; display: grid; gap: 10px; grid-template-columns: 1fr 1fr; padding: 14px 26px 18px; }
.tcp-resource {
  align-items: center;
  background: #fff;
  border: 1px solid #b7d3ff;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
  color: #2563eb;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 10px;
  height: 42px;
  justify-content: center;
  min-width: 0;
}
.tcp-resource:hover, .tcp-resource:focus-visible { border-color: #2563eb; box-shadow: 0 10px 24px rgba(37, 99, 235, .16); }
.tcp-resource::before { border: 2px solid currentColor; border-radius: 4px; content: ""; display: inline-block; height: 15px; width: 15px; }
.tcp-resource-wiki::before { border-radius: 4px 8px 8px 4px; color: #0e7490; }
.tcp-right {
  align-items: center;
  background: #fff;
  border-radius: 22px;
  box-shadow: -16px 0 44px rgba(15, 23, 42, .08);
  display: flex;
  justify-content: center;
  margin: 28px 28px 28px 0;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding: 36px;
}
.tcp-login, .tcp-signed-in { max-width: 480px; width: 100%; }
.tcp-login-intro { margin-bottom: 16px; }
.tcp-login-intro h1, .tcp-signed-in h1 { color: #08112a; font-size: 30px; font-weight: 800; line-height: 1.08; margin: 0 0 8px; }
.tcp-login-intro p, .tcp-signed-in > p { color: #607086; font-size: 13px; font-weight: 600; line-height: 1.45; margin: 0; }
.tcp-field { margin-bottom: 12px; }
.tcp-field > label { color: #111a31; display: block; font-size: 13px; font-weight: 800; line-height: 1.25; margin-bottom: 6px; }
.tcp-input-shell { border: 1px solid #d9dee8; border-radius: 8px; box-shadow: 0 1px 2px rgba(16, 24, 43, .04); height: 42px; position: relative; }
.tcp-input-shell:focus-within { border-color: #3867f0; box-shadow: 0 0 0 3px rgba(56, 103, 240, .13); }
.tcp-input-shell::before { content: ""; left: 18px; position: absolute; top: 50%; transform: translateY(-50%); }
.tcp-input-user::before { border: 2px solid #9aa6b8; border-radius: 3px; height: 13px; width: 18px; }
.tcp-input-password::before { border: 2px solid #9aa6b8; border-radius: 3px; height: 14px; width: 15px; }
.tcp-input-shell input { background: transparent; border: 0; border-radius: 8px; color: #10182b; font-family: inherit; font-size: 14px; font-weight: 600; height: 40px; line-height: 40px; outline: 0; padding: 0 48px 0 52px; width: 100%; }
.tcp-input-shell input::placeholder { color: #a5afbf; }
.tcp-password-toggle { background: transparent url("/assets/plugin_assets/redmine_portal/login-eye-c036eb19.svg") center/22px no-repeat; border: 0; border-radius: 8px; cursor: pointer; height: 34px; position: absolute; right: 10px; top: 3px; width: 34px; }
.tcp-password-toggle:hover, .tcp-password-toggle:focus-visible { background-image: url("/assets/plugin_assets/redmine_portal/login-eye-active-2e77858c.svg"); }
.tcp-options { display: flex; justify-content: flex-end; margin-bottom: 14px; min-height: 20px; }
.tcp-options a, .tcp-contact, .tcp-guide { color: #3266d9; font-size: 12px; font-weight: 800; }
.tcp-options a:hover, .tcp-contact:hover, .tcp-guide:hover { text-decoration: underline; }
.tcp-primary { align-items: center; background: #3167ed; border: 0; border-radius: 8px; box-shadow: 0 10px 24px rgba(43, 100, 231, .28); color: #fff; cursor: pointer; display: flex; font-size: 14px; font-weight: 800; height: 44px; justify-content: center; margin-bottom: 12px; width: 100%; }
.tcp-primary:hover, .tcp-primary:focus-visible { background: #2556d4; }
.tcp-login-action { background: #fff; border: 1px solid #d9dee8; box-shadow: none; color: #172033; height: 40px; }
.tcp-login-action:hover, .tcp-login-action:focus-visible { background: #fff; border-color: #3867f0; color: #3867f0; }
.tcp-guest-form { margin: 0; }
.tcp-guest { background: #fff; border: 1px solid #b7d3ff; border-radius: 8px; color: #2563eb; cursor: pointer; font-size: 13px; font-weight: 800; height: 40px; width: 100%; }
.tcp-guest:hover { background: #eff6ff; }
.tcp-login-extras { text-align: center; }
.tcp-login-extras p { color: #7b8798; font-size: 12px; font-weight: 700; margin: 0 0 10px; }
.tcp-guide { display: block; margin-bottom: 24px; text-align: right; }
.tcp-badges { border-top: 1px solid #e2e6ee; color: #738095; display: flex; font-size: 11px; font-weight: 700; gap: 8px; justify-content: center; padding-top: 14px; }
.tcp-badges span + span::before { content: "·"; margin-right: 8px; }
.tcp-error { background: #fff1f2; border: 1px solid #fecdd3; border-radius: 8px; color: #991b1b; font-size: 12px; font-weight: 800; margin-bottom: 14px; padding: 10px 12px; }
.tcp-signed-in { text-align: center; }
.tcp-stats { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin: 28px 0 18px; }
.tcp-stat { background: #f3f8ff; border: 1px solid #d5e5fb; border-radius: 18px; padding: 16px; text-align: left; }
.tcp-stat strong { color: #2563eb; display: block; font-size: 34px; line-height: 1; }
.tcp-stat span { color: #64748b; display: block; font-weight: 700; margin-top: 8px; }
.tcp-stat-wide { grid-column: 1 / -1; }
.tcp-progress { margin-bottom: 28px; text-align: left; }
.tcp-progress-caption { align-items: center; color: #334155; display: flex; font-size: 13px; justify-content: space-between; margin-bottom: 8px; }
.tcp-progress-caption span { font-weight: 700; }
.tcp-progress-track { background: #e2eaf1; border-radius: 999px; height: 12px; overflow: hidden; }
.tcp-progress-track span { background: linear-gradient(90deg, #2563eb, #06b6d4); border-radius: inherit; display: block; height: 100%; }
@media (max-height: 720px) { .tcp-shell { margin: 20px auto; } }
