@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=DM+Serif+Display&display=swap');

:root {
  --primary: #cc0000;
  --primary-hover: #a30000;
  --bg-left: linear-gradient(135deg, #e60000, #990000);
  --bg-right: #ffffff;
  --text-main: #1c1917;
  --text-muted: #78716c;
  --border-color: #e7e5e4;
  --danger: #ef4444;
  --success: #10b981;
  --font-sans: 'DM Sans', sans-serif;
  --font-serif: 'DM Serif Display', serif;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --login-bg: url('../loginarkaplan.png');
}

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

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow: hidden; /* No scroll on desktop auth */
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-hover);
}

/* --- SPLIT SCREEN LAYOUT --- */
.auth-showcase {
  flex: 1;
  background-color: #a30000;
  background-image: var(--login-bg);
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  color: white;
  display: flex;
  flex-direction: column;
  padding: 4rem 5rem;
  position: relative;
}

.auth-logo-white {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: white;
  z-index: 2;
  margin-bottom: auto;
}

.auth-logo-white img {
  width: 40px;
  height: 40px;
}

.showcase-content {
  z-index: 2;
  margin-top: 3rem;
  margin-bottom: auto;
}

.showcase-content h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.showcase-content p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 400px;
  margin-bottom: 3rem;
  line-height: 1.5;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
  color: white;
  opacity: 0.9;
}

/* Right Side - Form */
.auth-form-side {
  width: 50%;
  max-width: 700px;
  background: var(--bg-right);
  display: flex;
  flex-direction: column;
  padding: 3rem 6rem;
  overflow-y: auto;
  justify-content: center;
  position: relative;
}

/* Mobile responsive */
@media (max-width: 1000px) {
  body {
    flex-direction: column;
    overflow: auto;
    background-image: var(--login-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    align-items: center;
  }
  .auth-showcase {
    display: none;
  }
  .auth-form-side {
    width: 95%;
    max-width: 450px;
    min-height: auto;
    margin: 2rem 0;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  }
}

.lang-selector {
  position: absolute;
  top: 2.5rem;
  right: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.lang-selector:hover {
  color: var(--text-main);
}

.form-header {
  text-align: left;
  margin-bottom: 2.5rem;
}

.form-logo-box {
  width: 54px;
  height: 54px;
  background: #fdf5f3;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.form-logo-box img {
  width: 32px;
}

.form-header h2 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.form-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* --- FORMS --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.875rem;
}

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

.input-wrap svg.input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
  background-color: #fff;
}

.input-wrap svg.input-icon + .form-input {
  padding-left: 2.5rem;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

.pw-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.pw-toggle:hover {
  color: var(--text-main);
}

.btn-submit {
  width: 100%;
  padding: 0.875rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-submit:hover {
  background-color: var(--primary-hover);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
}

.btn-submit.loading .spinner { display: block; }
.btn-submit.loading .btn-text { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider::before { margin-right: 1rem; }
.auth-divider::after { margin-left: 1rem; }

.btn-google {
  width: 100%;
  padding: 0.875rem;
  background-color: white;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.btn-google:hover {
  background-color: #f9fafb;
}

.auth-switch {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-banner {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  display: none;
}
.auth-banner.error {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  display: block;
}
.auth-banner.success {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  display: block;
}

.demo-btn-styled {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  transition: all 0.2s;
  text-align: left;
}
.demo-btn-styled:hover {
  border-color: #d6d3d1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.demo-avatar {
  width: 42px; height: 42px;
  background: #fdf5f3;
  color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}
.demo-badge {
  background: #fdf5f3;
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}
