/**
 * Author Dashboard Styles
 *
 * @package Softinator_Author_Dashboard
 */

@import url('https://fonts.googleapis.com/css2?family=Prata&display=swap');

/* ============================================
   CSS Variables
   ============================================ */
:root {
  /* Dark Theme Colors */
  --sad-sidebar-bg: #1a1f36;
  --sad-sidebar-bg-hover: #252b45;
  --sad-sidebar-text: #a0aec0;
  --sad-sidebar-text-active: #ffffff;
  --sad-sidebar-accent: #667eea;

  /* Primary Colors */
  --sad-primary: #667eea;
  --sad-primary-dark: #5a67d8;
  --sad-primary-light: #ebf4ff;
  --sad-primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  /* Status Colors */
  --sad-success: #48bb78;
  --sad-success-light: #c6f6d5;
  --sad-success-bg: #f0fff4;
  --sad-warning: #ed8936;
  --sad-warning-light: #feebc8;
  --sad-warning-bg: #fffaf0;
  --sad-error: #f56565;
  --sad-error-light: #fed7d7;
  --sad-error-bg: #fff5f5;
  --sad-info: #4299e1;
  --sad-info-light: #bee3f8;
  --sad-info-bg: #ebf8ff;
  --sad-purple: #9f7aea;
  --sad-purple-light: #e9d8fd;
  --sad-purple-bg: #faf5ff;

  /* Gray Scale */
  --sad-gray-50: #f7fafc;
  --sad-gray-100: #edf2f7;
  --sad-gray-200: #e2e8f0;
  --sad-gray-300: #cbd5e0;
  --sad-gray-400: #a0aec0;
  --sad-gray-500: #718096;
  --sad-gray-600: #4a5568;
  --sad-gray-700: #2d3748;
  --sad-gray-800: #1a202c;
  --sad-gray-900: #171923;

  /* Layout */
  --sad-radius-sm: 4px;
  --sad-radius: 8px;
  --sad-radius-lg: 12px;
  --sad-radius-xl: 16px;
  --sad-radius-full: 9999px;

  /* Shadows */
  --sad-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --sad-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --sad-shadow-md:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --sad-shadow-lg:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Dimensions */
  --sad-header-height: 70px;
  --sad-sidebar-width: 260px;

  --sad-font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --sad-font-serif: "Prata", serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sad-font-serif) !important;
}

input[type=date], input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=url], select, textarea{
  line-height: 1.5 !important;
  margin-bottom: 0 !important;
}
input::placeholder,
select::placeholder,
textarea::placeholder {
  color: #c7c7c7 !important;
}
/* ============================================
   Base Reset for Dashboard
   ============================================ */
.sad-dashboard-wrapper {
  font-family: var(--sad-font-sans) !important;
  min-height: 100vh;
  /* background: var(--sad-gray-100); */
  color: var(--sad-gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sad-dashboard-wrapper * {
  box-sizing: border-box;
}

/* ============================================
   Header - Two Block Layout with Gap
   ============================================ */
.sad-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--sad-header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--sad-gray-200);
  z-index: 100;
  box-shadow: var(--sad-shadow-sm);
}

.sad-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Creates gap between logo and nav */
  height: 100%;
  max-width: 100%;
  padding: 0 24px;
}

/* Logo Block (Left) */
.sad-header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sad-action-btn {
  text-decoration: none;
  color: #01112f;
}

.sad-action-btn:hover {
  color: #01112f;
  text-decoration: underline;
}

.sad-btn-primary {
  color: white !important;
  background: #01112f !important;
}

.sad-btn-lg {
  min-width: 9rem;
  text-decoration: none;
  font-size: 16px;
}

.sad-btn-lg.primary, .sad-dashboard-submit-btn:hover {
  background: #01112f !important;
  color: white !important;
  justify-content: center;
}

html body .sad-dashboard-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #111427;
  padding: 15px 20px;
  border-radius: var(--sad-radius);
  color: #111427;
  background: #fff;
}

html body .sad-btn-sm {
  padding: 8px 15px !important;
  font-size: 13px !important;
  min-width: auto !important;
}


.sad-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--sad-primary-gradient);
  border-radius: var(--sad-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.25rem;
}

