/* ============================================================
   KOI-FACTURA - LOGIN STYLES
   ============================================================ */

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

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #080810;
  color: #F9FAFB;
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

/* ============================================================
   PANEL IZQUIERDO
   ============================================================ */
.left {
  width: 420px;
  flex-shrink: 0;
  background: #080810;
  border-right: 0.5px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  padding: 48px 52px;
  position: relative;
  overflow: hidden;
}

.left::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 2px;
  background: linear-gradient(180deg, transparent, #F97316 30%, #FB923C 70%, transparent);
  opacity: 0.5;
}

.left-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: auto;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1a1a24, #111118);
  border: 0.5px solid rgba(249,115,22,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #F97316;
}

.logo-name {
  font-size: 15px;
  font-weight: 800;
  color: #F9FAFB;
  letter-spacing: -0.3px;
}

.logo-name span {
  color: #F97316;
}

.left-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0;
}

.left-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 28px;
}

.eyebrow-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 8px rgba(34,197,94,0.7);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.eyebrow-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4B5563;
}

.left-heading {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #F9FAFB;
  margin-bottom: 20px;
}

.left-heading .orange {
  color: #F97316;
}

.left-desc {
  font-size: 13px;
  color: #4B5563;
  line-height: 1.75;
  max-width: 290px;
  margin-bottom: 40px;
}

.left-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-line {
  width: 20px;
  height: 1px;
  background: rgba(249,115,22,0.35);
  flex-shrink: 0;
}

.stat-text {
  font-size: 12px;
  color: #374151;
  letter-spacing: 0.01em;
}

.stat-text b {
  color: #6B7280;
  font-weight: 600;
}

.left-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.afip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(34,197,94,0.05);
  border: 0.5px solid rgba(34,197,94,0.15);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #16A34A;
}

/* ============================================================
   PANEL DERECHO
   ============================================================ */
.right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050509;
  position: relative;
  overflow: hidden;
}

.right::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249,115,22,0.055) 0%, transparent 65%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.right::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 100%);
  pointer-events: none;
}

.form-box {
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 1;
  padding: 20px;
}

.form-header {
  margin-bottom: 32px;
}

.form-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #F9FAFB;
  margin-bottom: 5px;
}

.form-sub {
  font-size: 13px;
  color: #374151;
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 0.5px solid rgba(255,255,255,0.06);
}

.tab {
  padding: 0 0 12px;
  margin-right: 24px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color .2s;
  letter-spacing: -0.01em;
}

.tab:hover {
  color: #6B7280;
}

.tab.active {
  color: #F9FAFB;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -0.5px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, #F97316, #FB923C);
}

/* ============================================================
   PANELS
   ============================================================ */
.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: up .2s ease;
}

@keyframes up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   GOOGLE BUTTON
   ============================================================ */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 0.5px solid rgba(255,255,255,0.08);
  color: #9CA3AF;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all .18s;
  margin-bottom: 22px;
}

.btn-google:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.13);
  color: #F9FAFB;
}

/* ============================================================
   SEPARATOR
   ============================================================ */
.or-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 11px;
  color: #1F2937;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.or-sep::before,
.or-sep::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: rgba(255,255,255,0.05);
}

/* ============================================================
   FORM FIELDS
   ============================================================ */
.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #374151;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  background: rgba(255,255,255,0.025);
  border: 0.5px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  color: #F9FAFB;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 11px 14px;
  outline: none;
  transition: border-color .18s, background .18s;
}

.field input::placeholder {
  color: #1F2937;
}

.field input:focus {
  border-color: rgba(249,115,22,0.4);
  background: rgba(249,115,22,0.025);
}

.field-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pass-wrap {
  position: relative;
}

.pass-wrap input {
  padding-right: 42px;
}

.eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #1F2937;
  cursor: pointer;
  padding: 4px;
  display: flex;
  transition: color .15s;
}

.eye:hover {
  color: #4B5563;
}

/* ============================================================
   MESSAGES (Error / Success)
   ============================================================ */
