/* OurDeals Admin — Premium Login */

:root {
  --od-navy: #02174c;
  --od-navy-light: #0a2a6e;
  --od-orange: #fdae3a;
  --od-purple: #b66dff;
  --od-purple-dark: #9b4de0;
  --od-white: #ffffff;
  --od-gray-50: #f8fafc;
  --od-gray-100: #f1f5f9;
  --od-gray-200: #e2e8f0;
  --od-gray-400: #94a3b8;
  --od-gray-500: #64748b;
  --od-gray-700: #334155;
  --od-gray-900: #0f172a;
  --od-danger: #ef4444;
  --od-danger-bg: #fef2f2;
  --od-shadow: 0 25px 50px -12px rgba(2, 23, 76, 0.18);
  --od-radius: 16px;
  --od-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  overflow: hidden;
}

body.od-login-body {
  height: 100%;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--od-gray-50);
  color: var(--od-gray-900);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.od-login-page {
  display: flex;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

/* ── Left Panel ── */
.od-login-brand {
  position: relative;
  flex: 1.1;
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(0.65rem, 1.2vh, 1rem);
  height: 100%;
  padding: clamp(1.25rem, 2.5vh, 2rem) clamp(1.5rem, 3vw, 2.5rem);
  background: linear-gradient(145deg, var(--od-navy) 0%, #0d3278 45%, #1a4a9e 100%);
  overflow: hidden;
}

@media (min-width: 992px) {
  .od-login-brand {
    display: flex;
  }
}

.od-brand-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.od-brand-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.od-brand-orb--1 {
  width: 420px;
  height: 420px;
  background: var(--od-purple);
  top: -120px;
  right: -80px;
  animation: od-float 8s ease-in-out infinite;
}

.od-brand-orb--2 {
  width: 300px;
  height: 300px;
  background: var(--od-orange);
  bottom: 10%;
  left: -60px;
  animation: od-float 10s ease-in-out infinite reverse;
}

.od-brand-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
}

@keyframes od-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.05); }
}

.od-brand-content {
  position: relative;
  z-index: 1;
}

/* ── Left panel sections ── */
.od-brand-top,
.od-brand-middle,
.od-brand-bottom {
  position: relative;
  z-index: 1;
}

.od-brand-top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.od-brand-middle {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(0.55rem, 1vh, 0.85rem);
  min-height: 0;
  overflow: hidden;
  padding-top: clamp(0.25rem, 0.5vh, 0.5rem);
}

.od-brand-bottom {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1vh, 0.75rem);
}

.od-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.od-brand-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
  animation: od-pulse 2s ease-in-out infinite;
}

@keyframes od-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.od-brand-logo img {
  height: clamp(36px, 4.5vh, 44px);
  width: auto;
  filter: brightness(0) invert(1);
}

.od-brand-headline {
  margin-top: 0;
  max-width: 420px;
}

.od-brand-headline h1 {
  font-size: clamp(1.35rem, 2.2vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--od-white);
  letter-spacing: -0.02em;
}

.od-brand-headline h1 span {
  background: linear-gradient(90deg, var(--od-orange), #ffd080);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.od-brand-headline p {
  margin-top: 0.4rem;
  font-size: clamp(0.8125rem, 1.5vh, 0.875rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

/* Feature list */
.od-brand-features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.4rem, 0.8vh, 0.55rem);
}

.od-brand-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: clamp(0.4rem, 0.8vh, 0.55rem) 0.6rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: clamp(0.6875rem, 1.2vh, 0.75rem);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.3;
  transition: var(--od-transition);
}

.od-brand-features li:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.od-feature-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 8px;
  background: rgba(253, 174, 58, 0.15);
  color: var(--od-orange);
  font-size: 0.8125rem;
}

/* Dashboard preview card */
.od-brand-preview {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(0.65rem, 1.2vh, 0.85rem);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  transition: all 0.3s ease;
}
.od-brand-preview:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}

.od-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(0.5rem, 1vh, 0.65rem);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.od-preview-header i {
  margin-right: 0.3rem;
  color: var(--od-orange);
}

.od-preview-live {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.od-preview-live::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ade80;
}

.od-preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: clamp(0.5rem, 1vh, 0.65rem);
}

.od-preview-metric {
  padding: 0.4rem 0.35rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
  text-align: center;
}

.od-preview-metric strong {
  display: block;
  font-size: 0.625rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.od-preview-val {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--od-white);
}

.od-preview-val--up {
  color: #4ade80;
}

