/**
 * Flash Journalist Frontend Styles - SAAS Portal Edition
 */

/* ========================================
   RESET & BASE STYLES
   ======================================== */

body.fj-portal-page {
  margin: 0 !important;
  padding: 0 !important;
  background: #f5f7fa !important;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif !important;
}

body.fj-portal-page #wpadminbar {
  display: none !important;
}

/* Prevent body scroll when mobile sidebar is open */
body.sidebar-open {
  overflow: hidden;
}

/* ========================================
   PORTAL LAYOUT - Sidebar Navigation
   ======================================== */

.fj-portal-wrapper {
  display: flex;
  min-height: 100vh;
  background: #f5f7fa;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  margin-top: -32px;
}

.fj-portal-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #000 0%, #000 100%);
  color: #fff;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.fj-sidebar-header {
  padding: 30px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fj-logo {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #fff;
}

.fj-logo i {
  color: #fbbf24;
  margin-right: 8px;
}

.fj-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.fj-subscription-badge {
  margin: 20px;
  padding: 12px 15px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.fj-subscription-badge.status-active {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #ffffff;
}

.fj-subscription-badge.status-inactive {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.fj-subscription-badge i {
  margin-right: 8px;
}

.fj-sidebar-nav {
  flex: 1;
  padding: 10px 0;
}

.fj-sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fj-sidebar-nav li {
  margin: 0;
}

.fj-sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.fj-sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-left-color: #fbbf24;
}

.fj-sidebar-nav li.active a {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-left-color: #fbbf24;
  font-weight: 600;
}

.fj-sidebar-nav i {
  width: 20px;
  margin-right: 12px;
  font-size: 16px;
}

/* Hide mobile logout on desktop */
.fj-sidebar-nav li.fj-mobile-logout {
  display: none;
}

.fj-sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.fj-sidebar-footer p {
  margin: 0 0 8px 0;
}

.fj-sidebar-footer a {
  color: #fbbf24;
  text-decoration: none;
}

.fj-sidebar-footer a:hover {
  text-decoration: underline;
}

.fj-portal-main {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.fj-portal-main.fj-portal-full-width {
  margin-left: 0;
}

.fj-portal-topbar {
  background: #fff;
  padding: 20px 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
}

.fj-portal-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
}

.fj-portal-user-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.fj-user-name {
  font-size: 14px;
  color: #6b7280;
}

.fj-user-name i {
  color: #1b8415;
  margin-right: 6px;
}

.fj-logout-link {
  padding: 8px 16px;
  background: #ef4444;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.3s;
}

.fj-logout-link:hover {
  background: #dc2626;
  color: #fff;
}

.fj-logout-link i {
  margin-right: 6px;
}

.fj-portal-content {
  flex: 1;
  padding: 30px;
  max-width: 1400px;
}

/* ========================================
   AUTH PAGES - Login & Registration
   ======================================== */

.fj-auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.fj-auth-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 680px;
  width: 100%;
  overflow: hidden;
}