.sad-logo-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.sad-logo-text {
  display: flex;
  flex-direction: column;
}

.sad-logo-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--sad-gray-900);
  line-height: 1.2;
}

.sad-logo-subtitle {
  font-size: 0.75rem;
  color: var(--sad-gray-500);
  line-height: 1.2;
}

/* Navigation Block (Right) */
.sad-header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.sad-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sad-nav-link {
  padding: 10px 20px;
  border-radius: var(--sad-radius);
  color: var(--sad-gray-600);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}

.sad-nav-link:hover {
  background: var(--sad-gray-100);
  color: var(--sad-gray-900);
}

.f-prata {
  font-family: "Prata", serif;
}

.sad-line {
  border-width: 1.5px;
  opacity: 1;
  border-color: #dee2e6 !important;
}

.sad-nav-link.active {
  background: var(--sad-primary-light);
  color: var(--sad-primary);
}

.sad-nav-submit {
  background: var(--sad-primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.sad-nav-submit:hover {
  background: var(--sad-primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

/* User Menu */
.sad-header-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sad-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: var(--sad-radius);
  cursor: pointer;
  transition: background 0.2s ease;
}

.sad-user-info:hover {
  background: var(--sad-gray-100);
}

.sad-user-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--sad-gray-200);
}

.sad-user-name {
  font-weight: 500;
  color: var(--sad-gray-700);
  font-size: 0.9375rem;
}

.sad-logout-link {
  color: var(--sad-gray-500);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 8px 12px;
  border-radius: var(--sad-radius);
  transition: all 0.2s ease;
}

.sad-logout-link:hover {
  color: var(--sad-error);
  background: var(--sad-error-bg);
}

/* ============================================
   Dashboard Body (Sidebar + Main)
   ============================================ */
.sad-dashboard-body {
  display: flex;
  padding-top: var(--sad-header-height);
  min-height: 100vh;
}

/* ============================================
   Sidebar - Dark Theme with 4 Sections
   ============================================ */
.sad-sidebar {
  position: fixed;
  top: var(--sad-header-height);
  left: 0;
  width: var(--sad-sidebar-width);
  height: calc(100vh - var(--sad-header-height));
  background: var(--sad-sidebar-bg);
  padding: 24px 16px;
  overflow-y: auto;
  z-index: 90;
}

.sad-sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sad-sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--sad-radius);
  color: var(--sad-sidebar-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  margin-left: -3px;
}

.sad-sidebar-link:hover {
  background: var(--sad-sidebar-bg-hover);
  color: var(--sad-sidebar-text-active);
}

.sad-sidebar-link.active {
  background: rgba(102, 126, 234, 0.15);
  color: var(--sad-sidebar-text-active);
  border-left-color: var(--sad-sidebar-accent);
}

.sad-sidebar-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sad-sidebar-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.sad-sidebar-label {
  flex: 1;
}

.sad-sidebar-count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--sad-sidebar-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--sad-radius-full);
}

.sad-sidebar-link.active .sad-sidebar-count {
  background: var(--sad-sidebar-accent);
  color: #fff;
}

.sad-sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 20px 0;
}

/* Sidebar Submit Button */
.sad-sidebar-submit {
  background: var(--sad-sidebar-accent) !important;
  color: #fff !important;
  margin-top: 8px;
  border-left-color: transparent !important;
}

.sad-sidebar-submit:hover {
  background: var(--sad-primary-dark) !important;
}

/* ============================================
   Main Content
   ============================================ */
.sad-main-content {
  flex: 1;
  margin-left: var(--sad-sidebar-width);
  padding: 32px 40px;
  max-width: calc(100% - var(--sad-sidebar-width));
  background: var(--sad-gray-50);
}

/* ============================================
   Welcome Section (NEW)
   ============================================ */
.sad-welcome-section {
  margin-bottom: 32px;
}

.sad-welcome-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sad-gray-900);
  margin: 0 0 8px 0;
}

.sad-welcome-subtitle {
  color: var(--sad-gray-500);
  font-size: 1rem;
  margin: 0;
}

/* ============================================
   Stats Cards (NEW)
   ============================================ */
