/* ================================================
   HOAPostAds Dashboard Styles
   Consistent with landing page design system
   ================================================ */

:root {
  /* Colors - matching landing page */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --accent-dark: #0891b2;
  
  /* Dark theme */
  --dark: #0f172a;
  --dark-lighter: #1e293b;
  --dark-card: #1e293b;
  
  /* Neutrals */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Status colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;
  
  /* Gradients */
  --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
  
  /* Sizing */
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  
  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ================================================
   Base Styles
   ================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background: var(--gray-100);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
}

/* ================================================
   Screen Management
   ================================================ */

.screen {
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: block;
}

#dashboard-screen.active {
  display: flex;
}

/* ================================================
   Login Screen
   ================================================ */

#login-screen {
  background: var(--dark);
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.login-bg-shape {
  position: absolute;
  width: 600px;
  height: 600px;
  background: var(--gradient);
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  top: -200px;
  right: -200px;
}

.login-bg-shape.shape-2 {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  top: auto;
  right: auto;
  bottom: -200px;
  left: -200px;
  width: 500px;
  height: 500px;
}

.login-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--gray-500);
  font-size: 0.95rem;
}

.login-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--gray-100);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.login-tab {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-500);
  transition: all 0.2s ease;
}

.login-tab:hover {
  color: var(--gray-700);
}

.login-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.forgot-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.login-footer a {
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.9rem;
}

.login-footer a:hover {
  color: var(--primary);
}

/* ================================================
   Forms
   ================================================ */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-group .optional {
  font-weight: 400;
  color: var(--gray-400);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--gray-900);
  transition: all 0.2s ease;
  background: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-400);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ================================================
   Buttons
   ================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-accent:hover {
  background: var(--accent-dark);
}

.btn-accent:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
}

.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ================================================
   Mobile Menu Toggle
   ================================================ */

.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  width: 44px;
  height: 44px;
  background: var(--dark);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: background 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: var(--dark-lighter);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .sidebar-overlay {
    display: block;
    pointer-events: none;
  }
  
  .sidebar-overlay.active {
    pointer-events: auto;
  }
}

/* ================================================
   Sidebar
   ================================================ */

.sidebar {
  width: var(--sidebar-width);
  background: var(--dark);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-org {
  font-size: 0.875rem;
  color: var(--gray-400);
  margin-top: 0.25rem;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  color: var(--gray-400);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.nav-item.active {
  background: var(--gradient-glow);
  color: white;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.nav-item svg {
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .btn-ghost {
  color: var(--gray-400);
}

.sidebar-footer .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

/* ================================================
   Main Content
   ================================================ */

.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--gray-100);
}

.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* ================================================
   Views
   ================================================ */

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-header {
  margin-bottom: 2rem;
}

.view-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.view-header p {
  color: var(--gray-500);
}

/* ================================================
   Stats Grid
   ================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.blue {
  background: var(--info-light);
  color: var(--info);
}

.stat-icon.green {
  background: var(--success-light);
  color: var(--success);
}

.stat-icon.purple {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.stat-icon.orange {
  background: var(--warning-light);
  color: var(--warning);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ================================================
   Cards
   ================================================ */

.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  margin-bottom: 1.5rem;
}

.card.hidden {
  display: none;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.card-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.card-body {
  padding: 1.5rem;
}

.card-body.no-padding {
  padding: 0;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================================================
   Quick Actions
   ================================================ */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
}

.action-card:hover {
  background: white;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.action-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-glow);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

/* ================================================
   Empty State
   ================================================ */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-400);
}

.empty-state svg {
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 1rem;
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}

.empty-state span {
  font-size: 0.875rem;
}

/* ================================================
   Rich Editor
   ================================================ */

