/* REDVENTA - Main Styling Sheet (Adaptive Web & Mobile - Premium) */

:root {
  /* HSL Tailored Colors */
  --bg-dark: #07080c;
  --bg-app: #0c0e17;
  --bg-card: rgba(20, 25, 38, 0.65);
  --bg-card-hover: rgba(28, 35, 53, 0.85);

  --primary: #ff3366;
  --primary-dark: #cc0044;
  --primary-light: #ff668c;
  --primary-gradient: linear-gradient(135deg, #ff3366 0%, #ff003c 100%);
  --primary-glow: rgba(255, 51, 102, 0.3);

  --secondary: #161a26;
  --secondary-hover: #222736;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #111827;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 51, 102, 0.5);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.12);

  --shadow-main: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px var(--primary-glow);

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 51, 102, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(66, 133, 244, 0.05) 0%, transparent 45%);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 51, 102, 0.4);
}

/* ================= AUTHENTICATION / SIMULATOR PHONE FRAME ================= */
.app-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 20px;
}

.mobile-frame {
  background-color: var(--bg-app);
  width: 385px;
  height: 812px;
  border-radius: 44px;
  border: 10px solid #202330;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8), inset 0 0 2px 2px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.status-bar {
  height: 38px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
  z-index: 10;
  background-color: var(--bg-app);
}

.status-bar .status-icons {
  display: flex;
  gap: 5px;
  align-items: center;
}

.status-bar .status-icons span {
  font-size: 14px;
}

.app-header {
  padding: 24px 24px 10px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}

.logo-container {
  position: relative;
  width: 62px;
  height: 62px;
  margin-bottom: 8px;
}

.logo-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background-color: var(--primary);
  filter: blur(14px);
  opacity: 0.5;
  animation: pulseGlow 3s infinite alternate;
}

.logo-svg {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.brand-title span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}

.app-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}

.app-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 12px 24px 24px 24px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateX(40px);
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.app-view.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.view-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}

.view-header h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.btn-back {
  background: var(--secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn-back:hover {
  background: var(--secondary-hover);
  transform: scale(1.05);
}

.btn-back span {
  font-size: 20px;
}

/* ================= RESPONSIVE ADAPTIVE DASHBOARD LAYOUT ================= */
.dashboard-layout {
  display: grid;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-app);
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  grid-template-columns: 260px 1fr;
}

/* Left Sidebar (Desktop only) */
.sidebar {
  background-color: #0b0d14;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.sidebar-brand .logo-svg {
  width: 38px;
  height: 38px;
}

.sidebar-brand-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.sidebar-brand-name span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.25s;
}

.nav-item span.material-icons-round {
  font-size: 22px;
  transition: transform 0.2s;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.nav-item:hover span.material-icons-round {
  transform: scale(1.1);
}

.nav-item.active {
  background-color: var(--secondary-hover);
  color: var(--primary-light);
  border: 1.5px solid var(--border-color);
}

.nav-item.active span.material-icons-round {
  color: var(--primary);
  filter: drop-shadow(0 0 4px var(--primary-glow));
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.btn-sidebar-logout {
  background: none;
  border: none;
  color: var(--error);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 16px;
  width: 100%;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s;
}

.btn-sidebar-logout:hover {
  background-color: var(--error-bg);
}

/* Main Workspace Area */
.main-workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.workspace-header {
  height: 70px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #0b0d14;
}

.workspace-header .mobile-menu-trigger {
  display: none;
}

.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-meta h4 {
  font-size: 14px;
  font-weight: 700;
}

.user-meta span {
  font-size: 11px;
  color: var(--text-muted);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
}

.btn-mobile-logout {
  display: none;
}

.workspace-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

/* Tabs Switching Visibility */
.dashboard-tab {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  flex-direction: column;
  gap: 24px;
}

.dashboard-tab.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* Hides mobile navigation on desktop */
.mobile-nav-bar {
  display: none;
}

/* ================= TAB 1: HOME (Inicio) STYLING ================= */
.dashboard-welcome-banner {
  background: linear-gradient(135deg, rgba(22, 26, 38, 0.8) 0%, rgba(10, 12, 18, 0.8) 100%);
  border: 1px solid var(--border-color);
  padding: 24px 30px;
  border-radius: 20px;
}

.dashboard-welcome-banner h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  margin-bottom: 8px;
}

.dashboard-welcome-banner h2 span {
  color: var(--primary-light);
}

.dashboard-welcome-banner p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 750px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 44px;
  font-weight: 800;
  color: var(--text-main);
  margin: 10px 0 16px 0;
  line-height: 1;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-detail {
  font-size: 13px;
  color: var(--text-muted);
  margin: 16px 0;
  font-weight: 500;
  min-height: 38px;
  line-height: 1.4;
}

/* ================= TAB 2: CAMPAIGNS (Campañas) STYLING ================= */
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.section-title-row h2 {
  font-family: var(--font-heading);
  font-size: 22px;
}

.campaign-layout-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.campaigns-list-wrapper h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  margin-bottom: 14px;
  color: var(--text-muted);
}