.sad-stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.sad-stat-card {
  background: #ffffff;
  border-radius: var(--sad-radius-lg);
  padding: 24px;
  box-shadow: var(--sad-shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  border-left: 4px solid transparent;
}

.sad-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sad-shadow-md);
}

.sad-stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sad-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--sad-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sad-stat-icon svg {
  width: 24px;
  height: 24px;
}

.sad-stat-count {
  font-size: 2rem;
  font-weight: 700;
  color: var(--sad-gray-900);
  line-height: 1;
}

.sad-stat-label {
  font-size: 0.875rem;
  color: var(--sad-gray-500);
  font-weight: 500;
}

/* Stat Card Variants */
.sad-stat-published {
  border-left-color: var(--sad-success);
}

.sad-stat-published .sad-stat-icon {
  background: var(--sad-success-bg);
  color: var(--sad-success);
}

.sad-stat-review {
  border-left-color: var(--sad-info);
}

.sad-stat-review .sad-stat-icon {
  background: var(--sad-info-bg);
  color: var(--sad-info);
}

.sad-stat-draft {
  border-left-color: var(--sad-warning);
}

.sad-stat-draft .sad-stat-icon {
  background: var(--sad-warning-bg);
  color: var(--sad-warning);
}

.sad-stat-pending {
  border-left-color: var(--sad-purple);
}

.sad-stat-pending .sad-stat-icon {
  background: var(--sad-purple-bg);
  color: var(--sad-purple);
}

/* ============================================
   Content Header
   ============================================ */
.sad-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.sad-content-header-left {
  display: flex;
  flex-direction: column;
}

.sad-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sad-gray-900);
  margin: 0 0 4px 0;
}

.sad-page-subtitle {
  color: var(--sad-gray-500);
  margin: 0;
  font-size: 0.9375rem;
}

.sad-content-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================
   Submissions Table
   ============================================ */
.sad-submissions-section {
  background: #ffffff;
  border-radius: var(--sad-radius-lg);
  box-shadow: var(--sad-shadow);
  overflow: hidden;
}

.sad-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--sad-gray-100);
}

.sad-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--sad-gray-900);
  margin: 0;
}

.sad-section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sad-submissions-table-wrapper {
  overflow-x: auto;
}

.sad-submissions-table {
  width: 100%;
  border-collapse: collapse;
}

.sad-submissions-table th,
.sad-submissions-table td {
  padding: 16px 24px;
  text-align: left;
}

.sad-submissions-table th {
  background: var(--sad-gray-50);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--sad-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--sad-gray-100);
}

.sad-submissions-table td {
  border-bottom: 1px solid var(--sad-gray-100);
  color: var(--sad-gray-700);
  font-size: 0.9375rem;
}

.sad-submissions-table tbody tr {
  transition: background 0.15s ease;
}

.sad-submissions-table tbody tr:hover {
  background: var(--sad-gray-50);
}

.sad-submissions-table tbody tr:last-child td {
  border-bottom: none;
}

/* Column widths */
.sad-col-title {
  width: 30%;
}

.sad-col-journal {
  width: 18%;
}

.sad-col-status {
  width: 14%;
}

.sad-col-date {
  width: 14%;
}

.sad-col-updated {
  width: 14%;
}

.sad-col-actions {
  width: 10%;
  text-align: right;
}

/* Title cell */
.sad-title-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sad-title-icon {
  width: 40px;
  height: 40px;
  background: var(--sad-gray-100);
  border-radius: var(--sad-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sad-gray-500);
  flex-shrink: 0;
}

.sad-title-icon svg {
  width: 20px;
  height: 20px;
}

.sad-title-text {
  font-weight: 500;
  color: var(--sad-gray-900);
}

/* ============================================
   Status Badges
   ============================================ */
.sad-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--sad-radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: capitalize;
}

.sad-status-draft {
  background: var(--sad-gray-100);
  color: var(--sad-gray-600);
}

.sad-status-submitted,
.sad-status-pending {
  background: var(--sad-info-bg);
  color: var(--sad-info);
}

.sad-status-under_review,
.sad-status-reviewing,
.sad-status-review {
  background: var(--sad-purple-bg);
  color: var(--sad-purple);
}

.sad-status-revision_requested,
.sad-status-corrections-pending {
  background: var(--sad-warning-bg);
  color: var(--sad-warning);
}

