/* Admin Panel Styles */

.admin-container {
  min-height: 100vh;
  background: var(--light-bg);
}

/* Dashboard Stats */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--borders);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-blue);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--dark-base);
  margin: 0 0 4px 0;
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  color: var(--secondary-text);
  margin: 0;
  font-weight: 500;
}

/* Dashboard Actions */
.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.action-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--borders);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-blue);
  text-decoration: none;
  color: inherit;
}

.action-card i {
  font-size: 32px;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.action-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-base);
  margin: 0;
}

.action-card p {
  font-size: 14px;
  color: var(--secondary-text);
  margin: 0;
}

@media (max-width: 768px) {
  .dashboard-stats,
  .dashboard-actions {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-value {
    font-size: 28px;
  }
}

/* Login Screen */
.admin-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: var(--white);
  padding: 48px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
}

.login-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--dark-base);
  margin-bottom: 8px;
  text-align: center;
}

.login-subtitle {
  font-size: 16px;
  color: var(--secondary-text);
  margin-bottom: 32px;
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.login-form .form-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-base);
}

.login-form .form-input {
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--primary-text);
  background: var(--white);
  border: 2px solid var(--borders);
  border-radius: 8px;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.login-form .form-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-form .form-input::placeholder {
  color: var(--muted-text);
  opacity: 0.7;
}

.login-message {
  margin-top: 8px;
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.success-message {
  background: rgba(34, 197, 94, 0.1);
  color: #16A34A;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Admin Dashboard */
.admin-dashboard {
  min-height: 100vh;
}

.admin-header {
  background: var(--white);
  border-bottom: 1px solid var(--borders);
  padding: 24px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark-base);
}

.admin-header-actions {
  display: flex;
  gap: 12px;
}

.admin-main {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
}

/* Posts List View */
.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-section-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--dark-base);
}

.admin-filter {
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  background: var(--white);
  border: 2px solid var(--borders);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--secondary-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.filter-btn.active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: var(--white);
}

.posts-table-container {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--borders);
  overflow: hidden;
}

.posts-table {
  width: 100%;
  border-collapse: collapse;
}

.posts-table thead {
  background: var(--light-bg);
}

.posts-table th {
  padding: 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-base);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.posts-table td {
  padding: 16px;
  border-top: 1px solid var(--borders);
  font-size: 15px;
  color: var(--primary-text);
}

.posts-table tbody tr:hover {
  background: var(--light-bg);
}

.posts-table code {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-blue);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-family: monospace;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.published {
  background: rgba(34, 197, 94, 0.1);
  color: #16A34A;
}

.status-badge.draft {
  background: rgba(251, 191, 36, 0.1);
  color: #D97706;
}

.status-badge.status-pending {
  background: rgba(251, 191, 36, 0.1);
  color: #D97706;
}

.status-badge.status-in-progress {
  background: rgba(37, 99, 235, 0.1);
  color: #2563EB;
}

.status-badge.status-completed {
  background: rgba(34, 197, 94, 0.1);
  color: #16A34A;
}

.status-badge.status-cancelled {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
}

.status-badge.status-on-hold {
  background: rgba(107, 114, 128, 0.1);
  color: #6B7280;
}

.priority-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.priority-badge.priority-low {
  background: rgba(99, 102, 241, 0.1);
  color: #6366F1;
}

.priority-badge.priority-medium {
  background: rgba(37, 99, 235, 0.1);
  color: #2563EB;
}

.priority-badge.priority-high {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
}

.priority-badge.priority-urgent {
  background: rgba(220, 38, 38, 0.1);
  color: #DC2626;
  font-weight: 600;
}

/* Tab Navigation */
.section-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--borders);
  margin-bottom: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
  background: var(--white);
  padding: 0 4px;
  border-radius: 8px 8px 0 0;
}

.section-tab {
  padding: 14px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  font-weight: 500;
  color: var(--secondary-text);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  bottom: -2px;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: 8px 8px 0 0;
}

.section-tab i {
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.section-tab:hover {
  color: var(--primary-blue);
  background: rgba(37, 99, 235, 0.05);
}

.section-tab:hover i {
  opacity: 1;
}

.section-tab.active {
  color: var(--primary-blue);
  border-bottom-color: var(--primary-blue);
  font-weight: 600;
  background: rgba(37, 99, 235, 0.05);
}

.section-tab.active i {
  opacity: 1;
}

.tab-content {
  display: none;
  animation: fadeIn 0.2s ease-in;
}

.tab-content.active {
  display: block;
}

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

/* Tab content spacing */
.tab-content {
  padding-top: 8px;
}

.tab-content .section-header {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0;
  border-bottom: none;
}

.tab-content .section-header h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--dark-base);
  margin: 0;
}

