/* ==========================================================================
   TYLO - Admin Access CSS
   Theme: Mint / White / Soft Premium Tone
   ========================================================================== */

:root {
  --admin-black: #0a0a0a;
  --admin-charcoal: #1f1f1f;
  --admin-white: #ffffff;
  --admin-bg: #f4f6f8;
  
  --mint-primary: #2ebf91;
  --mint-dark: #1b8a5f;
  --mint-gradient: linear-gradient(135deg, #2ebf91, #1b8a5f);
  
  --error-red: #e74c3c;
  --success-green: #27ae60;
  
  --border-light: rgba(0, 0, 0, 0.08);
  --shadow-card: 0 24px 48px rgba(0, 0, 0, 0.06);
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.theme-admin-auth {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-black);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Brand Strip
   ========================================================================== */
.admin-brand-strip {
  background: var(--admin-white);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.strip-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-left {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--admin-black);
  line-height: 1;
}

.brand-subtitle {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--mint-primary);
  text-transform: uppercase;
}

.brand-center .strip-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--admin-charcoal);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.brand-right .strip-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--mint-dark);
  background: rgba(46, 191, 145, 0.1);
  padding: 4px 10px;
  border-radius: 4px;
}

/* ==========================================================================
   Main Container & Card
   ========================================================================== */
.admin-auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.admin-auth-card {
  display: flex;
  width: 100%;
  max-width: 960px;
  background: var(--admin-white);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  min-height: 560px;
}

/* ==========================================================================
   Left Panel (Branding)
   ========================================================================== */
.admin-auth-left {
  width: 35%;
  background: var(--mint-gradient);
  color: var(--admin-white);
  position: relative;
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.left-content {
  position: relative;
  z-index: 2;
}

.tylo-branding {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 24px;
  color: var(--admin-white);
  text-shadow: 0 4px 10px rgba(0,0,0,0.15);
  background: none;
}

.panel-heading {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.panel-subheading {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
}

.panel-note {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  border-left: 3px solid var(--admin-white);
  padding-left: 12px;
}

.glossy-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   Right Panel (Forms)
   ========================================================================== */
.admin-auth-right {
  width: 65%;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
}

.role-tabs {
  display: flex;
  background: var(--admin-bg);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 32px;
}

.role-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #666;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.role-tab:hover { color: var(--admin-black); }
.role-tab.active {
  background: var(--admin-white);
  color: var(--admin-black);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-container { flex: 1; display: flex; flex-direction: column; }

.auth-mode {
  display: flex;
  flex-direction: column;
  animation: fade-in 0.3s ease;
}
.auth-mode.hidden { display: none; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.input-group { position: relative; margin-bottom: 24px; }

.form-input {
  width: 100%;
  padding: 22px 16px 10px;
  font-size: 15px;
  color: var(--admin-black);
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  outline: none;
  transition: var(--transition-smooth);
}

.form-input:focus {
  background: var(--admin-white);
  border-color: var(--mint-primary);
  box-shadow: 0 0 0 4px rgba(46, 191, 145, 0.1);
}

.form-label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #888;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
  top: 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--mint-primary);
}

.form-input:not(:focus):not(:placeholder-shown) ~ .form-label { color: #888; }

.btn-icon.toggle-password {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: #888;
  font-size: 16px;
  padding: 4px;
}
.btn-icon.toggle-password:hover { color: var(--admin-black); }

/* Validation States */
.input-group.error .form-input { border-color: var(--error-red); background: #fffaf9; }
.input-group.error .form-label { color: var(--error-red); }
.error-text {
  display: block;
  font-size: 12px;
  color: var(--error-red);
  margin-top: 6px;
  min-height: 14px;
}

.form-helper-text { font-size: 13px; color: #666; margin-top: -8px; margin-bottom: 24px; }

/* Buttons */
.form-actions { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }

.btn-primary, .btn-secondary {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary { background: var(--mint-gradient); color: var(--admin-white); border: none; box-shadow: 0 8px 24px rgba(46, 191, 145, 0.25); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #36d2a0, #1f9e6d); box-shadow: 0 10px 30px rgba(46, 191, 145, 0.35); transform: translateY(-1px); }

.btn-secondary { background: var(--admin-white); color: var(--admin-charcoal); border: 1px solid #d0d0d0; }
.btn-secondary:hover:not(:disabled) { background: #f8f8f8; border-color: var(--admin-charcoal); }

.btn-primary:disabled, .btn-secondary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary.loading { color: transparent; position: relative; pointer-events: none; }
.btn-primary.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #999;
  font-size: 12px;
  font-weight: 600;
}
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid #eaeaea; }
.divider span { padding: 0 10px; }

/* OTP Section Specifics */
.otp-header { margin-bottom: 24px; }
.btn-back { background: none; border: none; color: #666; font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 16px; padding: 0; }
.btn-back:hover { color: var(--admin-black); }
.otp-header h2 { font-size: 24px; margin-bottom: 8px; }
.otp-header p { font-size: 14px; color: #666; }
.otp-input { letter-spacing: 4px; font-weight: 700; font-size: 18px; }
.btn-text { background: none; border: none; color: var(--mint-dark); font-size: 14px; font-weight: 600; cursor: pointer; padding: 8px; }
.btn-text:hover { text-decoration: underline; }
.btn-text:disabled { color: #999; text-decoration: none; cursor: not-allowed; }

/* Feedback Message */
.feedback-msg { padding: 12px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; margin-bottom: 20px; }
.feedback-msg.hidden { display: none; }
.feedback-msg.error { background: #fdf2f2; color: var(--error-red); border-left: 4px solid var(--error-red); }
.feedback-msg.success { background: #f0fdf4; color: var(--success-green); border-left: 4px solid var(--success-green); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
  .admin-auth-left { width: 35%; padding: 40px 30px; }
  .admin-auth-right { width: 65%; padding: 40px 30px; }
  .panel-heading { font-size: 28px; }
}

@media (max-width: 768px) {
  .admin-auth-card { flex-direction: column; max-width: 500px; min-height: auto; }
  .admin-auth-left { width: 100%; padding: 30px 20px; min-height: 200px; border-radius: 20px 20px 0 0; }
  .admin-auth-right { width: 100%; padding: 30px 20px; }
  .brand-center { display: none; }
}