.fj-auth-header {
  text-align: center;
  padding: 40px 40px 30px;
  background: linear-gradient(135deg, #1b8415 0%, #1b8415 100%);
  color: #fff;
}

.fj-auth-logo {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.fj-auth-logo i {
  font-size: 30px;
  color: #fbbf24;
}

.fj-auth-header h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.fj-auth-subtitle {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.fj-auth-body {
  padding: 40px;
}

.fj-auth-footer {
  padding: 20px;
  background: #f9fafb;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
}

.fj-auth-footer p {
  margin: 0;
}

.fj-auth-links {
  margin-top: 20px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.fj-auth-links a {
  color: #1b8415;
  text-decoration: none;
  font-weight: 500;
}

.fj-auth-links a:hover {
  text-decoration: underline;
}

/* ========================================
   GENERAL STYLES
   ======================================== */

.fj-button {
  display: inline-block;
  padding: 12px 24px;
  background: #1b8415;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s;
  text-align: center;
}

.fj-button:hover {
  background: #1b8415;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

.fj-button-primary {
  background: #1b8415;
}

.fj-button-secondary {
  background: #6b7280;
}

.fj-button-small {
  padding: 8px 16px;
  font-size: 14px;
}

/* ========================================
   ALERTS & MESSAGES
   ======================================== */

.fj-error {
  padding: 15px 15px 15px 45px;
  background: #fef2f2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
  border-radius: 6px;
  margin: 15px 0;
  position: relative;
}

.fj-error::before {
  content: "\f06a";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 15px;
  top: 15px;
}

.fj-success {
  padding: 15px 15px 15px 45px;
  background: #f0fdf4;
  color: #166534;
  border-left: 4px solid #000;
  border-radius: 6px;
  margin: 15px 0;
  position: relative;
}

/* .fj-success::before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 15px;
  top: 15px;
} */

.fj-warning {
  padding: 15px 15px 15px 45px;
  background: #fffbeb;
  color: #92400e;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  margin: 15px 0;
  position: relative;
}

.fj-warning::before {
  content: "\f071";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 15px;
  top: 15px;
}

.fj-info {
  padding: 15px 15px 15px 45px;
  background: #eff6ff;
  color: #1b8415;
  border-left: 4px solid #1b8415;
  border-radius: 6px;
  margin: 15px 0;
  position: relative;
}

/* .fj-info::before {
  content: "\f05a";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 15px;
  top: 15px;
} */

/* ========================================
   FORMS
   ======================================== */

.fj-form-group {
  margin-bottom: 20px;
}

.fj-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
  font-size: 14px;
}

.fj-form-group label i {
  margin-right: 6px;
  color: #6b7280;
}

.fj-form-group input[type="text"],
.fj-form-group input[type="email"],
.fj-form-group input[type="tel"],
.fj-form-group input[type="password"],
.fj-form-group input[type="number"],
.fj-form-group textarea,
.fj-form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.3s;
  color: #6a6565;
}

.fj-form-group input[type="text"]:focus,
.fj-form-group input[type="email"]:focus,
.fj-form-group input[type="tel"]:focus,
.fj-form-group input[type="password"]:focus,
.fj-form-group input[type="number"]:focus,
.fj-form-group textarea:focus,
.fj-form-group select:focus {
  outline: none;
  border-color: #1b8415;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.fj-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Login/Register */
.fj-login-container,
.fj-register-container {
  max-width: 600px;
  margin: 50px auto;
  padding: 20px;
}

.fj-login-box,
.fj-register-box {
  background: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.fj-login-box h2,
.fj-register-box h2 {
  text-align: center;
  margin-bottom: 30px;
}

.fj-login-links,
.fj-register-links {
  text-align: center;
  margin-top: 20px;
}

/* ========================================
   DASHBOARD COMPONENTS
   ======================================== */

.fj-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.fj-stat-card {
  background: linear-gradient(135deg, #fff 0%, #f9fafb 100%);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s;
  border: 1px solid #e5e7eb;
}

.fj-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.fj-stat-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #1b8415 0%, #1b8415 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
}

.fj-stat-info h3 {
  margin: 0 0 5px 0;
  font-size: 32px;
  font-weight: 700;
  color: #1f2937;
}

.fj-stat-info p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.fj-dashboard-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 30px;
}

.fj-dashboard-section {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.fj-dashboard-section h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
  color: #1f2937;
  padding-bottom: 15px;
  border-bottom: 2px solid #e5e7eb;
}

.fj-dashboard-section h2 i {
  color: #1b8415;
  margin-right: 10px;
}

.fj-subscription-card {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #1b8415;
}

.fj-subscription-card h3 {
  margin: 0 0 10px 0;
  color: #1b8415;
  font-size: 20px;
}

.fj-subscription-price {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 10px 0;
}

.fj-dashboard-quick-actions {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.fj-dashboard-quick-actions h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
  color: #1f2937;
  padding-bottom: 15px;
  border-bottom: 2px solid #e5e7eb;
}

.fj-dashboard-quick-actions h2 i {
  color: #fbbf24;
  margin-right: 10px;
}

.fj-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.fj-quick-action-card {
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: #1f2937;
  transition: all 0.3s;
  border: 2px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.fj-quick-action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(30, 64, 175, 0.15);
  border-color: #1b8415;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.fj-action-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  color: #1b8415;
}

.fj-action-icon i {
  font-size: 36px;
}

/* ========================================
   PLANS & SUBSCRIPTIONS
   ======================================== */

.fj-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin: 30px 0;
}

.fj-plan-card {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  border: 2px solid #e5e7eb;
  transition: all 0.3s;
}

.fj-plan-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: #1b8415;
}

.fj-plan-card h3 {
  margin-bottom: 15px;
  font-size: 24px;
  color: #1f2937;
}

.fj-plan-card .price {
  font-size: 40px;
  color: #1b8415;
  margin: 20px 0;
  font-weight: 700;
}

.fj-plan-card .price span {
  font-size: 16px;
  color: #6b7280;
  font-weight: 400;
}

.fj-plan-card .features {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  text-align: left;
}

.fj-plan-card .features li {
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
}

.fj-plan-card .features li:before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #000;
  margin-right: 10px;
}

/* ========================================
   TABLES
   ======================================== */

.fj-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
}

