/* ============================================
   FastDrop — Login Page (iOS Native)
   No Gradient • FastDrop Brand • Dense Layout
   ============================================ */

/* --- 1. Font Import (Inter Only) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:slnt,wght@-10..0,100..900&display=swap');

/* --- 2. Design Tokens — FastDrop Brand --- */
:root {
  /* Brand Identity */
  --primary: #FF6B35;
  --primary-light: #FF8C5F;
  --secondary: #1A936F;
  --accent: #114B5F;

  /* iOS System Surfaces */
  --system-bg: #F2F2F7;
  --system-white: #FFFFFF;
  --system-grouped: #F9F9F9;
  --system-separator: rgba(60, 60, 67, 0.12);
  --system-fill: rgba(120, 120, 128, 0.08);

  /* Typography Colors */
  --label-primary: #1C1C1E;
  --label-secondary: #636366;
  --label-tertiary: #AEAEB2;
  --label-quaternary: #D1D1D6;

  /* Semantic */
  --system-green: #34C759;
  --system-red: #FF3B30;
  --system-blue: #007AFF;

  /* Elevation (Soft Layered) */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.08);
  --shadow-float: 0 20px 50px rgba(0, 0, 0, 0.12);

  /* Radius (Squircle) */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 34px;

  /* Spacing Grid (4px Base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* Typography */
  --font-system: 'Inter', -apple-system, sans-serif;
  --letter-spacing-tight: -0.022em;
  --letter-spacing-normal: -0.01em;
  --line-height-compact: 1.2;
  --line-height-readable: 1.45;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.5);

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-smooth: 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* --- 3. Global Reset — Inter ONLY on text, NEVER on ::before/::after --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
input,
textarea,
button,
select,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
div,
li,
td,
th,
label {
  font-family: var(--font-system);
}

body {
  background: var(--system-bg);
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  color: var(--label-primary);
  line-height: var(--line-height-readable);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: var(--letter-spacing-normal);
}

::-webkit-scrollbar {
  display: none;
}

html,
body {
  overscroll-behavior-y: none;
  overflow-x: hidden;
}

/* --- 4. iPhone Screen Container (Squircle) --- */
.iphone-screen {
  width: 420px;
  max-width: 100%;
  background: var(--system-white);
  border-radius: var(--radius-2xl);
  /* 34px */
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.03),
    0 12px 32px rgba(0, 0, 0, 0.07);
  border: 0.5px solid rgba(0, 0, 0, 0.04);
  animation: fadeInUp 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- 5. Auth Header --- */
.auth-header {
  padding: var(--space-8) var(--space-6) var(--space-5);
  text-align: center;
}

.auth-header img {
  width: 64px;
  height: auto;
  margin-bottom: var(--space-3);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08));
}

.auth-header h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--label-primary);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-compact);
  margin-bottom: var(--space-1);
}

.auth-header p {
  color: var(--label-tertiary);
  font-size: 0.78rem;
  font-weight: 500;
}

/* --- 6. iOS Card (Glass) --- */
.ios-card {
  background: var(--glass-bg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-radius: var(--radius-xl);
  /* 28px */
  margin: 0 var(--space-5) var(--space-5);
  padding: var(--space-5);
  border: 0.5px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

/* --- 7. Input Group --- */
.ios-input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  /* 16px */
  margin-bottom: var(--space-6);
}

/* --- 8. Input Field --- */
.ios-input-field {
  position: relative;
}

.ios-input-field label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
  margin-left: var(--space-1);
  display: block;
}

.ios-input-field input {
  width: 100%;
  background: var(--system-white);
  border: 1.5px solid var(--system-separator);
  border-radius: var(--radius-sm);
  /* 10px */
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-10);
  /* 12px 16px 12px 40px */
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--label-primary);
  outline: none;
  letter-spacing: var(--letter-spacing-normal);
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
  height: 48px;
}

.ios-input-field input::placeholder {
  color: var(--label-quaternary);
  font-weight: 400;
}

