*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Inline math formula rendering (KaTeX) */
.formula {
  display: inline-block;
  vertical-align: middle;
  margin: 0 2px;
}
.formula .katex { font-size: 1em; }

/* Inline image inserted via rich editor */
.inline-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px 0;
  border-radius: 3px;
}

body {
  font-family: ArialRegular, sans-serif;
  font-size: 14px;
  color: #333;
  background: #fff;
}

/* ── Header ── */
header {
  padding: 0;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 8px 6px -4px rgba(0, 0, 0, 0.2);
}

.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 25px 24px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.logo img {
  height: 52px;
  width: auto;
}

/* ── User menu (dashboard) ── */
.user-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.user-menu .caret {
  font-size: 11px;
  color: #555;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  min-width: 130px;
  z-index: 200;
  overflow: hidden;
}

.user-dropdown.open { display: block; }

.user-dropdown-item {
  display: block;
  width: 100%;
  padding: 11px 16px;
  text-align: left;
  background: none;
  border: none;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
}

.user-dropdown-item:hover { background: #f5f5f5; color: #c0393d; }

/* ── Page content wrapper ── */
main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 80px 24px 40px;
}

main.centered {
  padding: 60px 16px 40px;
  display: flex;
  justify-content: center;
}

/* ── Login page ── */
.login-card {
  width: 100%;
  max-width: 380px;
}

.login-card h1 {
  font-size: 22px;
  font-weight: 600;
  color: #a50034;
  margin-bottom: 24px;
}

.field {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
}

.input-wrap {
  position: relative;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 7px 32px 7px 10px;
  border: 1px solid #bbb;
  border-radius: 2px;
  font-size: 14px;
  color: #222;
  outline: none;
  transition: border-color 0.15s;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: #a50034;
}

.input-wrap .caret {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #666;
  font-size: 11px;
}

.hint {
  margin-top: 4px;
  font-size: 12px;
  color: #777;
}

.btn-login {
  display: inline-block;
  margin-top: 8px;
  padding: 9px 24px;
  background: #a50034;
  color: #fff;
  border: none;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}

.btn-login:hover  { background: #8b0029; }
.btn-login:active { background: #720022; }

/* ── Dashboard ── */
.section-title {
  font-size: 15px;
  color: #999;
  margin-bottom: 20px;
  font-weight: 400;
}

.test-card {
  display: inline-flex;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.card-visual {
  width: 320px;
  flex-shrink: 0;
  background: #e8565a;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
}

.card-visual img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.card-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px;
  gap: 120px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #222;
  text-transform: uppercase;
  white-space: nowrap;
}

.btn-go {
  flex-shrink: 0;
  padding: 10px 22px;
  border: 2px solid #c0393d;
  background: #fff;
  color: #c0393d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn-go:hover {
  background: #c0393d;
  color: #fff;
}