.fj-table thead {
  background: linear-gradient(135deg, #1b8415 0%, #1b8415 100%);
  color: #fff;
}

.fj-table th,
.fj-table td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.fj-table th {
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fj-table tbody tr {
  transition: background 0.2s;
}

.fj-table tbody tr:hover {
  background: #f9fafb;
}

/* ========================================
   BADGES & STATUS INDICATORS
   ======================================== */

.fj-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.fj-badge i {
  margin-right: 6px;
  font-size: 10px;
}

.fj-badge-pending {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.fj-badge-active,
.fj-badge-approved,
.fj-badge-publish {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.fj-badge-rejected,
.fj-badge-cancelled {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.fj-badge-draft {
  background: #eff6ff;
  color: #1b8415;
  border: 1px solid #bfdbfe;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 992px) {
  .fj-portal-sidebar {
    width: 220px;
  }

  .fj-portal-main {
    margin-left: 220px;
  }
}

@media (max-width: 768px) {
  .fj-portal-sidebar {
    position: fixed;
    left: -260px;
    transition: left 0.3s;
    z-index: 1000;
  }

  .fj-portal-sidebar.is-open {
    left: 0;
  }

  .fj-portal-main {
    margin-left: 0;
  }

  .fj-portal-topbar {
    padding: 15px 20px;
  }

  .fj-portal-title {
    font-size: 22px;
  }

  .fj-auth-container {
    margin: 0px;
  }

  .fj-auth-wrapper {
    padding: 10px;
  }
  .fj-auth-body {
    padding: 30px 25px;
  }

  .fj-form-row,
  .fj-dashboard-sections,
  .fj-checkout-grid {
    grid-template-columns: 1fr;
  }

  .fj-dashboard-nav {
    flex-wrap: wrap;
  }

  .fj-form-navigation {
    flex-direction: column;
  }

  .fj-form-navigation .fj-button {
    width: 100%;
    margin: 5px 0;
  }
}

/* ========================================
   MULTI-STEP FORM
   ======================================== */

.fj-progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

.fj-progress-steps::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #e5e7eb;
  z-index: 0;
}

.fj-step {
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 1;
}

.fj-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-weight: 600;
  transition: all 0.3s;
}

.fj-step.active .fj-step-number {
  background: #1b8415;
  color: white;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

.fj-step.completed .fj-step-number {
  background: #000;
  color: white;
}

.fj-step.completed .fj-step-number::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.fj-step-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.fj-step.active .fj-step-label {
  color: #1b8415;
  font-weight: 600;
}

.fj-multistep-form .fj-form-step {
  display: none;
}

.fj-multistep-form .fj-form-step.active {
  display: block;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fj-form-navigation {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.fj-form-navigation .fj-button {
  flex: 1;
}

.fj-error-msg {
  display: block;
  color: #dc2626;
  font-size: 13px;
  margin-top: 5px;
  min-height: 18px;
}

.fj-form-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

/* ========================================
   FILE UPLOAD STYLING
   ======================================== */

.fj-file-upload-wrapper {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  background: #f8fafc;
  transition: all 0.3s ease;
  cursor: pointer;
}

.fj-file-upload-wrapper:hover {
  border-color: #1b8415;
  background: #eff6ff;
}

.fj-file-upload-wrapper.has-file {
  border-color: #000;
  background: #ecfdf5;
  border-style: solid;
}

.fj-file-upload-wrapper.has-file .fj-file-upload-icon {
  color: #000;
}

.fj-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.fj-file-upload-icon {
  font-size: 48px;
  color: #94a3b8;
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

.fj-file-name {
  display: block;
  font-size: 14px;
  color: #64748b;
  margin-bottom: 15px;
  font-weight: 500;
}

.fj-file-upload-wrapper.has-file .fj-file-name {
  color: #000;
  font-weight: 600;
}

.fj-file-browse-btn {
  display: inline-block;
  padding: 10px 24px;
  background: #1b8415;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.fj-file-browse-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.fj-file-upload-wrapper.has-file .fj-file-browse-btn {
  background: #000;
}

.fj-file-upload-wrapper.has-file .fj-file-browse-btn:hover {
  background: #059669;
}

/* ========================================
   PLAN SELECTION STEP
   ======================================== */

.fj-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.fj-plan-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 25px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.fj-plan-card:hover {
  border-color: #1b8415;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
  transform: translateY(-4px);
}

.fj-plan-card.selected {
  border-color: #1b8415;
  background: linear-gradient(135deg, #eff6ff 0%, #fff 100%);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
}

.fj-plan-card.selected::before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  color: #1b8415;
}

.fj-plan-card h4 {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.fj-plan-price {
  font-size: 36px;
  font-weight: 800;
  color: #1b8415;
  margin: 15px 0;
}

.fj-plan-price small {
  font-size: 16px;
  font-weight: 500;
  color: #64748b;
}

.fj-plan-description {
  font-size: 14px;
  color: #64748b;
  margin: 15px 0;
  line-height: 1.5;
}

.fj-plan-features {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.fj-plan-features li {
  padding: 8px 0;
  color: #475569;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.fj-plan-features li i {
  color: #000;
  margin-right: 10px;
  font-size: 16px;
}

.fj-select-plan {
  width: 100%;
  padding: 12px 24px;
  background: #1b8415;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 15px;
}

.fj-select-plan:hover {
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.fj-plan-card.selected .fj-select-plan {
  background: #000;
}

.fj-plan-card.selected .fj-select-plan:hover {
  background: #059669;
}

#plan-error {
  display: block;
  color: #dc2626;
  font-size: 14px;
  margin-top: 15px;
  text-align: center;
  font-weight: 600;
}

/* ========================================
   PAYMENT GATEWAY POPUP
   ======================================== */

.fj-payment-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  animation: fadeIn 0.3s ease;
}

.fj-payment-popup-content {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  max-width: 550px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fj-payment-popup-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.fj-payment-popup-header i {
  font-size: 56px;
  color: #000;
  margin-bottom: 15px;
}

.fj-payment-popup-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 10px 0;
}

.fj-payment-popup-header p {
  font-size: 15px;
  color: #64748b;
  margin: 0;
}

.fj-payment-methods {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 25px 0;
}

.fj-payment-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.fj-payment-method:not(.disabled):hover {
  border-color: #1b8415;
  background: #eff6ff;
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.fj-payment-method.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8fafc;
}

.fj-payment-method-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.fj-payment-method-icon {
  font-size: 32px;
  color: #1b8415;
  width: 50px;
  text-align: center;
}

.fj-payment-method-details h4 {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 5px 0;
}

.fj-payment-method-details p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.fj-payment-method-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.fj-payment-method-badge.available {
  background: #dcfce7;
  color: #166534;
}

.fj-payment-method-badge.coming-soon {
  background: #fef3c7;
  color: #92400e;
}

.fj-payment-warning {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 15px 20px;
  border-radius: 8px;
  margin-top: 20px;
}

.fj-payment-warning i {
  color: #f59e0b;
  margin-right: 10px;
}

.fj-payment-warning p {
  margin: 0;
  font-size: 14px;
  color: #92400e;
  line-height: 1.6;
}

/* ========================================
   DATATABLES CUSTOM STYLING
   ======================================== */

/* DataTable wrapper */
.fj-datatable-wrapper {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* DataTable top controls */
.fj-datatable-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

/* Length menu (Show X entries) */
.dataTables_length {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dataTables_length label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
  margin: 0;
  position: relative;
}

.dataTables_length select {
  padding: 8px 32px 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s;
  appearance: none;
}

.dataTables_length label::after {
  content: "\f0d7";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 12px;
  pointer-events: none;
  color: #6b7280;
  font-size: 12px;
}

.dataTables_length select:focus {
  outline: none;
  border-color: #1b8415;
  box-shadow: 0 0 0 3px rgba(206, 2, 2, 0.1);
}

/* Search box */
.dataTables_filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
  margin: 0;
  position: relative;
}

.dataTables_filter input {
  padding: 10px 16px 10px 40px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  width: 250px;
  transition: all 0.3s;
  background: #fff;
}

.dataTables_filter label::before {
  content: "\f002";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 14px;
  top: 12px;
  pointer-events: none;
  color: #6b7280;
  font-size: 14px;
}

.dataTables_filter input:focus {
  outline: none;
  border-color: #1b8415;
  box-shadow: 0 0 0 3px rgba(206, 2, 2, 0.1);
}

/* Table styling */
table.fj-datatable {
  width: 100% !important;
  margin: 0 !important;
}

table.fj-datatable thead th {
  background: linear-gradient(135deg, #1b8415 0%, #1b8415 100%);
  color: #fff;
  font-weight: 600;
  padding: 16px 14px;
  border: none;
  position: relative;
  cursor: pointer;
  user-select: none;
}

table.fj-datatable thead th:hover {
  background: linear-gradient(135deg, #b50202 0%, #b50202 100%);
}

/* Sorting indicators */
table.fj-datatable thead th.sorting,
table.fj-datatable thead th.sorting_asc,
table.fj-datatable thead th.sorting_desc {
  padding-right: 30px;
}

table.fj-datatable thead th.sorting:before,
table.fj-datatable thead th.sorting:after,
table.fj-datatable thead th.sorting_asc:before,
table.fj-datatable thead th.sorting_asc:after,
table.fj-datatable thead th.sorting_desc:before,
table.fj-datatable thead th.sorting_desc:after {
  position: absolute;
  right: 10px;
  display: block;
  opacity: 0.3;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
}

table.fj-datatable thead th.sorting:before {
  content: "\f0de";
  top: 50%;
  transform: translateY(-50%);
}

table.fj-datatable thead th.sorting_asc:before {
  content: "\f0de";
  top: 50%;
  transform: translateY(-50%);
  opacity: 1;
}

table.fj-datatable thead th.sorting_desc:after {
  content: "\f0dd";
  top: 50%;
  transform: translateY(-50%);
  opacity: 1;
}

table.fj-datatable tbody td {
  padding: 14px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

table.fj-datatable tbody tr:hover {
  background: #f9fafb;
}

table.fj-datatable tbody tr:last-child td {
  border-bottom: none;
}

/* DataTable bottom controls */
.fj-datatable-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

/* Info text */
.dataTables_info {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

/* Pagination */
.dataTables_paginate {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dataTables_paginate .paginate_button {
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  user-select: none;
}

.dataTables_paginate .paginate_button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #1f2937;
}

.dataTables_paginate .paginate_button.current {
  background: linear-gradient(135deg, #1b8415 0%, #1b8415 100%);
  border-color: #1b8415;
  color: #fff;
  pointer-events: none;
}

.dataTables_paginate .paginate_button.current:hover {
  background: linear-gradient(135deg, #1b8415 0%, #1b8415 100%);
  border-color: #1b8415;
  color: #fff;
}

.dataTables_paginate .paginate_button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.dataTables_paginate .ellipsis {
  padding: 8px 12px;
  color: #9ca3af;
  font-size: 14px;
}

/* Processing indicator */
.dataTables_processing {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 20px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  color: #374151;
  font-weight: 600;
  z-index: 1000;
}

/* Empty table message */
.dataTables_empty {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  font-size: 15px;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .fj-datatable-top,
  .fj-datatable-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .dataTables_filter input {
    width: 100%;
  }

  .dataTables_paginate {
    justify-content: center;
  }

  /* Make table scrollable on mobile */
  .dataTables_wrapper {
    overflow-x: auto;
    scrollbar-width: thin;
  }
}

/* Responsive column visibility */
table.fj-datatable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.fj-datatable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
  background-color: #1b8415;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

table.fj-datatable.dtr-inline.collapsed
  > tbody
  > tr.parent
  > td.dtr-control:before,
table.fj-datatable.dtr-inline.collapsed
  > tbody
  > tr.parent
  > th.dtr-control:before {
  background-color: #b50202;
}

/* Child row styling */
table.fj-datatable > tbody > tr.child {
  background: #f9fafb;
}

table.fj-datatable > tbody > tr.child ul.dtr-details {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

table.fj-datatable > tbody > tr.child ul.dtr-details li {
  padding: 8px 14px;
  border-bottom: 1px solid #e5e7eb;
}

table.fj-datatable > tbody > tr.child ul.dtr-details li:last-child {
  border-bottom: none;
}

table.fj-datatable > tbody > tr.child span.dtr-title {
  font-weight: 600;
  color: #374151;
  display: inline-block;
  min-width: 120px;
}

table.fj-datatable > tbody > tr.child span.dtr-data {
  color: #6b7280;
  gap: 8px;
  display: flex;
  flex-direction: column;
}

/* ========================================
   ENHANCED MOBILE RESPONSIVE STYLES
   ======================================== */

/* Mobile Menu Toggle Button */
.fj-mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.fj-mobile-menu-toggle i {
  font-size: 20px;
}

/* Overlay for mobile sidebar */
.fj-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.fj-sidebar-overlay.active {
  display: block;
}

/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) {
  .fj-portal-sidebar {
    width: 240px;
  }

  .fj-portal-main {
    margin-left: 240px;
  }

  .fj-portal-topbar {
    padding: 15px 25px;
  }

  .fj-portal-title {
    font-size: 22px;
  }

  .fj-dashboard-grid,
  .fj-dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .fj-stat-card {
    padding: 20px;
  }

  .fj-plans-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Tables on tablet */
  .fj-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .fj-table th,
  .fj-table td {
    padding: 12px;
    font-size: 14px;
  }

  /* DataTables on tablet */
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    display: inline-block;
    width: auto;
  }
}

/* Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
  /* Show mobile menu toggle */
  .fj-mobile-menu-toggle {
    display: block;
    top: 20px;
    left: 85%;
  }

  /* Sidebar - hidden by default on mobile */
  .fj-portal-sidebar {
    position: fixed;
    left: -280px;
    width: 280px;
    transition: left 0.3s ease;
    z-index: 1000;
    height: 100vh;
  }

  .fj-portal-sidebar.is-open {
    left: 0;
  }

  /* Main content - full width on mobile */
  .fj-portal-main {
    margin-left: 0;
    padding-top: 0;
  }

  /* Content padding to account for fixed topbar */
  .fj-portal-content {
    padding: 15px;
    margin-top: 80px;
  }

  /* Topbar adjustments */
  .fj-portal-topbar {
    padding: 10px 10px 10px 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-height: auto;
  }

  .fj-portal-title {
    font-size: 18px;
    margin: 0;
    width: 100%;
  }

  .fj-portal-user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap;
  }

  .fj-user-name {
    font-size: 12px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hide topbar logout on mobile */
  .fj-logout-link {
    display: none;
  }

  /* Show mobile logout in sidebar */
  .fj-sidebar-nav li.fj-mobile-logout {
    display: block;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
    padding-top: 10px;
  }

  .fj-sidebar-nav li.fj-mobile-logout a {
    color: #fca5a5;
    font-weight: 600;
  }

  .fj-sidebar-nav li.fj-mobile-logout a:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-left-color: #ef4444;
  }

  .fj-user-menu-wrapper {
    position: relative;
  }

  .fj-user-menu {
    right: 0;
    left: auto;
    min-width: 200px;
  }

  /* Dashboard cards - single column */
  .fj-dashboard-grid,
  .fj-dashboard-stats {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .fj-stat-card {
    padding: 18px;
    flex-direction: row;
    gap: 15px;
  }

  .fj-stat-icon {
    width: 55px;
    height: 55px;
    font-size: 24px;
    flex-shrink: 0;
  }

  .fj-stat-info h3 {
    font-size: 26px;
    margin-bottom: 3px;
  }

  .fj-stat-info p {
    font-size: 13px;
  }

  /* Plans grid - single column */
  .fj-plans-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Forms - single column layouts */
  .fj-form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .fj-form-group {
    margin-bottom: 15px;
  }

  .fj-form-navigation {
    flex-direction: column;
    gap: 10px;
  }

  .fj-form-navigation .fj-button {
    width: 100%;
  }

  /* Progress steps */
  .fj-progress-steps {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }

  .fj-step {
    min-width: 100px;
  }

  .fj-step-label {
    font-size: 11px;
  }

  /* Tables - make scrollable */
  .fj-table-wrapper,
  .fj-datatable-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    position: relative;
  }

  .fj-datatable-wrapper {
    padding: 15px;
  }

  .fj-table-wrapper::after {
    content: "← Swipe to see more →";
    position: absolute;
    bottom: 8px;
    right: 50%;
    transform: translateX(50%);
    background: rgba(206, 2, 2, 0.95);
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 11px;
    pointer-events: none;
    opacity: 0.9;
    white-space: nowrap;
    z-index: 5;
    animation: fadeInOut 3s ease-in-out infinite;
  }

  @keyframes fadeInOut {
    0%,
    100% {
      opacity: 0.6;
    }
    50% {
      opacity: 1;
    }
  }

  /* Better responsive table handling - let DataTables handle it */
  .fj-table,
  .dataTable {
    width: 100% !important;
    min-width: auto !important;
  }

  .fj-table th,
  .fj-table td,
  .dataTable th,
  .dataTable td {
    padding: 10px 8px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
  }

  .fj-table th,
  .dataTable thead th {
    background: linear-gradient(135deg, #1b8415 0%, #1b8415 100%);
    font-size: 12px;
    position: relative;
  }

  /* DataTables info and pagination */
  .dataTables_info {
    font-size: 12px;
    padding: 10px 0;
    text-align: center;
  }

  /* DataTables mobile - no horizontal scroll */
  .dataTables_wrapper {
    overflow: visible;
  }

  /* DataTables controls - stack on mobile */
  .fj-datatable-top,
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    width: 99%;
    margin-bottom: 10px;
  }

  .dataTables_filter label,
  .dataTables_length label {
    width: 100%;
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .dataTables_filter input {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    box-sizing: border-box;
  }

  .dataTables_filter label::before {
    display: none;
  }

  .dataTables_length select {
    width: 100%;
    max-width: 200px;
  }

  .dataTables_paginate {
    display: flex !important;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
    gap: 4px;
    padding: 10px 0;
  }

  .dataTables_paginate .paginate_button {
    padding: 8px 10px !important;
    font-size: 12px !important;
    min-width: 36px;
    margin: 0 2px !important;
    border-radius: 4px !important;
  }

  .dataTables_paginate .paginate_button.previous,
  .dataTables_paginate .paginate_button.next {
    padding: 8px 12px !important;
    font-weight: 600;
  }

  .dataTables_paginate .paginate_button.current {
    background: #1b8415 !important;
    color: #fff !important;
    border-color: #1b8415 !important;
  }

  /* Alert boxes mobile */
  .fj-error,
  .fj-warning,
  .fj-info,
  .fj-success {
    padding: 12px 12px 12px 38px;
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.6;
  }

  .fj-error::before,
  .fj-warning::before,
  .fj-info::before,
  .fj-success::before {
    left: 12px;
    top: 14px;
    font-size: 14px;
  }

  /* Bottom spacing for scrollable areas */
  .fj-table-wrapper,
  .fj-datatable-wrapper {
    margin-bottom: 20px;
    padding: 15px;
    overflow: visible;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
  }

  /* Hide scroll indicator on mobile - using responsive mode instead */
  .fj-table-wrapper::after {
    display: none;
  }

  /* Improve scrollbar visibility on mobile */
  .fj-table-wrapper::-webkit-scrollbar,
  .dataTables_wrapper::-webkit-scrollbar {
    height: 8px;
  }

  .fj-table-wrapper::-webkit-scrollbar-track,
  .dataTables_wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  .fj-table-wrapper::-webkit-scrollbar-thumb,
  .dataTables_wrapper::-webkit-scrollbar-thumb {
    background: #1b8415;
    border-radius: 4px;
  }

  /* Auth pages */
  .fj-auth-container {
    margin: 0;
    padding: 10px;
  }

  .fj-auth-wrapper {
    padding: 15px;
  }

  .fj-auth-body {
    padding: 25px 20px;
  }

  .fj-auth-header h1 {
    font-size: 24px;
  }

  /* Checkout grid */
  .fj-checkout-grid {
    grid-template-columns: 1fr;
  }

  /* Subscription cards and sections */
  .fj-subscription-card {
    padding: 15px !important;
    margin: 10px 0 !important;
  }

  .fj-pending-subscription,
  .fj-available-plans,
  .fj-dashboard-section {
    margin-bottom: 20px !important;
    padding: 0 !important;
  }

  .fj-dashboard-section {
    padding: 15px !important;
    width: 100vw;
  }

  .fj-dashboard-section h2,
  .fj-pending-subscription h2,
  .fj-available-plans h2 {
    font-size: 18px !important;
    margin-bottom: 15px !important;
  }

  .fj-subscription-card h3 {
    font-size: 18px !important;
  }

  .fj-subscription-card p {
    font-size: 13px;
    line-height: 1.6;
  }

  .fj-subscription-card div {
    padding: 12px !important;
  }

  /* Stat cards layout improvements */
  .fj-stat-card .fj-stat-icon {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  /* Article cards */
  .fj-article-card {
    padding: 15px;
  }

  /* Modal adjustments */
  .fj-modal-content {
    width: 95%;
    max-width: 95%;
    margin: 20px auto;
    padding: 20px;
  }

  .fj-modal-header h2 {
    font-size: 20px;
  }

  /* Payment popup */
  .fj-payment-popup-content {
    width: 95%;
    max-width: 95%;
    padding: 20px;
    margin: 20px auto;
  }
}

/* Small Mobile Styles (max-width: 480px) */
@media (max-width: 480px) {
  /* Mobile menu toggle */
  .fj-mobile-menu-toggle {
    top: 10px;
    left: 85%;
    padding: 8px 12px;
  }

  .fj-mobile-menu-toggle i {
    font-size: 18px;
  }

  /* Further reduce padding and spacing */
  .fj-portal-content {
    padding: 12px;
    margin-top: 75px;
    width: 100vw;
  }

  .fj-portal-topbar {
    padding: 8px 8px 8px 8px;
    gap: 0;
  }

  .fj-portal-title {
    font-size: 16px;
  }

  .fj-portal-user-info {
    gap: 6px;
  }

  .fj-user-name {
    font-size: 11px;
  }

  .fj-user-name i {
    display: none;
  }

  .fj-logout-link {
    padding: 5px 10px;
    font-size: 11px;
  }

  .fj-logout-link i {
    margin-right: 3px;
    font-size: 10px;
  }

  /* Stat cards - more compact */
  .fj-stat-card {
    padding: 12px;
    gap: 12px;
  }

  .fj-stat-info h3 {
    font-size: 22px;
  }

  .fj-stat-info p {
    font-size: 11px;
  }

  .fj-stat-icon {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }

  /* Tables even more compact */
  .fj-table th,
  .fj-table td,
  .dataTable th,
  .dataTable td {
    padding: 8px 6px;
    font-size: 12px;
  }

  .fj-table,
  .dataTable {
    width: 100% !important;
  }

  /* DataTables even smaller controls */
  .dataTables_length label,
  .dataTables_filter label {
    font-size: 12px;
  }

  .dataTables_info {
    font-size: 11px;
  }

  .dataTables_paginate .paginate_button {
    padding: 6px 8px !important;
    font-size: 11px !important;
    min-width: 32px;
  }

  /* Subscription cards smaller */
  .fj-subscription-card {
    padding: 12px !important;
  }

  .fj-subscription-card h3 {
    font-size: 16px !important;
  }

  .fj-subscription-card p {
    font-size: 12px;
  }

  .fj-dashboard-section h2,
  .fj-pending-subscription h2,
  .fj-available-plans h2 {
    font-size: 16px !important;
  }

  /* Buttons - full width */
  .fj-button {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }

  /* Form inputs */
  .fj-form-group input,
  .fj-form-group select,
  .fj-form-group textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px;
  }

  /* Table font sizes */
  .fj-table {
    font-size: 12px;
  }

  .fj-table th,
  .fj-table td {
    padding: 8px 6px;
  }

  /* Plan cards - more compact */
  .fj-plan-card {
    padding: 20px 15px;
  }

  .fj-plan-card h3 {
    font-size: 20px;
  }

  .fj-price-amount {
    font-size: 28px;
  }

  /* Dashboard sections */
  .fj-dashboard-section h2 {
    font-size: 18px;
  }

  /* Sidebar - full width when open */
  .fj-portal-sidebar {
    width: 100%;
    left: -100%;
  }

  .fj-portal-sidebar.is-open {
    left: 0;
  }

  /* Progress steps - smaller */
  .fj-step-number {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .fj-step-label {
    font-size: 10px;
  }

  /* Article editor */
  .fj-article-editor {
    padding: 15px;
  }

  /* File upload */
  .fj-file-upload-wrapper {
    padding: 15px;
  }

  .fj-file-upload-text {
    font-size: 13px;
  }

  /* Charts and widgets */
  .fj-chart-container {
    min-height: 250px;
  }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
  .fj-portal-sidebar {
    width: 260px;
  }

  .fj-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fj-stat-card {
    padding: 15px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger tap targets for touch devices */
  .fj-nav-link,
  .fj-button,
  .fj-user-menu-toggle {
    min-height: 44px;
    padding: 12px 16px;
  }

  /* Better spacing for touch */
  .fj-table tr {
    cursor: pointer;
  }

  /* Prevent accidental selections */
  .fj-stat-value,
  .fj-stat-label {
    user-select: none;
    -webkit-user-select: none;
  }

  /* Smooth scrolling for touch */
  .fj-portal-content {
    -webkit-overflow-scrolling: touch;
  }

  /* Better button feedback */
  .fj-button:active {
    transform: scale(0.98);
  }
}

/* Smooth scrolling globally */
html {
  scroll-behavior: smooth;
}

/* Better focus states for accessibility */
.fj-button:focus,
.fj-nav-link:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #1b8415;
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.fj-post-action-buttons {
  display: flex;
  gap: 15px;
  padding-top: 20px;
  border-top: 2px solid #e5e7eb;
}


/* for mobile, fj-post-action-buttons should have flex-direction: column */
@media (max-width: 768px) {
  .fj-post-action-buttons {
    flex-direction: column;
  }
}