.editor-toolbar {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.editor-toolbar button {
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.875rem;
  color: var(--gray-600);
  transition: all 0.15s ease;
}

.editor-toolbar button:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

.toolbar-divider {
  width: 1px;
  background: var(--gray-200);
  margin: 0 0.25rem;
}

.rich-editor {
  min-height: 300px;
  padding: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: white;
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
}

.rich-editor:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ================================================
   Media Attachments Section
   ================================================ */

/* ================================================
   Content Blocks Section
   ================================================ */

.blocks-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.blocks-header {
  margin-bottom: 1rem;
}

.blocks-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}

.blocks-hint {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.block-type-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.block-type-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--gray-300);
  background: white;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s ease;
}

.block-type-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.block-type-btn svg {
  width: 16px;
  height: 16px;
}

.blocks-container {
  min-height: 100px;
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
}

.blocks-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--gray-400);
  text-align: center;
}

.blocks-empty svg {
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.blocks-empty p {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.blocks-empty span {
  font-size: 0.8rem;
}

/* Individual Block Styles */
.content-block {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.content-block:hover {
  box-shadow: var(--shadow-sm);
}

.content-block.dragging {
  opacity: 0.5;
  box-shadow: var(--shadow-lg);
}

.block-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  cursor: grab;
}

.block-header:active {
  cursor: grabbing;
}

.block-drag-handle {
  color: var(--gray-400);
  display: flex;
}

.block-type-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.block-type-icon.announcement { background: linear-gradient(135deg, #818cf8, #6366f1); color: white; }
.block-type-icon.event { background: linear-gradient(135deg, #34d399, #10b981); color: white; }
.block-type-icon.alert { background: linear-gradient(135deg, #f87171, #ef4444); color: white; }
.block-type-icon.financial { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; }
.block-type-icon.contact { background: linear-gradient(135deg, #60a5fa, #3b82f6); color: white; }
.block-type-icon.poll { background: linear-gradient(135deg, #a78bfa, #8b5cf6); color: white; }
.block-type-icon.gallery { background: linear-gradient(135deg, #f472b6, #ec4899); color: white; }

.block-type-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gray-500);
  flex: 1;
}

.block-actions {
  display: flex;
  gap: 0.25rem;
}

.block-action-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--gray-400);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.block-action-btn:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.block-action-btn.delete:hover {
  background: #fef2f2;
  color: var(--danger);
}

.block-content {
  padding: 1rem;
}

.block-title-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.block-title-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.block-body-input {
  width: 100%;
  min-height: 80px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  resize: vertical;
  font-family: inherit;
}

.block-body-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Event Block Specific */
.block-event-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.block-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.block-field label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-600);
}

.block-field input,
.block-field select {
  padding: 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.block-field.full-width {
  grid-column: span 2;
}

/* Alert Block Priority */
.alert-priority-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.priority-option {
  flex: 1;
  padding: 0.5rem;
  text-align: center;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.priority-option:hover {
  border-color: var(--gray-300);
}

.priority-option.urgent {
  color: var(--danger);
}

.priority-option.urgent.active {
  background: #fef2f2;
  border-color: var(--danger);
}

.priority-option.important {
  color: var(--warning);
}

.priority-option.important.active {
  background: #fffbeb;
  border-color: var(--warning);
}

.priority-option.info {
  color: var(--info);
}

.priority-option.info.active {
  background: #eff6ff;
  border-color: var(--info);
}

/* Poll Options */
.poll-options {
  margin-top: 0.75rem;
}

.poll-option-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.poll-option-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.remove-option-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  color: var(--gray-500);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.remove-option-btn:hover {
  background: #fef2f2;
  color: var(--danger);
}

.add-option-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px dashed var(--gray-300);
  background: transparent;
  color: var(--gray-500);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.add-option-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Contact List */
.contact-list {
  margin-top: 0.75rem;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.contact-input {
  padding: 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

/* Financial Block */
.financial-block {
  margin-top: 0.75rem;
}

.financial-items {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

/* Professional Budget Breakdown Styling */
.budget-breakdown {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.budget-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.budget-header svg {
  opacity: 0.9;
}

.financial-header-row {
  display: grid;
  grid-template-columns: 180px 1fr 100px 120px 32px;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #f8f9fa;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #495057;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #dee2e6;
}

.financial-row {
  display: grid;
  grid-template-columns: 180px 1fr 100px 120px 32px;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #e9ecef;
  align-items: center;
  background: white;
  transition: background 0.15s ease;
}

.financial-row:hover {
  background: #f8f9fa;
}

.financial-row[data-type="income"] {
  border-left: 3px solid #28a745;
}

.financial-row[data-type="expense"] {
  border-left: 3px solid #dc3545;
}

.financial-row[data-type="due"] {
  border-left: 3px solid #ffc107;
}

.financial-row[data-type="paid"] {
  border-left: 3px solid #17a2b8;
}

/* Professional Dropdown Styling */
.financial-preset {
  padding: 0.45rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.8rem;
  background: #ffffff;
  color: #212529;
  cursor: pointer;
  width: 100%;
  font-weight: 500;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23495057' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

.financial-preset:hover {
  border-color: #1e3a5f;
  box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.1);
}

.financial-preset:focus {
  outline: none;
  border-color: #1e3a5f;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.15);
}

.financial-preset optgroup {
  font-weight: 700;
  color: #1e3a5f;
  background: #f8f9fa;
  padding: 8px 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.financial-preset option {
  font-weight: 400;
  color: #212529;
  background: #ffffff;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.financial-desc {
  padding: 0.45rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.85rem;
  background: #ffffff;
  color: #212529;
}

.financial-desc:focus {
  outline: none;
  border-color: #1e3a5f;
  box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.1);
}

.financial-type {
  padding: 0.45rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.8rem;
  background: #ffffff;
  color: #212529;
  font-weight: 500;
}

.financial-amount-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 10px;
  color: #6c757d;
  font-size: 0.85rem;
  font-weight: 600;
}

.financial-amount {
  padding: 0.45rem 0.5rem 0.45rem 1.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 100%;
  text-align: right;
  font-weight: 600;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  background: #ffffff;
  color: #212529;
}

.financial-amount:focus {
  outline: none;
  border-color: #1e3a5f;
  box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.1);
}

.financial-amount::-webkit-inner-spin-button,
.financial-amount::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Budget Summary Section */
.budget-summary {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 2px solid #dee2e6;
  padding: 1rem;
  margin-top: 0.5rem;
}

.budget-summary-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #1e3a5f;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.budget-breakdown-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.budget-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.budget-line.income {
  background: rgba(40, 167, 69, 0.1);
  border-left: 3px solid #28a745;
}

.budget-line.expense {
  background: rgba(220, 53, 69, 0.1);
  border-left: 3px solid #dc3545;
}

.budget-line.due {
  background: rgba(255, 193, 7, 0.1);
  border-left: 3px solid #ffc107;
}

.budget-line.paid {
  background: rgba(23, 162, 184, 0.1);
  border-left: 3px solid #17a2b8;
}

.budget-line.net {
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-top: 2px solid #dee2e6;
  background: white;
  font-size: 0.95rem;
}

.budget-line.net.positive {
  border-left: 4px solid #28a745;
}

.budget-line.net.negative {
  border-left: 4px solid #dc3545;
}

.budget-label {
  color: #495057;
}

.budget-value {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-weight: 600;
}

.budget-line.income .budget-value {
  color: #28a745;
}

.budget-line.expense .budget-value {
  color: #dc3545;
}

.budget-line.due .budget-value {
  color: #856404;
}

.budget-line.paid .budget-value {
  color: #0c5460;
}

.budget-line.net.positive .budget-value {
  color: #28a745;
}

.budget-line.net.negative .budget-value {
  color: #dc3545;
}

.financial-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.total-amount {
  font-size: 1.1rem;
}

.total-amount.positive {
  color: var(--success);
}

.total-amount.negative {
  color: var(--danger);
}

.financial-options {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  align-items: end;
}

.financial-option {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.financial-option label {
  font-size: 0.7rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.financial-option.checkbox {
  flex-direction: row;
  align-items: center;
}

.financial-option.checkbox label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--gray-700);
}

.financial-due-date,
.financial-payment-link {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

/* Gallery Block */
.gallery-block {
  margin-top: 0.75rem;
}

.gallery-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--gray-100);
}

.gallery-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.gallery-item .gallery-caption {
  width: 100%;
  padding: 0.35rem;
  font-size: 0.7rem;
  border: none;
  border-top: 1px solid var(--gray-200);
  background: white;
}

.gallery-item .gallery-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-item:hover .gallery-remove-btn {
  opacity: 1;
}

.gallery-upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--gray-50);
}

.gallery-upload-area:hover {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.05);
}

.gallery-upload-area svg {
  color: var(--gray-400);
  margin-bottom: 0.5rem;
}

.gallery-upload-area p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-600);
}

.gallery-upload-area span {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.gallery-file-input {
  display: none;
}

/* Poster Block */
.poster-block {
  margin-top: 0.75rem;
}

.poster-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.poster-tool-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.poster-tool-group label {
  font-size: 0.7rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.poster-color {
  width: 32px;
  height: 32px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
}

.poster-select {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  background: white;
}

.poster-align-btns {
  display: flex;
  gap: 2px;
  background: var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.poster-align-btn {
  padding: 0.35rem;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 3px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
}

.poster-align-btn:hover {
  color: var(--gray-700);
}

.poster-align-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.poster-preview {
  position: relative;
  min-height: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.poster-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.poster-content-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
}

.poster-title-preview {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.poster-text-preview {
  opacity: 0.9;
}

.poster-content-overlay.font-small .poster-title-preview {
  font-size: 1.2rem;
}
.poster-content-overlay.font-small .poster-text-preview {
  font-size: 0.85rem;
}

.poster-content-overlay.font-medium .poster-title-preview {
  font-size: 1.5rem;
}
.poster-content-overlay.font-medium .poster-text-preview {
  font-size: 1rem;
}

.poster-content-overlay.font-large .poster-title-preview {
  font-size: 2rem;
}
.poster-content-overlay.font-large .poster-text-preview {
  font-size: 1.1rem;
}

.poster-content-overlay.font-xlarge .poster-title-preview {
  font-size: 2.5rem;
}
.poster-content-overlay.font-xlarge .poster-text-preview {
  font-size: 1.25rem;
}

.poster-image-upload {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.poster-upload-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.poster-upload-btn:hover {
  background: var(--gray-200);
}

.poster-remove-bg {
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--gray-500);
  cursor: pointer;
}

.poster-remove-bg:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.poster-file-input {
  display: none;
}

/* Block type icon colors */
.block-type-icon.poster {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

/* Mobile Responsiveness for Blocks */
@media (max-width: 768px) {
  .block-type-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  
  .block-event-fields {
    grid-template-columns: 1fr;
  }
  
  .block-field.full-width {
    grid-column: span 1;
  }
  
  .contact-row {
    grid-template-columns: 1fr;
  }
  
  .gallery-images {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .poster-toolbar {
    gap: 0.75rem;
  }
  
  .poster-content-overlay.font-xlarge .poster-title-preview {
    font-size: 1.8rem;
  }
  
  /* Mobile Budget Breakdown */
  .budget-header {
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
  }
  
  .financial-header-row {
    display: none;
  }
  
  .financial-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
  }
  
  .financial-preset {
    font-size: 0.8rem;
    padding: 0.5rem;
  }
  
  .financial-desc {
    font-weight: 500;
    font-size: 0.9rem;
  }
  
  .financial-type {
    width: 100%;
  }
  
  .financial-amount-wrap {
    width: 100%;
  }
  
  .financial-amount {
    font-size: 1rem;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  }
  
  .budget-summary {
    padding: 0.75rem;
  }
  
  .budget-line {
    font-size: 0.8rem;
  }
  
  .budget-line.net {
    font-size: 0.9rem;
  }
  
  .financial-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .block-type-buttons {
    grid-template-columns: 1fr;
  }
  
  .block-type-btn {
    justify-content: center;
  }
}

/* ================================================
   Media Attachments Styling
   ================================================ */

.media-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.media-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1.25rem;
}

.media-section-title svg {
  color: var(--primary);
}

.media-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.media-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.media-card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
}

.media-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
}

.media-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.media-card-icon.images {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  color: white;
}

.media-card-icon.audio {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: white;
}

.media-card-icon.pdf {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: white;
}

.media-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.media-card-label {
  font-weight: 600;
  color: var(--gray-800);
  font-size: 0.95rem;
}

.media-card-hint {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.media-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.media-add-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.media-add-btn svg {
  width: 16px;
  height: 16px;
}

/* ================================================
   Image Grid
   ================================================ */

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.image-grid:empty {
  display: none;
}

.image-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-100);
  box-shadow: var(--shadow);
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.image-item:hover img {
  transform: scale(1.05);
}

.image-item .remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.image-item:hover .remove-btn {
  opacity: 1;
}

.image-item .remove-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* Media Preview (Audio/PDF) */
.media-preview {
  padding: 0;
}

.media-preview:empty {
  display: none;
}

.media-preview-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: white;
  border-top: 1px solid var(--gray-100);
}

.media-preview-item audio {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-sm);
}

.media-preview-item .media-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
}

.media-preview-item .media-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.media-preview-item .media-icon.audio-icon {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.media-preview-item .media-icon.pdf-icon {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
}

/* ================================================
   PDFs Gallery (Multiple PDFs with Titles)
   ================================================ */

.pdfs-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.pdf-item {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.15s ease;
}

.pdf-item:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
}

.pdf-item-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  gap: 0.75rem;
  background: linear-gradient(135deg, #fef7f7 0%, #fef2f2 100%);
}

.pdf-item-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pdf-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pdf-title-input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-800);
  background: white;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pdf-title-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.pdf-title-input::placeholder {
  color: var(--gray-400);
  font-weight: 400;
}

.pdf-filename {
  font-size: 0.75rem;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-item-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.pdf-item-actions .pdf-action-btn {
  padding: 0.5rem;
  min-width: 34px;
  justify-content: center;
}

/* ================================================
   PDF Viewer Styles
   ================================================ */

.pdf-preview-container {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  margin-top: 0.5rem;
}

.pdf-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid var(--gray-200);
  gap: 1rem;
  flex-wrap: wrap;
}

.pdf-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.pdf-info .media-icon.pdf-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pdf-name {
  font-weight: 600;
  color: var(--gray-800);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pdf-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.pdf-action-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-900);
}

.pdf-action-btn.danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.pdf-viewer-container {
  border-top: 1px solid var(--gray-200);
}

.pdf-viewer-iframe {
  width: 100%;
  height: 500px;
  border: none;
  display: block;
}

/* PDF Attachment Card in Preview */
.pdf-attachment-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1.5rem;
}

.pdf-attachment-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-bottom: 1px solid #fecaca;
}

.pdf-attachment-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pdf-attachment-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.pdf-attachment-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #b91c1c;
}

