/* ==========================================================================
   WhatsCampaign Super Admin Login Stylesheet
   Strict pixel-perfect recreation of Reference Image 2
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-green: #047857;
  --primary-green-hover: #065f46;
  --primary-light-green: #10b981;
  --mint-bg: #ecfdf5;
  --mint-border: #a7f3d0;
  --text-dark: #0f172a;
  --text-body: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --page-right-bg: #f8fafc;
  --shadow-card: 0 16px 36px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-button: 0 4px 14px rgba(4, 120, 87, 0.28);
  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  font-family: var(--font-family);
  color: var(--text-dark);
  background-color: var(--page-right-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.login-wrapper {
  display: flex;
  width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   LEFT SECTION (55% Width)
   ========================================================================== */
.left-section {
  flex: 0 0 55%;
  width: 55%;
  position: relative;
  background-color: #ebfaf2;
  background-image: url('/assets/images/mint-left-panel.png');
  background-repeat: no-repeat;
  background-position: left top;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 56px 28px 56px;
  overflow: hidden;
}

/* Fallback if left-panel crop is loading */
.left-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/assets/images/mint-green-waves.png');
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 181.8% 100%;
  z-index: 1;
  pointer-events: none;
}

.left-content {
  position: relative;
  z-index: 2;
  max-width: 580px;
}

/* Logo & Branding */
.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 23px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.brand-title span {
  color: #047857;
}

.brand-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.1px;
}

/* Super Admin Badge */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  padding: 4px 14px;
  background-color: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 9999px;
  color: #047857;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.admin-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
}

/* Main Heading */
.main-heading {
  font-size: 38px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-top: 16px;
}

/* Supporting Description */
.supporting-description {
  font-size: 14.5px;
  line-height: 1.55;
  color: #475569;
  margin-top: 12px;
  margin-bottom: 24px;
  max-width: 490px;
}

/* 4 Feature Blocks (2x2 Grid) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 24px;
  max-width: 530px;
  margin-bottom: 24px;
}

.feature-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feature-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background-color: rgba(16, 185, 129, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #047857;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.feature-block:hover .feature-icon-box {
  transform: scale(1.05);
  background-color: rgba(16, 185, 129, 0.22);
}

.feature-info {
  display: flex;
  flex-direction: column;
}

.feature-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.feature-text {
  font-size: 11.5px;
  line-height: 1.35;
  color: #64748b;
}

/* ==========================================================================
   ANALYTICS DASHBOARD PREVIEW (3D Tilted Perspective Mockup)
   ========================================================================== */
.dashboard-preview-container {
  position: relative;
  z-index: 2;
  perspective: 1200px;
  margin-top: 8px;
  margin-bottom: -15px;
  width: 106%;
  transform-origin: top left;
}

.dashboard-mockup {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  box-shadow: 0 24px 50px -10px rgba(15, 23, 42, 0.18), 0 10px 24px -6px rgba(15, 23, 42, 0.1);
  display: flex;
  overflow: hidden;
  transform: rotateX(15deg) rotateY(-8deg) rotateZ(1.5deg);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  position: relative;
}

.dashboard-mockup:hover {
  transform: rotateX(8deg) rotateY(-4deg) rotateZ(0.8deg) translateY(-6px);
  box-shadow: 0 32px 64px -12px rgba(15, 23, 42, 0.24), 0 16px 32px -8px rgba(15, 23, 42, 0.14);
}

/* Sidebar in Mockup */
.mockup-sidebar {
  width: 140px;
  background-color: #0f172a;
  color: #94a3b8;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.mockup-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 0 6px;
}