#campaigns-list-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.empty-list-placeholder {
  grid-column: 1 / -1;
  background-color: var(--bg-card);
  border: 1.5px dashed var(--border-color);
  padding: 40px 20px;
  border-radius: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-list-placeholder span {
  font-size: 48px;
  color: var(--text-muted);
}

.empty-list-placeholder p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Campaign Card */
.campaign-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.campaign-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.campaign-card .camp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.campaign-card .camp-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-all;
}

.btn-delete-campaign {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.btn-delete-campaign:hover {
  color: var(--error);
  background-color: var(--error-bg);
}

.btn-delete-campaign span {
  font-size: 20px;
}

.campaign-card .camp-dates {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.campaign-card .camp-dates span {
  font-size: 16px;
}

.campaign-card .camp-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.channel-badge {
  background-color: rgba(255, 51, 102, 0.1);
  color: var(--primary-light);
  border: 1px solid rgba(255, 51, 102, 0.2);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: lowercase;
}

.community-badge {
  background-color: rgba(66, 133, 244, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(66, 133, 244, 0.2);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

/* ================= TAB 3: CREDIT CARD STYLING ================= */
.payment-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 36px;
  align-items: flex-start;
  margin-top: 10px;
}

.credit-card-preview {
  position: relative;
  width: 340px;
  height: 208px;
  border-radius: 20px;
  padding: 24px;
  background: linear-gradient(135deg, #1b2035 0%, #0c0e17 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-main);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  user-select: none;
}

.credit-card-preview .card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.credit-card-preview .chip-icon {
  font-size: 28px;
  color: #d1d5db;
}

.credit-card-preview .card-brand-logo {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.5px;
  color: #ffffff;
  background: linear-gradient(90deg, #ff3366, #ff003c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.credit-card-preview .card-number-display {
  font-family: 'Courier New', Courier, monospace;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin: 12px 0;
  color: #ffffff;
}

.credit-card-preview .card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.credit-card-preview .card-label {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.credit-card-preview .card-value {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credit-card-preview .card-expiry {
  text-align: right;
}

.payment-form {
  max-width: 450px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 18px;
}

/* ================= TAB 4: PROFILE STYLING ================= */
.section-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: -12px;
  line-height: 1.5;
}

.profile-form {
  max-width: 550px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 18px;
  margin-top: 10px;
}

/* ================= CHIPS / CHECKBOX DESIGN FOR CAMPAIGN FORM ================= */
.channels-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.channel-chip-checkbox {
  position: relative;
  cursor: pointer;
  display: block;
}

.channel-chip-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.chip-label-box {
  background-color: var(--secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
  user-select: none;
}

.chip-label-box span {
  font-size: 16px;
  display: none;
  /* Hidden tick by default */
}

.channel-chip-checkbox:hover .chip-label-box {
  background-color: var(--secondary-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.channel-chip-checkbox input[type="checkbox"]:checked+.chip-label-box {
  background: var(--primary-gradient);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 51, 102, 0.25);
}

.channel-chip-checkbox input[type="checkbox"]:checked+.chip-label-box span {
  display: inline-block;
}

/* Communities checklist wrapper styling */
.communities-list {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.community-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  user-select: none;
}

.community-item input[type="checkbox"] {
  display: none;
}

.custom-chk {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--secondary);
  display: inline-block;
  position: relative;
  transition: all 0.2s;
}

.community-item:hover .custom-chk {
  border-color: var(--primary-light);
}

.community-item input[type="checkbox"]:checked+.custom-chk {
  background-color: var(--primary);
  border-color: var(--primary);
}

.community-item input[type="checkbox"]:checked+.custom-chk::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ================= MODAL DIALOGS ================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(5, 6, 9, 0.85);
  backdrop-filter: blur(5px);
  z-index: 500;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.3s;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

.modal-container {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  width: 500px;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #0b0d14;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
}

.modal-form {
  padding: 24px;
  overflow-y: auto;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ================= TOASTS & UTILS ================= */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 340px;
  background-color: #161c2b;
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  font-size: 13px;
  font-weight: 500;
}

.toast.toast-error {
  border-left: 4px solid var(--error);
  color: #fca5a5;
}

.toast.toast-success {
  border-left: 4px solid var(--success);
  color: #a7f3d0;
}

.toast-icon {
  font-size: 20px;
}

.toast-error .toast-icon {
  color: var(--error);
}

.toast-success .toast-icon {
  color: var(--success);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.hidden {
  display: none !important;
}

/* Base button and forms shared elements */
.btn {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.25s;
  width: 100%;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 51, 102, 0.45);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
}

.btn-google {
  background-color: #ffffff;
  color: var(--text-dark);
  font-weight: 600;
  border: 1px solid #e5e7eb;
}

.btn-google img {
  width: 20px;
  height: 20px;
}

.btn-google:hover {
  background-color: #f9fafb;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

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

.input-wrapper input {
  width: 100%;
  background-color: rgba(12, 14, 23, 0.8);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px 12px 42px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: all 0.25s;
}

.input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.15);
  background-color: rgba(20, 25, 38, 0.9);
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 20px;
  transition: color 0.25s;
}

.input-wrapper input:focus+.input-icon {
  color: var(--primary);
}

.btn-toggle-password {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.btn-toggle-password span {
  font-size: 20px;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin: 18px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.divider::before {
  margin-right: 10px;
}

.divider::after {
  margin-left: 10px;
}

.auth-switch-text {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-switch-text .link {
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

/* Developer log drawer styles */
.dev-drawer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(260px);
  width: 385px;
  background-color: #0c0e18;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px 20px 0 0;
  z-index: 2000;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dev-drawer.open {
  transform: translateX(-50%) translateY(0);
}

.dev-drawer-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background-color: #121624;
  border-radius: 20px 20px 0 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dev-drawer-header h3 {
  font-size: 13px;
  color: var(--primary-light);
  flex: 1;
}

.dev-drawer-header span {
  font-size: 20px;
  color: var(--primary-light);
}

.dev-drawer-content {
  padding: 16px 20px;
  height: 260px;
  display: flex;
  flex-direction: column;
}

.dev-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

.email-inbox {
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inbox-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  padding: 20px;
  font-style: italic;
}

.inbox-item {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inbox-item .mail-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: var(--text-main);
}

.inbox-item .mail-link {
  color: var(--primary-light);
  text-decoration: none;
  background-color: rgba(255, 51, 102, 0.08);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 51, 102, 0.2);
  display: inline-block;
}

.dev-drawer-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* ================= KEYFRAMES & ANIMATIONS ================= */
@keyframes pulseGlow {
  0% {
    opacity: 0.4;
    transform: scale(0.95);
  }

  100% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

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

/* ================= MEDIA QUERIES (RESPONSIVE DUAL-VIEWPORT ENGINE) ================= */

/* MOBILE VIEWPORTS SPECIFICS (Tablet / Mobile) */
@media (max-width: 768px) {
  body {
    background-image: none;
    background-color: var(--bg-dark);
    align-items: flex-start;
  }

  .app-container {
    padding: 0;
    width: 100vw;
    height: 100vh;
  }

  .mobile-frame {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  /* Dashboard layout in mobile mode */
  .dashboard-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .sidebar {
    display: none;
    /* Hide Sidebar on mobile */
  }

  .workspace-header {
    height: 60px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
  }

  .workspace-header .mobile-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .workspace-header .mobile-menu-trigger .brand-text {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
  }

  .workspace-header .mobile-menu-trigger .brand-text span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .user-meta {
    display: none;
    /* Hide textual names on mobile header */
  }

  .btn-mobile-logout {
    display: flex;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    cursor: pointer;
  }

  .workspace-content {
    padding: 16px;
    padding-bottom: 90px;
    /* Space for bottom sticky bar */
  }

  /* Bottom navigation styling for mobile */
  .mobile-nav-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 65px;
    background-color: rgba(11, 13, 20, 0.95);
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    flex: 1;
    height: 100%;
  }

  .mobile-nav-item span.material-icons-round {
    font-size: 22px;
  }

  .mobile-nav-label {
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-heading);
  }

  .mobile-nav-item.active {
    color: var(--primary);
  }

  /* Layout adjustments inside tabs for mobile */
  .payment-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-items: center;
  }

  .payment-form {
    width: 100%;
  }

  .profile-form {
    width: 100%;
  }

  .dev-drawer {
    width: 100%;
    border-radius: 20px 20px 0 0;
  }
}

/* DESKTOP MEDIA QUERIES ADJUSTMENTS */
@media (min-width: 769px) {

  /* Enforce desktop views centering if they are somehow smaller */
  #auth-container {
    height: 100vh;
  }

  .toast {
    bottom: 24px;
    right: 24px;
  }
}

/* ================= ADVERTISING CREATIVES & COST CALCULATOR LAYOUTS ================= */

.mock-images-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.mock-image-option {
  position: relative;
  background-color: var(--secondary);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s;
  padding: 4px;
}

.mock-image-option img {
  width: 100%;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  pointer-events: none;
}

.mock-image-option span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
  pointer-events: none;
}

.mock-image-option:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background-color: var(--secondary-hover);
}

.mock-image-option.selected {
  border-color: var(--primary);
  background-color: rgba(255, 51, 102, 0.05);
  box-shadow: 0 0 8px rgba(255, 51, 102, 0.25);
}

.mock-image-option.selected span {
  color: var(--primary-light);
}

/* Estimator Cost breakdown styles */
.cost-breakdown-panel {
  background-color: rgba(9, 10, 16, 0.9);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slideDown 0.3s ease-out;
}

.cost-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 6px;
}

.cost-panel-header h4 {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cost-duration-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.cost-list-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cost-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  background-color: rgba(255, 255, 255, 0.01);
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}

.cost-item-row span {
  color: var(--text-muted);
}

.cost-item-row strong {
  color: var(--text-main);
  font-weight: 600;
}

.cost-placeholder {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 8px 0;
}

.cost-divider {
  border-bottom: 1px solid var(--border-color);
}

.cost-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-family: var(--font-heading);
  color: var(--text-main);
}

/* Campaign Card Creative Enhancements */
.campaign-card-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.camp-ad-preview {
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  margin-top: 4px;
}

.camp-ad-preview-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
  word-break: break-all;
}

.camp-ad-preview-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  word-break: break-all;
  white-space: pre-line;
  margin-bottom: 6px;
}

.camp-ad-preview-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--primary-light);
  text-decoration: none;
  border: 1px solid rgba(255, 51, 102, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
  background-color: rgba(255, 51, 102, 0.02);
  transition: all 0.2s;
  width: fit-content;
}

