/* Dashboard Styles */

:root {
  --sidebar-width: 260px;
  --header-height: 64px;
  --primary-color: #3a86ff;
  --secondary-color: #8338ec;
  --accent-color: #ff006e;
  --success-color: #06d6a0;
  --warning-color: #ffbe0b;
  --danger-color: #ef476f;
  --text-color: #333;
  --text-light: #6c757d;
  --border-color: #e0e0e0;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --sidebar-bg: #1e293b;
  --sidebar-text: #e2e8f0;
  --sidebar-hover: rgba(255, 255, 255, 0.1);
  --sidebar-active: rgba(255, 255, 255, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

/* Dashboard Layout */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 10;
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* Allow scrolling for smaller screens */
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sidebar Styles */
.logo {
  padding: 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--sidebar-text);
}

.logo-img {
  width: 32px;
  height: 32px;
  margin-right: 10px;
}

.accent {
  color: var(--primary-color);
}

.main-nav {
  padding: 20px 0;
  flex: 1;
  overflow-y: auto; /* Allow scrolling for long navigation menus */
}

.main-nav ul {
  list-style: none;
}

.main-nav li {
  margin-bottom: 5px;
}

.main-nav a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: background-color 0.2s;
  border-radius: 4px;
  margin: 0 8px;
}

.main-nav a:hover {
  background-color: var(--sidebar-hover);
}

.main-nav li.active a {
  background-color: var(--sidebar-active);
  font-weight: 500;
}

.main-nav a i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.user-info {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 12px;
  background-color: #555;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-details {
  flex: 1;
}

.user-details h4 {
  font-size: 14px;
  margin: 0;
}

.user-details p {
  font-size: 12px;
  opacity: 0.8;
}