.pdf-attachment-name {
  font-weight: 600;
  color: var(--gray-800);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-attachment-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.pdf-preview-btn,
.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.pdf-preview-btn {
  background: var(--primary);
  color: white;
  border: none;
}

.pdf-preview-btn:hover {
  background: var(--primary-dark);
}

.pdf-download-btn {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.pdf-download-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-900);
}

.preview-pdf-viewer {
  border-top: 1px solid var(--gray-200);
}

.preview-pdf-iframe {
  width: 100%;
  height: 600px;
  border: none;
  display: block;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .pdf-preview-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .pdf-actions {
    width: 100%;
    justify-content: flex-start;
  }
  
  .pdf-action-btn span {
    display: none;
  }
  
  .pdf-viewer-iframe,
  .preview-pdf-iframe {
    height: 400px;
  }
  
  .pdf-attachment-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .pdf-preview-btn,
  .pdf-download-btn {
    width: 100%;
    justify-content: center;
  }
}

.media-preview-item .media-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.media-preview-item .media-name {
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

a.media-name {
  color: var(--primary);
}

a.media-name:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.media-preview-item audio {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-sm);
  max-width: 300px;
}

.media-preview-item .remove-media-btn {
  padding: 0.625rem;
  background: var(--gray-100);
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-preview-item .remove-media-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* ================================================
   Data Table
   ================================================ */

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

.data-table th {
  background: var(--gray-50);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
}

.data-table td {
  font-size: 0.9rem;
  color: var(--gray-700);
}

.data-table tbody tr:hover {
  background: var(--gray-50);
}

.data-table .actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.data-table .badge {
  display: inline-flex;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

/* ================================================
   Search Box
   ================================================ */

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  flex: 1;
  max-width: 300px;
}

.search-box svg {
  color: var(--gray-400);
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
}

.search-box input::placeholder {
  color: var(--gray-400);
}

/* ================================================
   Pagination
   ================================================ */

.pagination {
  display: flex;
  gap: 0.25rem;
}

.pagination button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--gray-200);
  background: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.875rem;
  color: var(--gray-600);
  transition: all 0.15s ease;
}