.sad-status-approved,
.sad-status-accepted,
.sad-status-just-accepted {
  background: var(--sad-success-bg);
  color: var(--sad-success);
}

.sad-status-published,
.sad-status-publish {
  background: var(--sad-success-bg);
  color: var(--sad-success);
}

.sad-status-rejected {
  background: var(--sad-error-bg);
  color: var(--sad-error);
}

/* ============================================
   Action Buttons
   ============================================ */
.sad-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--sad-radius);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.sad-btn-primary {
  background: var(--sad-primary);
  color: #fff;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.sad-btn-primary:hover {
  background: var(--sad-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.sad-btn-secondary {
  background: var(--sad-gray-100);
  color: var(--sad-gray-700);
}

.sad-btn-secondary:hover {
  background: var(--sad-gray-200);
  color: var(--sad-gray-900);
}

.sad-btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
}

.sad-action-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--sad-radius);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.sad-action-view {
  background: var(--sad-gray-100);
  color: var(--sad-gray-700);
}

.sad-action-view:hover {
  background: var(--sad-gray-200);
  color: var(--sad-gray-900);
}

.sad-action-resume {
  background: var(--sad-primary);
  color: #fff;
}

.sad-action-resume:hover {
  background: var(--sad-primary-dark);
  color: #fff;
}

/* ============================================
   Empty State
   ============================================ */
.sad-empty-state {
  padding: 80px 32px;
  text-align: center;
}

.sad-empty-icon {
  width: 80px;
  height: 80px;
  background: var(--sad-gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--sad-gray-400);
}

.sad-empty-icon svg {
  width: 40px;
  height: 40px;
}

.sad-empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--sad-gray-900);
  margin: 0 0 8px 0;
}