.logout-btn {
  background: none;
  border: none;
  color: var(--sidebar-text);
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.logout-btn:hover {
  background-color: var(--sidebar-hover);
}

/* Header Styles */
.dashboard-header {
  height: var(--header-height);
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.header-left {
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  margin-right: 15px;
  cursor: pointer;
  color: var(--text-color);
}

.header-left h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.credits-display {
  background-color: #f0f4ff;
  color: var(--primary-color);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.credits-display i {
  font-size: 14px;
}

.upgrade-btn {
  background-color: #f0f4ff;
  color: var(--primary-color);
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s;
}

.upgrade-btn:hover {
  background-color: #e0e8ff;
}

.notifications {
  position: relative;
  cursor: pointer;
  padding: 8px;
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: var(--danger-color);
  color: white;
  font-size: 10px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dashboard Content */
.dashboard-content {
  padding: 30px;
  flex: 1;
}

.hidden {
  display: none;
}

/* Welcome Card */
.welcome-card {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.welcome-content {
  flex: 1;
}

.welcome-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.welcome-content p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 20px;
}

.welcome-image {
  width: 200px;
  height: 150px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.welcome-image img {
  max-width: 100%;
  max-height: 100%;
}

/* Stats Cards */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 20px;
  color: white;
}

.logos-icon {
  background-color: #ffbe0b;
}

.downloads-icon {
  background-color: #3a86ff;
}

.subscription-icon {
  background-color: #8338ec;
}

.quota-icon {
  background-color: #06d6a0;
}

.stat-info {
  flex: 1;
}

.stat-info h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-info p {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
}

.quota-bar {
  width: 100%;
  height: 6px;
  background-color: #e9ecef;
  border-radius: 3px;
  margin-bottom: 8px;
  overflow: hidden;
}

.quota-fill {
  height: 100%;
  background-color: var(--success-color);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

/* Section Styles */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.view-all {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: opacity 0.2s;
}

.view-all:hover {
  opacity: 0.8;
}

/* Recent Logos Grid */
.logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.logo-item {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.logo-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.logo-image {
  height: 150px;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-info {
  padding: 15px;
}

.logo-info h4 {
  font-size: 14px;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-info p {
  font-size: 12px;
  color: var(--text-light);
  margin: 0;
}

/* Empty State */
.empty-state {
  width: 100%;
  padding: 40px 20px;
  text-align: center;
  grid-column: 1 / -1;
}

.empty-state img {
  max-width: 120px;
  margin-bottom: 20px;
  opacity: 0.7;
}

.empty-state p {
  margin-bottom: 20px;
  color: var(--text-light);
}

/* Button Styles */
.primary-btn, 
.secondary-btn, 
.danger-btn {
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.primary-btn {
  background-color: var(--primary-color);
  color: white;
}

.primary-btn:hover {
  background-color: #2a75e0;
}

.secondary-btn {
  background-color: #f0f4ff;
  color: var(--primary-color);
}

.secondary-btn:hover {
  background-color: #e0e8ff;
}

.danger-btn {
  background-color: #fff1f3;
  color: var(--danger-color);
}

.danger-btn:hover {
  background-color: #ffe5ea;
}

/* Create Logo Form Styles */
.creation-form {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

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

label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}

input, select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  background-color: #fff;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(58, 134, 255, 0.1);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.credit-usage {
  font-size: 14px;
  color: var(--text-light);
}

/* Logo Preview Styles */
.logo-preview-section {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.logo-preview {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.preview-image {
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
}

.preview-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.file-formats h3 {
  font-size: 16px;
  margin-bottom: 15px;
}

.format-options {
  display: flex;
  gap: 20px;
}

.format-option {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.premium-option {
  opacity: 0.6;
}

.premium-tag {
  background-color: #f3f4f6;
  color: #6b7280;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
}

/* History Section Styles */
.history-section {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filters {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.search-bar {
  position: relative;
  width: 300px;
}

.search-bar input {
  padding-right: 40px;
}

.search-bar i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.logos-collection {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* Subscription Section Styles */
.subscription-section {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.current-plan {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 30px;
}

.plan-details {
  flex: 1;
}

.plan-status {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.status-item {
  font-size: 14px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 5px;
}

.plan-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.billing-history h3 {
  margin-bottom: 15px;
}

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

.billing-table th, 
.billing-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.billing-table th {
  background-color: #f8f9fa;
  font-weight: 500;
}

.plans-section {
  margin-top: 30px;
}

.plans-section h3 {
  margin-bottom: 20px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.plan-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.plan-card.popular {
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(58, 134, 255, 0.1);
}

.popular-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--primary-color);
  color: white;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 20px;
}

.plan-header {
  background-color: #f8f9fa;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.plan-header h4 {
  font-size: 20px;
  margin-bottom: 10px;
}

.plan-price {
  font-size: 14px;
}

.price {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
}

.plan-features {
  padding: 20px;
}

.plan-features ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plan-features li {
  margin-bottom: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.plan-features li i {
  margin-right: 10px;
  width: 16px;
}

.plan-features .fa-check {
  color: var(--success-color);
}

.plan-features .fa-times {
  color: var(--text-light);
}

.plan-footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.select-plan-btn {
  width: 100%;
}

/* Settings Section Styles */
.settings-section {
  margin-bottom: 30px;
}

.settings-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.profile-avatar {
  margin-bottom: 20px;
}

.avatar-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.avatar-container img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-actions {
  display: flex;
  gap: 10px;
}

.checkbox-group {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.checkbox-group input {
  width: auto;
  margin-right: 10px;
}

.danger-zone {
  border: 1px solid var(--danger-color);
}

.danger-zone h3 {
  color: var(--danger-color);
}

.danger-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.danger-info {
  flex: 1;
}

.danger-info h4 {
  margin-bottom: 5px;
  color: var(--danger-color);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 30px;
  width: 100%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
}

.modal-content h2 {
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 30px;
}

.logo-details {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}

.logo-details-image {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.logo-details-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-details-info {
  flex: 1;
}

.logo-details-info p {
  margin-bottom: 10px;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  display: none;
}

.loading-content {
  text-align: center;
  padding: 30px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(58, 134, 255, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto 20px;
}

.loading-subtext {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Notification Styles */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 1000;
  max-width: 350px;
}

.notification.show {
  transform: translateY(0);
  opacity: 1;
}

.notification.success {
  background-color: var(--success-color);
  color: white;
}

.notification.error {
  background-color: var(--danger-color);
  color: white;
}

.notification.info {
  background-color: var(--primary-color);
  color: white;
}

.notification.warning {
  background-color: var(--warning-color);
  color: white;
}

.notification-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.close-notification {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  text-transform: capitalize;
}

.status-badge.paid {
  background-color: #e6f7f1;
  color: var(--success-color);
}

.status-badge.pending {
  background-color: #fff8e6;
  color: var(--warning-color);
}

.status-badge.failed {
  background-color: #feecf0;
  color: var(--danger-color);
}

.empty-table-message {
  text-align: center;
  color: var(--text-light);
  padding: 20px 0;
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9;
}

.sidebar-overlay.active {
  display: block;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 11; /* Higher than overlay */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }
  
  .menu-toggle {
    display: block;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .current-plan {
    flex-direction: column;
    gap: 20px;
  }
  
  .logo-details {
    flex-direction: column;
  }
  
  .logo-details-image {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .dashboard-header {
    padding: 0 15px;
    position: sticky;
    top: 0;
    z-index: 8;
  }
  
  .dashboard-content {
    padding: 15px;
  }
  
  .header-right {
    gap: 10px;
  }
  
  .credits-display {
    display: none;
  }
  
  .stats-cards {
    grid-template-columns: 1fr;
  }
  
  .welcome-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  
  .welcome-content {
    margin-bottom: 20px;
  }
  
  .welcome-content h2 {
    font-size: 24px;
  }
  
  .creation-form,
  .logo-preview-section,
  .history-section,
  .subscription-section,
  .settings-card {
    padding: 20px;
  }
  
  .search-bar {
    width: 100%;
  }
  
  .filters {
    flex-direction: column;
    gap: 15px;
  }
  
  .modal-content {
    padding: 20px;
    width: 90%;
  }
  
  /* Improve touch targets on mobile */
  .main-nav a {
    padding: 14px 20px; /* Larger touch targets */
  }
  
  .upgrade-btn, .notifications {
    padding: 10px; /* Larger touch target */
  }
  
  /* Fix bottom padding to ensure content isn't cut off */
  .main-content {
    padding-bottom: 80px;
  }
}
