/* ✨ Complete Email Marketing Design - Listy i wszystkie funkcje */

/* === MAIN LAYOUT === */
.complete-email-container {
  font-family: system-ui, -apple-system, sans-serif;
  background: #ffffff;
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.complete-content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  background: transparent;
}

/* === HEADER === */
.complete-header {
  background: transparent;
  padding: 20px 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 20px;
}

.complete-title {
  font-size: 32px;
  font-weight: 500;
  color: #333;
  margin: 0 0 8px;
}

.complete-subtitle {
  font-size: 16px;
  color: #666;
  margin: 0;
  font-weight: 300;
}

/* === TABS === */
.complete-tabs {
  display: flex;
  gap: 0;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 20px;
}

.complete-tab-btn {
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex: 1;
  text-align: center;
}

.complete-tab-btn:hover {
  background: rgba(255,255,255,0.5);
  color: #333;
}

.complete-tab-btn.active {
  background: white;
  color: #333;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* === TOOLBAR === */
.complete-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.complete-search-box {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 10px 16px;
  min-width: 300px;
}

.complete-search-input {
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  color: #333;
  flex: 1;
  padding: 0;
}

.complete-search-input::placeholder {
  color: #999;
}

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

.complete-btn-primary {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.complete-btn-primary:hover {
  background: #0056b3;
}

/* === TAB CONTENT === */
.complete-tab-content {
  display: none;
}

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

/* === LISTS === */
.complete-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.complete-list-item {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: all 0.2s ease;
  cursor: pointer;
}

.complete-list-item:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0,123,255,0.1);
  transform: translateY(-1px);
}

.complete-item-content {
  flex: 1;
  min-width: 0;
}

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

.complete-item-title {
  font-size: 18px;
  font-weight: 500;
  color: #333;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 400px;
}

.complete-item-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0 0 12px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.complete-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.complete-meta-item {
  font-size: 12px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 4px;
}

.complete-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: 20px;
}

/* === STATUS BADGES === */
.complete-status {
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-draft {
  background: #f8f9fa;
  color: #6c757d;
}

.status-active {
  background: #d4edda;
  color: #155724;
}

.status-template {
  background: #e7f3ff;
  color: #0066cc;
}

/* === BUTTONS === */
.complete-btn-small {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  color: #495057;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.complete-btn-small:hover {
  background: #e9ecef;
  transform: translateY(-1px);
}

.complete-btn-success {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

.complete-btn-success:hover {
  background: #218838;
  border-color: #1e7e34;
}

.complete-btn-danger {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

.complete-btn-danger:hover {
  background: #c82333;
  border-color: #bd2130;
}

.complete-btn-cancel {
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}

.complete-btn-cancel:hover {
  background: #545b62;
}

/* === EMPTY STATE === */
.complete-empty-state {
  text-align: center;
  padding: 60px 40px;
  color: #999;
}

.complete-empty-state h3 {
  font-size: 20px;
  color: #666;
  margin: 0 0 8px;
}

.complete-empty-state p {
  font-size: 14px;
  margin: 0 0 24px;
}

/* === MODAL === */
.complete-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.complete-modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.complete-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
}

.complete-modal-title {
  font-size: 18px;
  font-weight: 500;
  color: #333;
  margin: 0;
}

.complete-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.complete-modal-close:hover {
  color: #333;
}

.complete-modal-body {
  padding: 24px;
  max-height: 50vh;
  overflow-y: auto;
}

.complete-modal-footer {
  padding: 20px 24px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* === FORM ELEMENTS === */
.complete-form-group {
  margin-bottom: 20px;
}

.complete-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
}

.complete-input,
.complete-select,
.complete-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  background: white;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.complete-input:focus,
.complete-select:focus,
.complete-textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.complete-textarea {
  resize: vertical;
  font-family: 'Monaco', 'Consolas', monospace;
  min-height: 120px;
}

/* === STATS === */
.complete-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.complete-stat-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}

.complete-stat-card h3 {
  font-size: 16px;
  color: #666;
  margin: 0 0 12px;
}

.complete-stat-number {
  font-size: 36px;
  font-weight: 600;
  color: #333;
  margin: 12px 0;
}

.complete-stat-card p {
  font-size: 14px;
  color: #999;
  margin: 0;
}

/* === PREVIEW === */
.complete-preview {
  max-width: 100%;
}

.complete-preview-header,
.complete-preview-variables {
  background: #f8f9fa;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

.complete-preview-content {
  margin-bottom: 16px;
}

.complete-preview-html {
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 16px;
  background: #fafbfc;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 8px;
  font-family: inherit;
  line-height: 1.5;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .complete-email-container {
    padding: 16px;
  }

  .complete-toolbar {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .complete-search-box {
    min-width: auto;
  }

  .complete-list-item {
    flex-direction: column;
    align-items: stretch;
  }

  .complete-item-actions {
    margin-left: 0;
    margin-top: 16px;
    justify-content: flex-start;
  }

  .complete-item-title {
    max-width: none;
  }

  .complete-modal-content {
    width: 95%;
    margin: 20px;
  }

  .complete-stats-grid {
    grid-template-columns: 1fr;
  }

  .complete-tabs {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .complete-item-meta {
    flex-direction: column;
    gap: 8px;
  }

  .complete-item-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .complete-btn-small {
    font-size: 11px;
    padding: 5px 10px;
  }
}