.pagination button:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.pagination button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ================================================
   Mini Stats
   ================================================ */

.mini-stats {
  display: flex;
  gap: 2rem;
}

.mini-stat {
  text-align: center;
}

.mini-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.mini-stat-label {
  font-size: 0.8rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ================================================
   Logo Upload
   ================================================ */

.logo-upload {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-preview {
  width: 80px;
  height: 80px;
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  overflow: hidden;
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================================================
   Modal
   ================================================ */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 420px;
  margin: 1rem;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  color: var(--gray-400);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-600);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Preview Modal */
.modal-preview {
  max-width: 900px;
  max-height: 90vh;
  padding: 0;
  overflow: hidden;
}

/* Confirm Modal */
.modal-confirm {
  max-width: 440px;
  text-align: center;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-confirm .modal-header {
  padding: 2rem 2rem 0;
  border-bottom: none;
  justify-content: center;
}

.modal-confirm .modal-header h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
}

.confirm-modal-body {
  padding: 1.5rem 2.5rem 2rem;
}

.confirm-modal-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #d97706;
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.2);
}

.confirm-modal-icon.danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.2);
}

.confirm-modal-icon.info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #2563eb;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.confirm-modal-icon.success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #059669;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.2);
}

.confirm-modal-icon svg {
  width: 32px;
  height: 32px;
}