.tab-content .admin-posts-list {
  margin-top: 0;
}

.tab-content .admin-post-editor {
  margin-top: 0;
}

/* Ensure tab content sections have proper background */
.tab-content > .admin-posts-list {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--borders);
  padding: 0;
  overflow: hidden;
}

.tab-content > .admin-post-editor {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--borders);
  padding: 24px;
}

/* Tab content wrapper for better spacing */
.tab-content > div:first-child {
  margin-top: 0;
}

/* Tab content section headers inside tabs */
.tab-content .section-header {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 20px;
}

.tab-content .section-header h2.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark-base);
  margin: 0;
  padding: 0;
}

/* Ensure buttons in tab headers are properly styled */
.tab-content .section-header .btn {
  white-space: nowrap;
}

/* Project Management Styles */
.pm-view-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--borders);
}

.view-toggle-btn {
  padding: 10px 20px;
  background: var(--white);
  border: 2px solid var(--borders);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--secondary-text);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-toggle-btn:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.view-toggle-btn.active {
  background: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
}

.pm-view {
  animation: fadeIn 0.3s ease-out;
}

/* Projects Grid (List View) */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.pm-project-card {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--borders);
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pm-project-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.pm-project-header {
  margin-bottom: 16px;
}

.pm-project-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.pm-project-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-base);
  margin: 0;
  flex: 1;
}

.pm-project-client {
  font-size: 14px;
  color: var(--secondary-text);
  margin: 0;
}

.pm-project-body {
  margin-bottom: 16px;
}

.pm-project-progress {
  margin-bottom: 16px;
}

.pm-progress-text {
  font-size: 12px;
  color: var(--secondary-text);
  margin-top: 4px;
  display: block;
}

.pm-project-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.pm-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--secondary-text);
}

.pm-meta-item i {
  color: var(--primary-blue);
}

.pm-project-footer {
  padding-top: 16px;
  border-top: 1px solid var(--borders);
}

.pm-project-dates {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted-text);
}

.pm-project-dates span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Board View (Kanban) */
.pm-board-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 20px 0;
  margin-top: 24px;
}

.pm-board-column {
  min-width: 300px;
  background: var(--light-bg);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--borders);
}

.pm-board-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--borders);
}

.pm-board-column-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-base);
  margin: 0;
}

.pm-board-count {
  background: var(--primary-blue);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.pm-board-column-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}

.pm-board-card {
  background: var(--white);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--borders);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pm-board-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.pm-board-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-base);
  margin: 0 0 8px 0;
}

.pm-board-client {
  font-size: 13px;
  color: var(--secondary-text);
  margin-bottom: 8px;
}

.pm-board-progress {
  margin-top: 8px;
}

/* Timeline View */
.pm-timeline-container {
  margin-top: 24px;
}

.pm-timeline-list {
  position: relative;
  padding-left: 40px;
}

.pm-timeline-list::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--borders);
}

.pm-timeline-item {
  position: relative;
  margin-bottom: 32px;
  cursor: pointer;
}

.pm-timeline-dot {
  position: absolute;
  left: -33px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-blue);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--borders);
}

.pm-timeline-content {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--borders);
  padding: 20px;
  transition: all 0.2s ease;
}

.pm-timeline-content:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pm-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.pm-timeline-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-base);
  margin: 0;
}

.pm-timeline-client {
  font-size: 14px;
  color: var(--secondary-text);
  margin-bottom: 12px;
}

.pm-timeline-dates {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted-text);
  margin-bottom: 12px;
}

.pm-timeline-dates span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pm-timeline-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pm-timeline-progress .progress-bar {
  flex: 1;
}

.pm-timeline-progress span {
  font-size: 12px;
  color: var(--secondary-text);
  min-width: 40px;
}

/* Project Detail Modal */
.pm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pm-modal-content {
  background: var(--white);
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.pm-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--borders);
}

.pm-modal-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--dark-base);
  margin: 0;
}

.pm-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--secondary-text);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.pm-modal-close:hover {
  background: var(--light-bg);
  color: var(--dark-base);
}

.pm-modal-body {
  padding: 24px;
}

.pm-project-detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pm-detail-section {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--borders);
}

.pm-detail-section:last-child {
  border-bottom: none;
}

.pm-detail-section h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark-base);
  margin: 0 0 20px 0;
}

.pm-detail-progress {
  margin-top: 16px;
}

.pm-detail-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 24px;
  border-top: 1px solid var(--borders);
}

.pm-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--white);
  border-radius: 12px;
  border: 2px dashed var(--borders);
}

.pm-empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark-base);
  margin: 0 0 8px 0;
}