.od-preview-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  flex: 1;
  min-height: clamp(32px, 4vh, 44px);
  max-height: 52px;
  padding-top: 0.25rem;
}

.od-preview-chart span {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--od-purple), rgba(182, 109, 255, 0.4));
  animation: od-bar-grow 1.2s ease-out backwards;
}

.od-preview-chart span:nth-child(1) { animation-delay: 0.1s; }
.od-preview-chart span:nth-child(2) { animation-delay: 0.2s; }
.od-preview-chart span:nth-child(3) { animation-delay: 0.3s; }
.od-preview-chart span:nth-child(4) { animation-delay: 0.4s; }
.od-preview-chart span:nth-child(5) { animation-delay: 0.5s; }
.od-preview-chart span:nth-child(6) { animation-delay: 0.6s; }
.od-preview-chart span:nth-child(7) { animation-delay: 0.7s; }

@keyframes od-bar-grow {
  from { transform: scaleY(0); transform-origin: bottom; }
  to { transform: scaleY(1); transform-origin: bottom; }
}

.od-brand-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.5rem, 1vh, 0.75rem);
  flex-shrink: 0;
}

.od-stat-card {
  padding: clamp(0.65rem, 1.2vh, 1rem) clamp(0.5rem, 1vw, 0.85rem);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  transition: var(--od-transition);
}

.od-stat-card:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.25);
}

.od-stat-card i {
  font-size: clamp(1rem, 2vh, 1.2rem);
  color: var(--od-orange);
  margin-bottom: 0.25rem;
  display: block;
}

.od-stat-card strong {
  display: block;
  font-size: clamp(0.875rem, 1.5vh, 1rem);
  font-weight: 700;
  color: var(--od-white);
}

.od-stat-card span {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.15rem;
  display: block;
}

.od-brand-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ── Right Panel ── */
.od-login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: clamp(0.75rem, 2vh, 1.25rem) clamp(1rem, 2vw, 1.5rem);
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 10% 20%, rgba(182, 109, 255, 0.02) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(253, 174, 58, 0.02) 0%, transparent 40%);
}

.od-login-form-panel::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(182, 109, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(50px);
  animation: od-ambient-float 15s ease-in-out infinite alternate;
}

.od-login-form-panel::after {
  content: "";
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.04) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(60px);
  animation: od-ambient-float 12s ease-in-out infinite alternate-reverse;
}

.od-login-card {
  width: 100%;
  max-width: 440px;
  max-height: 100%;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  padding: clamp(1.5rem, 3.5vh, 2.5rem);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.01),
    0 10px 15px -3px rgba(15, 23, 42, 0.03),
    0 20px 25px -5px rgba(15, 23, 42, 0.05),
    0 0 40px rgba(182, 109, 255, 0.02);
  animation: od-slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes od-slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes od-ambient-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.08); }
  100% { transform: translate(0, 0) scale(1); }
}

.od-mobile-logo {
  display: block;
  margin-bottom: clamp(1rem, 2vh, 1.5rem);
  text-align: center;
}

@media (min-width: 992px) {
  .od-mobile-logo {
    display: none;
  }
}

.od-mobile-logo img {
  height: 40px;
  width: auto;
}

.od-login-card-header {
  margin-bottom: clamp(1rem, 2vh, 1.5rem);
}

.od-login-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(182, 109, 255, 0.12), rgba(253, 174, 58, 0.1));
  border: 1px solid rgba(182, 109, 255, 0.2);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--od-purple-dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.od-login-badge i {
  font-size: 0.875rem;
}

.od-login-card-header h2 {
  font-size: clamp(1.375rem, 2.5vh, 1.625rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--od-gray-900);
}

.od-login-card-header p {
  margin-top: 0.35rem;
  font-size: clamp(0.8125rem, 1.5vh, 0.875rem);
  color: var(--od-gray-500);
  line-height: 1.45;
}

/* ── Alert ── */
.od-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: var(--od-danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
  margin-bottom: clamp(0.75rem, 1.5vh, 1rem);
  animation: od-shake 0.4s ease;
}

@keyframes od-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.od-alert i {
  color: var(--od-danger);
  font-size: 1.125rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.od-alert-messages {
  font-size: 0.875rem;
  color: #b91c1c;
  line-height: 1.5;
}

/* ── Form ── */
.od-form-group {
  margin-bottom: clamp(0.75rem, 1.5vh, 1rem);
}

.od-form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--od-gray-700);
  margin-bottom: 0.35rem;
}