.confirm-modal-body p {
  color: var(--gray-600);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

.modal-confirm .modal-actions {
  padding: 0.5rem 2rem 2rem;
  gap: 12px;
  justify-content: center;
}

.modal-confirm .btn {
  min-width: 120px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.modal-confirm .btn:hover {
  transform: translateY(-1px);
}

/* Prompt Modal */
.modal-prompt {
  max-width: 480px;
  text-align: center;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-prompt .modal-header {
  padding: 2rem 2rem 0;
  border-bottom: none;
  justify-content: center;
}

.modal-prompt .modal-header h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
}

.prompt-modal-body {
  padding: 1.5rem 2.5rem 2rem;
}

.prompt-modal-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #2563eb;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.prompt-modal-icon svg {
  width: 32px;
  height: 32px;
}

.prompt-modal-body p {
  color: var(--gray-600);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 1.25rem 0;
}

.prompt-modal-body input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  transition: all 0.2s ease;
  text-align: center;
}

.prompt-modal-body input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modal-prompt .modal-actions {
  padding: 0.5rem 2rem 2rem;
  gap: 12px;
  justify-content: center;
  display: flex;
}

.modal-prompt .btn {
  min-width: 120px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.modal-prompt .btn:hover {
  transform: translateY(-1px);
}

.modal-preview .modal-header {
  padding: 1rem 1.5rem;
  margin-bottom: 0;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.preview-frame {
  overflow-y: auto;
  max-height: calc(90vh - 60px);
  background: #f8fafc;
}

.preview-content {
  padding: 2rem;
}

.preview-org-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: white;
  border-bottom: 1px solid var(--gray-200);
}

.preview-org-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.preview-org-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.preview-org-tagline {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.preview-newsletter {
  background: white;
  margin: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  overflow: hidden;
}

.preview-newsletter-header {
  padding: 2rem;
  border-bottom: 1px solid var(--gray-100);
}

.preview-newsletter-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.preview-newsletter-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.preview-newsletter-images {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 2rem;
}

.preview-newsletter-images.single-image img {
  width: 100%;
  border-radius: 8px;
}

.preview-newsletter-images.multi-images {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.preview-newsletter-images img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.preview-newsletter-body {
  padding: 2rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--gray-700);
}

.preview-newsletter-body p {
  margin-bottom: 1rem;
}

.preview-newsletter-body h1, 
.preview-newsletter-body h2, 
.preview-newsletter-body h3 {
  margin: 1.5rem 0 0.75rem;
  color: var(--gray-900);
}

.preview-newsletter-audio,
.preview-newsletter-pdf {
  margin: 1rem 2rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 8px;
}

.preview-newsletter-audio audio {
  width: 100%;
}

.preview-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  margin-left: 0.5rem;
}

.preview-badge-draft {
  background: var(--gray-200);
  color: var(--gray-600);
}

.preview-badge-published {
  background: #dcfce7;
  color: #16a34a;
}

.preview-empty {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--gray-500);
}