.ios-input-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.08), var(--shadow-sm);
  background: var(--system-white);
}

/* Input Icon (Left) */
.ios-input-field .icon {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-3);
  font-size: 0.95rem;
  color: var(--label-tertiary);
  transition: color 0.2s ease;
  pointer-events: none;
}

.ios-input-field input:focus~.icon {
  color: var(--primary);
}

/* --- 9. Password Wrapper --- */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  background: var(--system-white);
  border: 1.5px solid var(--system-separator);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-10) var(--space-3) var(--space-10);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--label-primary);
  outline: none;
  letter-spacing: var(--letter-spacing-normal);
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
  height: 48px;
}

.password-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.08), var(--shadow-sm);
  background: var(--system-white);
}

/* Left icon */
.field-icon-left {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--label-tertiary);
  z-index: 2;
  pointer-events: none;
  transition: color 0.2s ease;
}

.password-wrapper input:focus~.field-icon-left {
  color: var(--primary);
}

/* --- 10. Toggle Password Button --- */
#togglePassword {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--label-tertiary);
  cursor: pointer;
  padding: var(--space-2);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  transition: var(--transition-fast);
}

#togglePassword:active {
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-50%) scale(0.9);
  color: var(--primary);
}

/* --- 11. Activation Field Animation --- */
.activation-field {
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- 12. Primary Button (Solid — No Gradient) --- */
.ios-btn-primary {
  background: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  /* 14px */
  padding: var(--space-3);
  width: 100%;
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  cursor: pointer;
  letter-spacing: var(--letter-spacing-normal);
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.22);
  transition: var(--transition-fast);
  min-height: 48px;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ios-btn-primary:active {
  transform: scale(0.97);
  background: var(--primary-light);
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* --- 13. Auth Links --- */
.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) var(--space-5) var(--space-6);
  text-align: center;
}

.ios-link-secondary {
  color: var(--label-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-normal);
}

.ios-link-secondary span {
  color: var(--primary);
  font-weight: 700;
}

.ios-link-muted {
  color: var(--label-tertiary);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.ios-link-muted:active {
  color: var(--primary);
}

/* --- 14. Notification Container --- */
.ios-notification-container {
  padding: 0 var(--space-5);
}

/* --- 15. Alert (Glass) --- */
.ios-alert {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  /* 10px */
  margin-bottom: var(--space-3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--glass-bg);
  border: 0.5px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--label-primary);
  animation: alertSlide 0.25s ease-out;
}

@keyframes alertSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Error */
.ios-alert.error {
  background: rgba(255, 59, 48, 0.06);
  border-color: rgba(255, 59, 48, 0.15);
  color: #C62828;
}

.ios-alert.error i {
  color: var(--system-red);
}

/* Success */
.ios-alert.success {
  background: rgba(52, 199, 89, 0.06);
  border-color: rgba(52, 199, 89, 0.15);
  color: #1E7B3C;
}

.ios-alert.success i {
  color: var(--system-green);
}

.ios-alert i {
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* --- 16. Responsive --- */
@media (max-width: 500px) {
  body {
    padding: var(--space-2);
  }

  .iphone-screen {
    border-radius: var(--radius-xl);
    width: 100%;
  }

  .auth-header {
    padding: var(--space-6) var(--space-5) var(--space-4);
  }

  .auth-header h1 {
    font-size: 1.2rem;
  }

  .ios-card {
    margin: 0 var(--space-3) var(--space-3);
    padding: var(--space-4);
  }

  .ios-btn-primary {
    font-size: 0.9rem;
    min-height: 44px;
  }

  .ios-input-field input,
  .password-wrapper input {
    height: 44px;
    font-size: 0.85rem;
  }
}

/* --- 17. Touch Device Optimizations --- */
@media (hover: none) and (pointer: coarse) {
  .ios-btn-primary {
    transition: none;
  }

  #togglePassword {
    min-width: 36px;
    min-height: 36px;
  }
}