:root {
  --bg-main: #FFFFFF;
  --bg-secondary: #F4F6F8;
  --text-primary: #1A1D20;
  --text-muted: #68737D;
  --accent-silver: #A0AAB5;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.1);
  --card-border: rgba(0,0,0,0.04);
  --btn-primary-bg: linear-gradient(135deg, #1A1D20 0%, #3A4148 100%);
  --btn-primary-text: #FFFFFF;
  --radius: 16px;
  --danger-color: #e63946;
}

html.dark-mode {
  --bg-main: #0D0F12;
  --bg-secondary: #16191D;
  --text-primary: #FFFFFF;
  --text-muted: #A0AAB5;
  --accent-silver: #4A525A;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.6);
  --card-border: rgba(255,255,255,0.05);
  --btn-primary-bg: linear-gradient(135deg, #FFFFFF 0%, #E0E0E0 100%);
  --btn-primary-text: #1A1D20;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

.login-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 60px) clamp(15px, 4vw, 30px);
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-box {
  background: var(--bg-main);
  padding: clamp(30px, 5vw, 50px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  width: 100%;
  max-width: 450px;
  border: 1px solid rgba(160, 170, 181, 0.3);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.login-box h2 {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  color: var(--text-primary);
  margin: 0 0 30px 0;
  font-weight: 800;
  letter-spacing: -1px;
  text-align: center;
}

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-group {
  margin-bottom: 20px;
  width: 100%;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.required-asterisk {
  color: var(--danger-color);
  margin-left: 2px;
}

input[type="text"],
input[type="password"],
select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  font-size: 15px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: inherit;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23A0AAB5' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 45px;
}

input:focus,
select:focus {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(160, 170, 181, 0.15);
  outline: none;
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.toggle-password:hover {
  color: var(--text-primary);
}

.info-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 10px 0 25px 0;
  width: 100%;
  text-align: left;
  background-color: var(--bg-main);
  padding: 15px;
  border-left: 4px solid var(--text-primary);
  border-radius: 8px;
  box-sizing: border-box;
  border-top: 1px solid var(--card-border);
  border-right: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.info-text i {
  color: var(--text-primary);
  margin-right: 5px;
}

.info-text strong {
  color: var(--text-primary);
}

.btn-main {
  width: 100%;
  padding: 16px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.btn-sec {
  width: 100%;
  padding: 16px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--accent-silver);
  margin-top: 15px;
  cursor: pointer;
  font-family: inherit;
}

.btn-sec:hover {
  border-color: var(--text-primary);
  background: var(--bg-main);
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content {
  background-color: var(--bg-secondary);
  padding: clamp(25px, 5vw, 40px);
  border-radius: var(--radius);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--card-border);
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  animation: modalFadeIn 0.3s ease-out;
  margin: auto;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-content h2 {
  font-size: clamp(1.5rem, 4vw, 1.8rem);
  color: var(--text-primary);
  margin: 0 0 5px 0;
  font-weight: 800;
  text-align: center;
}

.modal-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 25px 0;
  text-align: center;
}

.close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 35px;
  height: 35px;
  background: var(--bg-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  transition: all 0.3s ease;
}

.close:hover {
  background-color: var(--danger-color);
  color: #FFFFFF;
  border-color: var(--danger-color);
  transform: rotate(90deg);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  width: 100%;
  background: var(--bg-main);
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.checkbox-group:focus-within {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(160, 170, 181, 0.15);
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--text-primary);
}

.checkbox-group label {
  margin: 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
}

.reveal-up { opacity: 0; transform: translateY(30px); transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal-up.active { opacity: 1; transform: translate(0); }