.preview-empty svg {
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ================================================
   Toast Notifications
   ================================================ */

#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-left: 4px solid var(--gray-400);
  animation: toastSlideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  min-width: 300px;
  max-width: 420px;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: inherit;
}

.toast.success {
  border-left-color: var(--success);
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.toast.success::before {
  background: linear-gradient(180deg, var(--success) 0%, #059669 100%);
}

.toast.error {
  border-left-color: var(--danger);
  background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.toast.error::before {
  background: linear-gradient(180deg, var(--danger) 0%, #dc2626 100%);
}

.toast.info {
  border-left-color: var(--info);
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.toast.info::before {
  background: linear-gradient(180deg, var(--info) 0%, #2563eb 100%);
}

.toast.warning {
  border-left-color: var(--warning);
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.toast.warning::before {
  background: linear-gradient(180deg, var(--warning) 0%, #d97706 100%);
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
}

.toast.success .toast-icon {
  background: var(--success);
  color: white;
}

.toast.error .toast-icon {
  background: var(--danger);
  color: white;
}

.toast.info .toast-icon {
  background: var(--info);
  color: white;
}

.toast.warning .toast-icon {
  background: var(--warning);
  color: white;
}

.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toast-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-900);
}

.toast-message {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.4;
}

.toast-close {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--gray-700);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  transform-origin: left;
  animation: toastProgress 4s linear forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@media (max-width: 640px) {
  #toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
  }
}

/* ================================================
   Responsive - Mobile First
   ================================================ */

/* Base mobile styles already applied above */

/* Tablet and up */
@media (min-width: 769px) {
  .sidebar {
    width: var(--sidebar-width);
  }
  
  .main {
    margin-left: var(--sidebar-width);
  }
}

/* Medium screens */
@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
  }
  
  .main {
    margin-left: 220px;
  }
  
  .media-preview-item {
    flex-wrap: wrap;
  }
  
  .media-preview-item audio {
    order: 3;
    width: 100%;
    max-width: none;
    margin-top: 0.75rem;
  }
}

/* Tablet */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main {
    margin-left: 0;
  }
  
  .main-container {
    padding: 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .search-box {
    max-width: none;
  }
  
  .header-actions {
    flex-wrap: wrap;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .data-table {
    display: block;
    overflow-x: auto;
  }
  
  /* Media section responsive */
  .media-card-header {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .media-card-icon {
    width: 40px;
    height: 40px;
  }
  
  .media-card-info {
    flex: 1 1 auto;
    min-width: 120px;
  }
  
  .media-add-btn {
    flex: 0 0 auto;
  }
  
  /* Image grid for tablet */
  .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }
  
  /* Audio/PDF preview responsive */
  .media-preview-item {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
  
  .media-preview-item .media-info {
    flex: 1 1 100%;
  }
  
  .media-preview-item audio {
    width: 100%;
    max-width: none;
    order: 2;
  }
  
  .media-preview-item .remove-media-btn {
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
  }
  
  /* Form actions stack on mobile */
  .form-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Preview modal full screen on mobile */
  .modal-preview {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border-radius: 0;
    margin: 0;
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  .login-card {
    padding: 1.25rem;
    margin: 1rem;
    border-radius: var(--radius);
  }
  
  .login-logo {
    font-size: 1.5rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .quick-actions {
    grid-template-columns: 1fr;
  }
  
  /* Larger touch targets for mobile */
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.5rem;
  }
  
  .image-item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
  }
  
  /* Always show remove button on mobile (no hover) */
  .image-item .remove-btn {
    opacity: 1;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  
  /* Media cards compact on mobile */
  .media-card-header {
    padding: 0.75rem 1rem;
  }
  
  .media-card-icon {
    width: 36px;
    height: 36px;
  }
  
  .media-card-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .media-card-label {
    font-size: 0.875rem;
  }
  
  .media-card-hint {
    font-size: 0.75rem;
  }
  
  .media-add-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  /* Audio player compact */
  .media-preview-item {
    position: relative;
    padding: 0.75rem;
  }
  
  .media-preview-item .media-icon {
    width: 36px;
    height: 36px;
  }
  
  .media-preview-item .media-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .media-preview-item audio {
    height: 40px;
  }
  
  .media-preview-item .remove-media-btn {
    padding: 0.5rem;
  }
  
  /* Rich editor */
  .rich-editor {
    min-height: 200px;
  }
  
  /* Newsletter title input */
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="password"] {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Buttons touch friendly */
  .btn {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
  }
  
  /* Section title */
  .media-section-title {
    font-size: 1rem;
  }
}

/* Small phones */
@media (max-width: 360px) {
  .image-grid {
    grid-template-columns: 1fr;
  }
  
  .media-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .media-add-btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Always show remove buttons on touch devices */
  .image-item .remove-btn {
    opacity: 1;
  }
  
  /* Larger touch targets */
  .remove-btn,
  .remove-media-btn {
    min-width: 44px;
    min-height: 44px;
  }
  
  /* No hover transforms on touch */
  .image-item:hover img {
    transform: none;
  }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .image-item img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
  .modal-preview {
    padding: 0.5rem;
  }
  
  .preview-header {
    padding: 0.5rem 1rem;
  }
}

/* Small Spinner */
.spinner-small {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* RSVP Admin Section */
.rsvp-admin-section table th,
.rsvp-admin-section table td {
  border: none;
}

/* Poll Admin Section */
.poll-admin-section {
  margin-top: 16px;
}

/* Confirmation Dialog */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.15s ease;
}

.confirm-dialog {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 380px;
  width: 90%;
  animation: slideUp 0.2s ease;
}

.confirm-dialog p {
  margin: 0 0 1.25rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-800);
  text-align: center;
}

.confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.confirm-actions .btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.confirm-actions .btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