.mockup-sidebar-logo-icon {
  width: 18px;
  height: 18px;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mockup-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.mockup-sidebar-logo-text {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.mockup-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mockup-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.15s ease;
}

.mockup-nav-item.active {
  background-color: #10b981;
  color: #ffffff;
  font-weight: 600;
}

.mockup-nav-item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Mockup Main Body */
.mockup-main {
  flex: 1;
  background-color: #f8fafc;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mockup-header-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

/* Mockup KPI Cards Row */
.mockup-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.mockup-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mockup-kpi-title {
  font-size: 9px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.mockup-kpi-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.mockup-kpi-val {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.mockup-kpi-badge {
  font-size: 8.5px;
  font-weight: 700;
  color: #047857;
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 1px 4px;
  border-radius: 4px;
}

/* Mockup Charts Row */
.mockup-charts {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 10px;
}

.mockup-chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 10px 12px;
}

.mockup-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.mockup-chart-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #0f172a;
}

.mockup-chart-pill {
  font-size: 8px;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 5px;
  border-radius: 4px;
}

/* Bar Chart */
.bar-chart-visual {
  display: flex;
  align-items: flex-end;
  height: 58px;
  gap: 5px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border-radius: 2px 2px 0 0;
  transition: height 0.3s ease;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  font-size: 7.5px;
  color: #94a3b8;
}

/* Donut Chart */
.donut-chart-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.donut-visual {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.donut-visual svg {
  transform: rotate(-90deg);
}

.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-center-text .total-num {
  font-size: 9.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.donut-center-text .total-lbl {
  font-size: 7px;
  color: #64748b;
  text-transform: uppercase;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  color: #475569;
}

.legend-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.legend-pct {
  font-weight: 700;
  color: #0f172a;
  margin-left: auto;
}

/* Floating Recent Campaigns Card */
.mockup-table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 10px 12px;
}

.mockup-table-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.mockup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8px;
}

.mockup-table th {
  color: #64748b;
  font-weight: 600;
  text-align: left;
  padding-bottom: 4px;
  border-bottom: 1px solid #f1f5f9;
}

.mockup-table td {
  padding: 4px 0;
  color: #334155;
  border-bottom: 1px solid #f8fafc;
}

.status-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 9999px;
  font-size: 7.5px;
  font-weight: 600;
}

.status-completed {
  background-color: #ecfdf5;
  color: #047857;
}

.status-running {
  background-color: #eff6ff;
  color: #2563eb;
}


/* ==========================================================================
   RIGHT SECTION (45% Width)
   ========================================================================== */
.right-section {
  flex: 0 0 45%;
  width: 45%;
  background-color: var(--page-right-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 32px;
  min-height: 100vh;
}

/* Login Card Container */
.login-card {
  width: 100%;
  max-width: 450px;
  background-color: var(--card-bg);
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-card);
  padding: 40px 38px;
  position: relative;
  transition: box-shadow 0.3s ease;
}

/* Top Green Icon */
.admin-card-icon {
  width: 58px;
  height: 58px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: none;
}

.admin-card-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Card Heading & Subtext */
.card-heading {
  font-size: 25px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}

.card-supporting-text {
  font-size: 13.5px;
  line-height: 1.45;
  color: #64748b;
  text-align: center;
  max-width: 330px;
  margin: 0 auto 26px auto;
}

/* Feedback Notification Banner */
.feedback-banner {
  display: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.25s ease-out;
}

.feedback-banner.error {
  display: flex;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.feedback-banner.success {
  display: flex;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

/* Form Styles */
.login-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 7px;
}

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

.input-icon-left {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder {
  color: #94a3b8;
  font-size: 13.5px;
}

.form-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.form-input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.input-toggle-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 6px;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.input-toggle-btn:hover {
  color: #475569;
}

.inline-error {
  font-size: 11.5px;
  color: #dc2626;
  margin-top: 5px;
  display: none;
}

.inline-error.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* Remember Me & Forgot Password Row */
.form-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -2px;
  margin-bottom: 22px;
}

.checkbox-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox {
  width: 17px;
  height: 17px;
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.checkbox-container input:checked ~ .custom-checkbox {
  background-color: #047857;
  border-color: #047857;
}

.custom-checkbox svg {
  display: none;
  width: 11px;
  height: 11px;
  color: #ffffff;
}

.checkbox-container input:checked ~ .custom-checkbox svg {
  display: block;
}

.checkbox-label {
  font-size: 13px;
  color: #334155;
  font-weight: 500;
}

.forgot-password-link {
  font-size: 13px;
  font-weight: 600;
  color: #047857;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.forgot-password-link:hover {
  color: #065f46;
  text-decoration: underline;
}

/* Submit Button */
.btn-primary-login {
  width: 100%;
  height: 48px;
  background-color: var(--primary-green);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-button);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-primary-login:hover:not(:disabled) {
  background-color: var(--primary-green-hover);
  box-shadow: 0 6px 18px rgba(4, 120, 87, 0.35);
  transform: translateY(-1px);
}

.btn-primary-login:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary-login:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

/* Loading Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* OR Divider */
.or-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
}

.or-line {
  flex: 1;
  height: 1px;
  background-color: #e2e8f0;
}

.or-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  padding: 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Google Sign-In Button */
.btn-google {
  width: 100%;
  height: 46px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #1e293b;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-google:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Footer Section outside the card */
.footer-container {
  width: 100%;
  max-width: 490px;
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #64748b;
  padding: 0 4px;
}

.footer-copy {
  color: #94a3b8;
  white-space: nowrap;
}

.footer-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-link {
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
  font-size: 11.5px;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: #0f172a;
}

/* ==========================================================================
   FORGOT PASSWORD & GOOGLE MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 18px;
  padding: 32px 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: #0f172a;
  background-color: #f1f5f9;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 20px;
}

/* Responsive Breakpoints */
@media (max-width: 1080px) {
  .login-wrapper {
    flex-direction: column;
    min-height: auto;
  }
  .left-section {
    flex: none;
    width: 100%;
    padding: 36px 28px;
  }
  .right-section {
    flex: none;
    width: 100%;
    padding: 48px 24px;
  }
  .dashboard-preview-container {
    width: 100%;
    margin-bottom: 0;
  }
}