.od-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.od-input-icon {
  position: absolute;
  left: 1rem;
  color: var(--od-gray-400);
  font-size: 1.125rem;
  pointer-events: none;
  transition: var(--od-transition);
}

.od-input-wrap:focus-within .od-input-icon {
  color: var(--od-purple);
  transform: scale(1.05);
}

.od-form-input {
  width: 100%;
  padding: clamp(0.7rem, 1.4vh, 0.85rem) 1rem clamp(0.7rem, 1.4vh, 0.85rem) 2.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--od-gray-900);
  background: rgba(255, 255, 255, 0.65);
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.od-form-input::placeholder {
  color: var(--od-gray-400);
}

.od-form-input:hover {
  border-color: rgba(182, 109, 255, 0.25);
  background: var(--od-white);
}

.od-form-input:focus {
  background: var(--od-white);
  border-color: var(--od-purple);
  box-shadow: 
    0 0 0 4px rgba(182, 109, 255, 0.08),
    0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.od-form-input--password {
  padding-right: 3rem;
}

.od-toggle-password {
  position: absolute;
  right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: var(--od-gray-400);
  cursor: pointer;
  border-radius: 8px;
  transition: var(--od-transition);
}

.od-toggle-password:hover {
  color: var(--od-gray-700);
  background: var(--od-gray-100);
}

.od-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(0.85rem, 1.5vh, 1.25rem);
}

.od-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.od-checkbox-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.od-checkbox-box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--od-gray-200);
  border-radius: 5px;
  background: var(--od-white);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.od-checkbox-wrap:hover .od-checkbox-box {
  border-color: rgba(182, 109, 255, 0.5);
}

.od-checkbox-wrap input[type="checkbox"]:checked ~ .od-checkbox-box {
  background: var(--od-purple);
  border-color: var(--od-purple);
}

.od-checkbox-box::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46);
  margin-top: -1px;
}

.od-checkbox-wrap input[type="checkbox"]:checked ~ .od-checkbox-box::after {
  transform: rotate(45deg) scale(1);
}

.od-checkbox-label {
  font-size: 0.875rem;
  color: var(--od-gray-500);
  transition: color 0.2s ease;
}

.od-checkbox-wrap:hover .od-checkbox-label {
  color: var(--od-gray-700);
}

/* ── Submit Button ── */
.od-btn-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: clamp(0.75rem, 1.4vh, 0.9rem) 1.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--od-white);
  background: linear-gradient(135deg, var(--od-purple) 0%, var(--od-purple-dark) 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(182, 109, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.od-btn-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.od-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(182, 109, 255, 0.35);
}

.od-btn-submit:hover::before {
  transform: translateX(100%);
}

.od-btn-submit:active {
  transform: translateY(0);
}

.od-btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.od-btn-submit i {
  font-size: 1.125rem;
  transition: transform 0.2s ease;
}

.od-btn-submit:hover i {
  transform: translateX(3px);
}

.od-btn-loading .od-btn-text {
  opacity: 0;
}

.od-btn-spinner {
  display: none;
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: od-spin 0.7s linear infinite;
}

.od-btn-loading .od-btn-spinner {
  display: block;
}

@keyframes od-spin {
  to { transform: rotate(360deg); }
}

/* ── Footer ── */
.od-login-card-footer {
  margin-top: clamp(0.85rem, 1.5vh, 1.25rem);
  padding-top: clamp(0.75rem, 1.2vh, 1rem);
  border-top: 1px solid var(--od-gray-200);
  text-align: center;
}

.od-login-card-footer p {
  font-size: 0.75rem;
  color: var(--od-gray-400);
}

.od-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.6875rem;
  color: var(--od-gray-400);
}

.od-secure-badge i {
  color: #22c55e;
  font-size: 0.8125rem;
}

/* ── Laptop / short viewport: no scroll ── */
@media (min-width: 992px) and (max-height: 640px) {
  .od-brand-features {
    grid-template-columns: 1fr;
  }

  .od-brand-preview {
    display: none;
  }
}

@media (min-width: 992px) and (max-height: 520px) {
  .od-brand-features {
    display: none;
  }
}

/* ── Mobile: allow scroll only when needed ── */
@media (max-width: 991px) {
  html,
  body.od-login-body {
    overflow: auto;
  }

  .od-login-page {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: visible;
  }

  .od-login-form-panel {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    padding: 1.5rem 1.25rem;
  }
}