.sad-empty-state p {
  color: var(--sad-gray-500);
  margin: 0 0 24px 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Responsive Design
   ============================================ */
.sad-drag-handle {
  cursor: grab;
  padding: 8px;
  color: var(--sad-gray-400);
  transition: color 0.2s;
  z-index: 10;
}

.sad-drag-handle:active {
  cursor: grabbing;
}

.sad-drag-handle:hover {
  color: var(--sad-gray-600);
}

.sortable-ghost {
  opacity: 0.4;
  background: var(--sad-gray-100);
}

/* UI Utilities */
.transition-all { transition: all 0.3s ease; }
.hover-shadow-md:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important; transform: translateY(-2px); }
.hover-primary:hover { color: var(--sad-primary) !important; }
.hover-danger:hover i { color: var(--sad-error) !important; }
.bg-light-subtle { background-color: #f8f9fa !important; }
.cursor-pointer { cursor: pointer; }
.hover-border-primary:hover { border-color: var(--sad-primary) !important; }

/* Step 4 Redesign */
.premium-image-upload {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-image-upload:hover {
  border-color: var(--sad-primary) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
}
.image-placeholder {
  border: 2px dashed #e2e8f0;
  transition: all 0.3s ease;
}
.premium-image-upload:hover .image-placeholder {
  border-color: var(--sad-primary);
  background-color: var(--sad-primary-light) !important;
}
.sad-upload-new-version:hover {
  background-color: var(--sad-primary) !important;
  border-color: var(--sad-primary) !important;
}
.sad-upload-new-version:hover i {
  color: white !important;
}
.btn-icon-lg {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn-icon-sm {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

@media (max-width: 1200px) {
  .sad-stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .sad-sidebar {
    width: 80px;
    padding: 24px 12px;
  }

  .sad-sidebar-label,
  .sad-sidebar-count {
    display: none;
  }

  .sad-sidebar-icon {
    width: 100%;
  }

  .sad-sidebar-link {
    justify-content: center;
    padding: 16px;
    border-left: none;
    margin-left: 0;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
  }

  .sad-sidebar-link.active {
    border-left-color: transparent;
    border-bottom-color: var(--sad-sidebar-accent);
  }

  .sad-main-content {
    margin-left: 80px;
    max-width: calc(100% - 80px);
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .sad-header-inner {
    padding: 0 16px;
  }

  .sad-logo-subtitle {
    display: none;
  }

  .sad-header-nav {
    display: none;
  }

  .sad-user-name {
    display: none;
  }

  .sad-sidebar {
    position: fixed;
    left: -100%;
    width: var(--sad-sidebar-width);
    transition: left 0.3s ease;
    z-index: 99;
  }

  .sad-sidebar.open {
    left: 0;
  }

  .sad-sidebar-label,
  .sad-sidebar-count {
    display: inline;
  }

  .sad-main-content {
    margin-left: 0;
    max-width: 100%;
    padding: 20px 16px;
  }

  .sad-stats-cards {
    grid-template-columns: 1fr;
  }

  .sad-content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .sad-submissions-table th,
  .sad-submissions-table td {
    padding: 12px 16px;
  }

  .sad-col-journal,
  .sad-col-updated {
    display: none;
  }
}

/* ============================================
   WordPress Admin Bar Adjustment
   ============================================ */
.admin-bar .sad-header {
  top: 32px;
}

.admin-bar .sad-dashboard-body {
  padding-top: calc(var(--sad-header-height) + 32px);
}

.admin-bar .sad-sidebar {
  top: calc(var(--sad-header-height) + 32px);
  height: calc(100vh - var(--sad-header-height) - 32px);
}

@media (max-width: 782px) {
  .admin-bar .sad-header {
    top: 46px;
  }

  .admin-bar .sad-dashboard-body {
    padding-top: calc(var(--sad-header-height) + 46px);
  }

  .admin-bar .sad-sidebar {
    top: calc(var(--sad-header-height) + 46px);
    height: calc(100vh - var(--sad-header-height) - 46px);
  }
}

/* ============================================
   Status Filter Tabs
   ============================================ */
.sad-status-tabs {
  gap: 4px;
  flex-wrap: wrap;
}

.sad-status-tabs .nav-link {
  color: var(--sad-gray-600);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 8px 16px;
  border-radius: var(--sad-radius-full);
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid transparent;
}

.sad-status-tabs .nav-link:hover {
  background: var(--sad-gray-100);
  color: var(--sad-gray-800);
}

.sad-status-tabs .nav-link.active {
  background: var(--sad-primary);
  color: #fff;
  border-color: var(--sad-primary);
}

.sad-status-tabs .nav-link .badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  font-weight: 600;
}

.sad-status-tabs .nav-link.active .badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #fff;
}

/* ============================================
   Search Box
   ============================================ */
.sad-search-box {
  position: relative;
}

.sad-search-box .form-control {
  border-radius: var(--sad-radius);
  border: 1px solid var(--sad-gray-200);
  padding: 10px 40px 10px 40px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.sad-search-box .form-control:focus {
  border-color: var(--sad-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.sad-search-box .form-control::placeholder {
  color: var(--sad-gray-400);
}

.sad-search-clear {
  opacity: 0.6;
  width: 14px;
  height: 14px;
}

.sad-search-clear:hover {
  opacity: 1;
}

/* ============================================
   Skeleton Loading
   ============================================ */
.sad-skeleton {
  background: linear-gradient(
    90deg,
    var(--sad-gray-100) 25%,
    var(--sad-gray-200) 50%,
    var(--sad-gray-100) 75%
  );
  background-size: 200% 100%;
  animation: sad-skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--sad-radius-sm);
}

@keyframes sad-skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.sad-skeleton-title {
  height: 24px;
  width: 70%;
}

.sad-skeleton-text {
  height: 16px;
  width: 100%;
}

.sad-skeleton-badge {
  height: 28px;
  width: 100px;
  border-radius: var(--sad-radius-full);
}

.sad-skeleton-button {
  height: 40px;
  width: 140px;
  border-radius: var(--sad-radius);
}

.sad-skeleton-card {
  opacity: 0.7;
}

/* ============================================
   Submission Card Animation
   ============================================ */
.sad-submission-card {
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.sad-submission-card.hiding {
  opacity: 0;
  transform: scale(0.98);
}

/* ============================================
   Bootstrap Modal Z-index Fix
   ============================================ */
.modal {
  z-index: 1050 !important;
}

.modal-backdrop {
  z-index: 1040 !important;
  pointer-events: none !important;
}

.modal-dialog {
  z-index: 1055 !important;
  position: relative;
  pointer-events: auto !important;
}

#sad-quick-submit-modal .modal-content {
  position: relative;
  z-index: 1060;
  pointer-events: auto !important;
}

#sad-quick-submit-modal .modal-body {
  position: relative;
  z-index: 1;
}

/* ============================================
   Profile Dropdown
   ============================================ */
.sad-profile-dropdown {
  position: relative;
}

.sad-profile-trigger {
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.sad-profile-trigger:hover {
  background: var(--sad-gray-50);
  border-color: var(--sad-gray-300);
}

.sad-profile-menu {
  display: none;
  opacity: 0;
  transform: translateY(-5px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

/* Show on click (via JS class toggle) */
.sad-profile-dropdown.show .sad-profile-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.sad-profile-menu-item {
  transition: background 0.15s ease;
}

.sad-profile-menu-item:hover {
  background: var(--sad-gray-50);
}

.sad-profile-menu-item.text-danger:hover {
  background: var(--sad-error-bg);
}

/* ============================================
   RESPONSIVE OVERRIDES (Desktop-First)
   Only affects tablet and mobile viewports.
   ============================================ */

/* Tablets (max-width: 992px) */
@media screen and (max-width: 992px) {
  .sad-sidebar {
    left: -100%;
    transition: left 0.3s ease;
    box-shadow: var(--sad-shadow-lg);
  }

  .sad-sidebar.open {
    left: 0;
  }

  .sad-main-content {
    margin-left: 0;
    max-width: 100%;
    padding: 24px;
  }

  html body .sad-dashboard-submit-btn {
    padding: 10px 15px !important;
  }

  html body .sad-nav-tab {
    min-width: 120px !important;
  }

  /* Make header elements more compact */
  .sad-header-logo {
    width: auto !important;
  }
}

/* Mobile (max-width: 768px) */
@media screen and (max-width: 768px) {
  .sad-dashboard-wrapper .container {
    padding: 16px !important;
  }

  .sad-main-content {
    padding: 16px;
  }

  /* Hide the search box inside the list container on mobile */
  .sad-main-content > .sad-search-box {
    display: none;
  }

  .sad-mobile-title h1 {
    line-height: 1.2;
  }

  /* Increase tap targets for mobile */
  .sad-open-quick-submit {
    transition: transform 0.1s active;
  }
  .sad-open-quick-submit:active {
    transform: scale(0.95);
  }

  .sad-welcome-title {
    font-size: 1.25rem;
  }

  .sad-stats-cards {
    grid-template-columns: 1fr;
  }

  /* Hide secondary navigation in header */
  .sad-header-nav {
    display: none;
  }

  /* Stack sidebar info */
  .sad-user-name {
    display: none;
  }
}

/* ============================================
   Unified Status/Nav Tabs
   ============================================ */
.sad-nav-tab-wrapper {
    margin-bottom: 24px;
    border-bottom: none !important;
}

.sad-nav-tabs {
    display: flex;
    gap: 8px;
    padding: 2px;
    min-width: max-content !important;
}

.sad-nav-tab {
  background: #e4e6eb !important;
  border: 1px solid transparent;
  border-bottom: none;
  padding: 0.5rem 1rem;
  font-size: 12px;
  font-weight: 400;
  display: flex;
  justify-content: space-between;
  min-width: 150px;
  color: #50575e;
  cursor: pointer;
  text-decoration: none;
  border-radius: 4px 4px 0 0 !important;
  transition: all 0.2s;
  margin-bottom: -1px;
}

.sad-nav-tab .step-num {
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
}

.sad-nav-tab .sad-step-label {
    color: #111827;
    font-size: 0.9375rem;
    font-weight: 500;
}

.sad-nav-tab .sad-step-status-badge {
    background: #e5e7eb;
    min-width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 6px;
}

.sad-nav-tab .sad-step-status-badge .count-text,
.sad-nav-tab .sad-step-status-badge i {
    font-size: 0.75rem;
    font-weight: 600;
    color: #111827;
}

.sad-nav-tab:hover {
    background: #e5e7eb;
}

.sad-nav-tab.active .sad-step-label {
    color: var(--sad-primary) !important;
}

.sad-nav-tab.active .step-num {
    color: var(--sad-primary) !important;
}

.sad-nav-tab.active .sad-step-status-badge {
    background: #ffffff;
}

.sad-nav-tab.active .sad-step-status-badge .dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.text-12{
  font-size: 12px !important;
}

.sad-header-title-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media screen and (max-width: 576px) {
  .sad-header-title-truncate {
    font-size: 1.25rem !important;
  }
}

@media screen and (max-width: 992px) {
  .sad-nav-tab {
    min-width: 120px !important;
    margin-bottom: 0 !important;
  }
  
  .sad-sidebar-col {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }
  
  .sad-sidebar-box, .sad-sidebar-container {
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    margin-bottom: 1rem;
  }

  .flex-lg-nowrap {
    flex-wrap: wrap !important;
  }
  
  #sad-sidebar-box .nav-link {
    justify-content: start;
    white-space: nowrap;
    padding: 0.75rem 1rem !important;
  }
}

/* Mobile specific styling adjustments */
@media screen and (max-width: 576px) {
  #sad-search-input-mobile {
    background-color: #f8f9fa;
    border: 1.5px solid #dee2e6;
  }

  .sad-mobile-logo-box {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  .container.p-4 {
    padding: 1rem !important;
  }
  
  .sad-step-navigation {
    flex-direction: column-reverse;
    gap: 1rem;
  }
  
  .sad-step-navigation .d-flex {
    width: 100%;
    justify-content: space-between;
  }
  
  .sad-step-navigation .btn {
    width: 100%;
    justify-content: center;
  }
  
  .sad-header-title-truncate {
    font-size: 1.25rem !important;
  }
  
  /* Stack cards that use flex row */
  .sad-author-card, .manuscript-row > .z-1 > .d-flex, .bg-white.rounded-4.p-4.shadow-sm.border.d-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  
  .sad-author-card .d-flex:first-child, .sad-author-card .d-flex:last-child {
    width: 100%;
    justify-content: space-between;
  }
  
  .sad-author-info {
    width: 100%;
  }
  
  .sad-author-badges {
    flex-wrap: wrap;
  }
}

/* Device-specific utility classes */
.sad-hide-mobile {
  display: block;
}
.sad-device-mobile .sad-hide-mobile {
  display: none !important;
}

.sad-show-mobile {
  display: none;
}
.sad-device-mobile .sad-show-mobile {
  display: block !important;
}

/* Fix for long titles in cards */
.author-name {
  display: block;
  word-break: break-word;
}

@media screen and (max-width: 576px) {
  .sad-submission-card {
    padding: 1.5rem !important;
  }
  
  .sad-submission-card .d-flex.justify-content-center,
  .sad-submission-card .d-flex.justify-content-end {
    justify-content: center !important;
    width: 100%;
  }
  
  .sad-submission-card .btn,
  .sad-submission-card .sad-dashboard-submit-btn {
    width: 100% !important;
    min-width: 0 !important;
  }
  
  .sad-submission-card .flex-column.flex-md-row {
    flex-direction: column !important;
  }
  
  .sad-author-badges .sad-author-badge {
    margin-bottom: 0.5rem;
  }
}

/* Ensure images and SVGs are responsive */
.sad-submission-card svg, 
.manuscript-row svg {
  max-width: 100%;
}

/* ============================================
   Global Country Selector Component
   ============================================ */
.country-selector-wrapper {
  position: relative;
}

.country-results-dropdown,
.country-suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1100;
  background: #fff;
  border: 1px solid var(--sad-gray-200);
  border-radius: var(--sad-radius);
  box-shadow: var(--sad-shadow-md);
  max-height: 250px;
  overflow-y: auto;
  margin-top: 4px;
}

.country-selector-mini{
  position: relative !important;
}

.country-item {
  cursor: pointer;
  padding: 10px 16px;
  border-bottom: 1px solid var(--sad-gray-100);
  transition: background 0.15s ease;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sad-gray-700);
}

.country-item:hover {
  background: var(--sad-gray-50);
  color: var(--sad-primary);
}

.country-item:last-child {
  border-bottom: none !important;
}

.country-flag {
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

.country-item-name {
  flex: 1;
}

/* Fix for drawer usage */
#country-search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-top: none;
    background: #fff;
    z-index: 1000;
}