.camp-ad-preview-link:hover {
  background-color: rgba(255, 51, 102, 0.08);
  border-color: var(--primary);
  text-decoration: none;
}

.camp-ad-preview-link span.material-icons-round {
  font-size: 12px;
}

.camp-cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.camp-cost-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.camp-cost-value {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-light);
}

/* ================= TAB 2b: RATES & CHANNELS STYLING ================= */
.channels-rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.channel-rate-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
}

.channel-rate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-gradient);
  opacity: 0.7;
  transition: opacity 0.3s;
}

.channel-rate-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 51, 102, 0.15);
}

.channel-rate-card:hover::before {
  opacity: 1;
}

.channel-rate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.channel-rate-title-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-rate-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 51, 102, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
}

.channel-rate-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.channel-rate-type {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 12px;
}

.channel-rate-price-block {
  margin: 8px 0;
}

.channel-rate-price {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-light);
}

.channel-rate-price-label {
  font-size: 11px;
  color: var(--text-muted);
}

.channel-rate-frequency {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  padding: 6px 12px;
  border-radius: 20px;
  width: fit-content;
}

.channel-rate-frequency span.material-icons-round {
  font-size: 16px;
}

.channel-rate-conditions {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-top: 4px;
  flex-grow: 1;
}

/* ================= IMAGE UPLOAD AND PREVIEW ================= */
.image-upload-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.btn-upload-image {
  background-color: var(--secondary) !important;
  color: var(--text-main) !important;
  border: 1.5px solid var(--border-color) !important;
  transition: all 0.2s ease;
}

.btn-upload-image:hover {
  background-color: var(--secondary-hover) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.image-preview-container {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--border-color);
  max-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(0, 0, 0, 0.25);
  animation: slideDown 0.3s ease-out;
}

.image-preview-container img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.btn-clear-preview {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-clear-preview:hover {
  background-color: var(--primary);
}