.pm-empty-state p {
  font-size: 14px;
  color: var(--secondary-text);
  margin: 0 0 24px 0;
}

/* CRM Pipeline Styles */
.crm-pipeline-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 20px 0;
  margin-bottom: 32px;
}

.crm-pipeline-column {
  min-width: 280px;
  background: var(--light-bg);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--borders);
}

.crm-pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--borders);
}

.crm-pipeline-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-base);
  margin: 0;
}

.crm-pipeline-count {
  background: var(--primary-blue);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.crm-pipeline-deals {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}

.crm-deal-card {
  background: var(--white);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--borders);
  cursor: pointer;
  transition: all 0.2s ease;
}

.crm-deal-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.crm-deal-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-base);
  margin: 0 0 8px 0;
}

.crm-deal-card .deal-client {
  font-size: 13px;
  color: var(--secondary-text);
  margin-bottom: 8px;
}

.crm-deal-card .deal-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.crm-deal-card .deal-probability {
  font-size: 12px;
  color: var(--secondary-text);
  margin-bottom: 8px;
}

.crm-deal-card .deal-date {
  font-size: 12px;
  color: var(--muted-text);
}

.crm-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--secondary-text);
  font-size: 14px;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--light-bg);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-blue), #3B82F6);
  transition: width 0.3s ease;
}

/* Responsive tabs */
@media (max-width: 768px) {
  .section-tabs {
    gap: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 2px;
  }
  
  .section-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .section-tab {
    padding: 12px 16px;
    font-size: 14px;
    flex-shrink: 0;
  }
  
  .section-tab i {
    font-size: 13px;
  }
  
  .section-tab span {
    display: none;
  }
  
  .section-tab.active span {
    display: inline;
  }
  
  .tab-content .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .tab-content .section-header > div {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .tab-content .section-header .btn {
    width: 100%;
  }
}

.actions-cell {
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 14px;
}

.action-btn.edit-btn {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-blue);
}

.action-btn.edit-btn:hover {
  background: var(--primary-blue);
  color: var(--white);
}

.action-btn.delete-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
}

.action-btn.delete-btn:hover {
  background: #DC2626;
  color: var(--white);
}

/* Post Editor */
.admin-post-editor {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--borders);
  padding: 32px;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--borders);
  flex-wrap: wrap;
  gap: 16px;
}

.editor-actions {
  display: flex;
  gap: 12px;
}

.form-section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark-base);
  margin-top: 40px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--borders);
}

.form-section-title:first-of-type {
  margin-top: 0;
}

.post-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-group-large {
  grid-column: 1 / -1;
}

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

.form-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-base);
}

.form-input {
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--primary-text);
  background: var(--white);
  border: 2px solid var(--borders);
  border-radius: 8px;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
  color: var(--muted-text);
  opacity: 0.7;
}

.form-input:disabled {
  background: var(--light-bg);
  cursor: not-allowed;
  opacity: 0.6;
}

.form-input:invalid:not(:placeholder-shown) {
  border-color: #EF4444;
}

.form-input:valid:not(:placeholder-shown):not(:focus) {
  border-color: #10B981;
}

/* File input styling */
input[type="file"] {
  display: none;
}

/* Number input styling */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232563EB' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
  font-family: inherit;
  line-height: 1.6;
}

.form-textarea.form-input {
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.form-help {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted-text);
  line-height: 1.5;
}

.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  color: var(--primary-text);
  user-select: none;
}

.form-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-blue);
}

.editor-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  background: var(--light-bg);
  border-radius: 8px;
}

.toolbar-btn {
  padding: 6px 12px;
  background: var(--white);
  border: 1px solid var(--borders);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.toolbar-btn:hover {
  background: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
}

.form-textarea {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
}

.editor-preview {
  margin-top: 24px;
  padding: 24px;
  background: var(--light-bg);
  border-radius: 8px;
  border: 1px solid var(--borders);
}

.editor-preview h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-base);
  margin-bottom: 16px;
}

#previewContent {
  font-size: 15px;
  line-height: 1.7;
  color: var(--primary-text);
}

/* Content Editor Cards */
.content-editor-card {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--borders);
  padding: 32px;
  margin-bottom: 32px;
}

.content-editor-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--dark-base);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--borders);
}

.social-link-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .admin-header-actions {
    width: 100%;
    flex-direction: column;
  }

  .admin-header-actions .btn {
    width: 100%;
  }

  .posts-table-container {
    overflow-x: auto;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .editor-header {
    flex-direction: column;
    align-items: stretch;
  }

  .editor-actions {
    width: 100%;
    flex-direction: column;
  }

  .editor-actions .btn {
    width: 100%;
  }
}

