* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
}

:root {
  --primary: #3498db;
  --primary-dark: #2980b9;
  --navy: #2c3e50;
  --navy-deep: #1f2d3a;
  --bg: #f4f6f9;
  --line: #2c3e50;
  --muted: #7f8c8d;
  --font: "Space Grotesk", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --shirt-stroke: #030712;
  --shirt-detail: rgba(255, 255, 255, 0.3);
  --shirt-shadow: rgba(44, 62, 80, 0.14);
  --panel-bg: #eef2f6;
  --panel-grid: rgba(44, 62, 80, 0.07);
  --panel-frame: rgba(44, 62, 80, 0.25);
  --badge-text: #f8fafc;
  --badge-mark: #e5e7eb;
  --badge-phone: #030712;
  --badge-phone-stroke: #f8fafc;
  --badge-screen: #1f2937;
  --caption-text: #2c3e50;
  --caption-box: #ffffff;
  --caption-border: #2c3e50;
}

html {
  font-size: 14px;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--navy);
  background: white;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.main-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}

.form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: white;
  border-right: 2px solid var(--navy);
}

.login-container {
  width: 100%;
  max-width: 460px;
}

.title {
  font-size: clamp(32px, 3vw, 42px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--navy);
  margin-bottom: 10px;
}

.login-header {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 32px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--navy);
}

.messages:empty {
  display: none;
}

.messages {
  margin-bottom: 18px;
}

.alert {
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid;
  border-left-width: 5px;
}

.alert-error,
.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border-color: #721c24;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border-color: #155724;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border-color: #0c5460;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border-color: #856404;
}

.alert-fade {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}

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

.input-field {
  width: 100%;
  height: 52px;
  padding: 0 52px 0 46px;
  border: 2px solid var(--navy);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  outline: none;
  background: white;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.input-field::placeholder {
  color: #a3b0bc;
  font-weight: 400;
}

.input-field:focus {
  border-color: var(--primary-dark);
  box-shadow: 4px 4px 0 var(--primary);
  transform: translate(-2px, -2px);
}

.input-icon {
  position: absolute;
  left: 15px;
  color: var(--navy);
  font-size: 20px;
  pointer-events: none;
}

.toggle-password {
  position: absolute;
  right: 0;
  top: 0;
  width: 52px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-left: 2px solid var(--navy);
  background: var(--bg);
  color: var(--navy);
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.toggle-password:hover {
  background: var(--navy);
  color: white;
}

.login-button {
  width: 100%;
  height: 54px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: var(--primary);
  color: white;
  border: 2px solid var(--navy);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--navy);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}

.login-button:hover {
  background: var(--primary-dark);
}

.login-button:active {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 var(--navy);
}

.login-button i {
  font-size: 22px;
}

.visual-side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--panel-bg);
  background-image:
    linear-gradient(var(--panel-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--panel-grid) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
}

.visual-side.tone-dark {
  --panel-bg: #2c3e50;
  --panel-grid: rgba(255, 255, 255, 0.06);
  --panel-frame: rgba(255, 255, 255, 0.25);
  --shirt-shadow: rgba(0, 0, 0, 0.35);
  --caption-text: #ffffff;
  --caption-box: #1f2d3a;
  --caption-border: rgba(255, 255, 255, 0.5);
}

.frame {
  position: absolute;
  inset: 28px;
  border: 1px solid var(--panel-frame);
  pointer-events: none;
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--panel-frame);
}

.frame::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
}

.frame::after {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
}

.shirt {
  width: min(66%, 480px);
  max-height: 56vh;
  height: auto;
  overflow: visible;
}

.badge {
  opacity: 0;
  animation: fadeIn 0.9s 2.1s ease forwards;
}

.badge-arc {
  font-family: var(--font);
  font-size: 4.3px;
  font-weight: 700;
  letter-spacing: 0.55px;
  fill: var(--badge-text);
}

.badge-slogan {
  font-family: var(--font);
  font-size: 2.7px;
  font-weight: 600;
  fill: var(--badge-text);
}

.badge-b {
  font-family: var(--font);
  font-size: 24px;
  font-weight: 700;
  fill: var(--badge-mark);
}

.badge-crescent {
  fill: var(--badge-mark);
}

.badge-phone-body {
  fill: var(--badge-phone);
  stroke: var(--badge-phone-stroke);
  stroke-width: 0.9;
}

.badge-phone-screen {
  fill: var(--badge-screen);
}

.badge-stitch {
  stroke: var(--badge-text);
  stroke-width: 0.7;
  stroke-dasharray: 1.6 1.2;
  opacity: 0.6;
}

.caption {
  position: relative;
  text-align: center;
  padding: 0 40px;
  opacity: 0;
  transform: translateY(10px);
  animation: riseIn 0.7s 2.5s ease forwards;
}

.caption h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--caption-text);
  margin-bottom: 14px;
}

.caption p {
  display: inline-block;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--caption-text);
  background: var(--caption-box);
  border: 2px solid var(--caption-border);
  box-shadow: 4px 4px 0 var(--caption-border);
}

.shirt-shadow {
  fill: var(--shirt-shadow);
  opacity: 0;
  animation: fadeIn 0.6s 1.5s ease forwards;
}

.shirt-fill {
  opacity: 0;
  animation: fadeIn 0.7s 1.2s ease forwards;
}

.shirt-outline {
  fill: none;
  stroke: var(--shirt-stroke);
  stroke-width: 2.2;
  stroke-linejoin: miter;
  stroke-linecap: square;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw 1.6s 0.3s cubic-bezier(0.6, 0, 0.3, 1) forwards;
}

.shirt-detail {
  fill: none;
  stroke: var(--shirt-detail);
  stroke-width: 1.2;
  stroke-linejoin: miter;
  stroke-linecap: square;
  opacity: 0;
  animation: fadeIn 0.6s 1.9s ease forwards;
}

.shirt-stitch {
  stroke-dasharray: 2.5 2.5;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
  }

  .visual-side {
    display: none;
  }

  .form-side {
    min-height: 100vh;
    border-right: none;
    padding: 32px 20px;
  }

  .title {
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shirt-outline {
    animation: none;
    stroke-dashoffset: 0;
  }

  .shirt-fill,
  .shirt-shadow,
  .shirt-detail,
  .badge,
  .caption {
    animation: none;
    opacity: 1;
    transform: none;
  }
}