.msg {
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 14px;
  display: none;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.msg.show {
  display: flex !important;
}

.msg.err.show {
  background: rgba(239,68,68,0.06);
  border: 0.5px solid rgba(239,68,68,0.2);
  color: #FCA5A5;
}

.msg.ok.show {
  background: rgba(34,197,94,0.06);
  border: 0.5px solid rgba(34,197,94,0.2);
  color: #86EFAC;
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */
.btn-submit {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(90deg, #F97316, #FB923C);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .2s, transform .15s;
  letter-spacing: -0.01em;
}

.btn-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: scale(.98);
}

.btn-submit:disabled {
  opacity: .4;
  pointer-events: none;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
}

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

/* ============================================================
   TERMS
   ============================================================ */
.terms {
  font-size: 11px;
  color: #1F2937;
  text-align: center;
  margin-top: 14px;
  line-height: 1.6;
}

.terms a {
  color: #374151;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.terms a:hover {
  color: #6B7280;
}

/* ============================================================
   COUNTRY SELECTOR - KOI STYLE
   ============================================================ */
.country-selector-wrapper {
  position: relative;
  margin-bottom: 24px;
  z-index: 50;
}

.country-selector-btn {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #F9FAFB;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  user-select: none;
}

.country-selector-btn:hover {
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.04);
}

.country-selector-btn.open {
  border-color: rgba(249, 115, 22, 0.5);
  background: rgba(249, 115, 22, 0.06);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.08);
}

.country-selector-btn .country-placeholder {
  color: #4B5563;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 10px;
}

.country-selector-btn .country-placeholder .icon {
  font-size: 18px;
}

.country-selector-btn .country-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.country-selector-btn .country-flag {
  font-size: 22px;
  line-height: 1;
}

.country-selector-btn .country-name {
  font-weight: 600;
  color: #F9FAFB;
}

.country-selector-btn .country-blocked {
  color: #F87171;
  font-size: 11px;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.1);
  padding: 2px 10px;
  border-radius: 20px;
  border: 0.5px solid rgba(239, 68, 68, 0.15);
}

.country-chevron {
  transition: transform 0.25s ease;
  color: #4B5563;
  flex-shrink: 0;
}

.country-selector-btn.open .country-chevron {
  transform: rotate(180deg);
}

.country-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #0D0D16;
  border: 0.5px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  z-index: 100;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  padding: 6px;
}

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

.country-dropdown::-webkit-scrollbar {
  width: 4px;
}

.country-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.country-dropdown::-webkit-scrollbar-thumb {
  background: rgba(249, 115, 22, 0.3);
  border-radius: 10px;
}

.country-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(249, 115, 22, 0.5);
}

.country-option {
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: 8px;
  color: #F9FAFB;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
}

.country-option:hover {
  background: rgba(249, 115, 22, 0.06);
}

.country-option .country-flag {
  font-size: 18px;
  line-height: 1;
}

.country-option .country-name {
  font-weight: 500;
  color: #F9FAFB;
}

.country-option .country-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  background: rgba(34, 197, 94, 0.1);
  color: #22C55E;
  border: 0.5px solid rgba(34, 197, 94, 0.15);
}

/* ============================================================
   COUNTRY MESSAGE - Bloqueo
   ============================================================ */
.country-message {
  margin-top: 16px;
  padding: 20px 24px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  display: none;
}

.country-message-blocked {
  background: rgba(239, 68, 68, 0.05);
  border: 0.5px solid rgba(239, 68, 68, 0.15);
  color: #F9FAFB;
}

.country-message-blocked .blocked-icon {
  font-size: 28px;
}

.country-message-blocked .blocked-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #F87171;
  margin-bottom: 4px;
}

.country-message-blocked .blocked-text {
  color: #9CA3AF;
  margin: 4px 0;
}

.country-message-blocked .blocked-sub {
  color: #FBBF24;
  font-size: 13px;
  margin-top: 4px;
}

.country-message-blocked .btn-retry {
  margin-top: 12px;
  padding: 8px 20px;
  background: rgba(249, 115, 22, 0.12);
  border: 0.5px solid rgba(249, 115, 22, 0.25);
  border-radius: 8px;
  color: #FB923C;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
}

.country-message-blocked .btn-retry:hover {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.4);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 680px) {
  .left {
    display: none;
  }
  .right {
    min-height: 100vh;
  }
  .form-box {
    padding: 40px 28px;
  }
}

@media (max-width: 480px) {
  .country-selector-btn {
    padding: 12px 14px;
    font-size: 13px;
  }
  .country-selector-btn .country-flag {
    font-size: 18px;
  }
  .country-dropdown {
    max-height: 180px;
  }
  .country-option {
    padding: 8px 12px;
    font-size: 12px;
  }
  .country-message-blocked {
    padding: 16px 18px;
  }
}