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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(187, 134, 252, 0.3); }
  50% { box-shadow: 0 0 40px rgba(187, 134, 252, 0.6); }
}

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

body {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
  color: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  max-width: 450px;
  width: 100%;
  padding: 50px;
  background: rgba(30, 30, 30, 0.6);
  border-radius: 30px;
  border: 2px solid #bb86fc;
  box-shadow: 0 10px 40px rgba(187, 134, 252, 0.3);
  animation: slideIn 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.login-container h1 {
  text-align: center;
  margin-bottom: 40px;
}

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

.error {
  color: #ff6b6b;
  text-align: center;
  font-size: 0.95rem;
  margin: 0;
  min-height: 20px;
}

.header {
  padding: 40px 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.admin-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.admin-header-top > div:first-child {
  text-align: left;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.welcome-text {
  margin: 0;
  color: #bb86fc;
  font-size: 1.2rem;
  font-weight: 600;
}

.role-badge {
  font-size: 0.9rem;
  color: #ffd700;
  font-weight: 600;
  margin: 0;
}

.logout-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%) !important;
  padding: 10px 20px !important;
  font-size: 0.9rem !important;
}

.subtitle {
  color: #bb86fc;
  font-size: 1.2rem;
  animation: slideIn 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

h1 {
  font-size: 3rem;
  background: linear-gradient(135deg, #bb86fc 0%, #7c4dff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  animation: slideIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

h2, h3 {
  color: #e0e0e0;
  margin-bottom: 0.5rem;
}

.main-content {
  flex: 1;
  padding: 60px 20px;
  animation: slideIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: rgba(187, 134, 252, 0.1);
  padding: 20px;
  border-radius: 16px;
  border: 2px solid #bb86fc;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(187, 134, 252, 0.3);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: bold;
  color: #bb86fc;
  margin-bottom: 10px;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: #b0b0b0;
}

.stat-change {
  font-size: 0.9rem;
  padding: 5px 10px;
  border-radius: 10px;
  margin-top: 8px;
  display: inline-block;
}

.stat-change.positive {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
}

.stat-change.negative {
  color: #f44336;
  background: rgba(244, 67, 54, 0.1);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
}

.dashboard-section {
  background: rgba(30, 30, 30, 0.6);
  border: 2px solid #bb86fc;
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dashboard-section.full-width {
  grid-column: 1 / -1;
}

.dashboard-section h2 {
  color: #bb86fc;
  margin-bottom: 20px;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.activity-list {
  list-style: none;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  margin: 10px 0;
  background: rgba(20, 20, 20, 0.5);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.activity-item:hover {
  background: rgba(187, 134, 252, 0.1);
  transform: translateX(10px);
}

.activity-icon {
  font-size: 1.5rem;
}

.activity-time {
  color: #888;
  font-size: 0.85rem;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.data-table th,
.data-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid rgba(187, 134, 252, 0.2);
}

.data-table th {
  background: rgba(187, 134, 252, 0.1);
  color: #bb86fc;
  font-weight: 600;
}

.data-table tr:hover {
  background: rgba(187, 134, 252, 0.05);
}

.badge {
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge.admin {
  background: rgba(187, 134, 252, 0.2);
  color: #bb86fc;
}

.badge.user {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.badge.manager {
  background: rgba(255, 152, 0, 0.2);
  color: #ff9800;
}

.status {
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
}

.status.active {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.status.inactive {
  background: rgba(158, 158, 158, 0.2);
  color: #9e9e9e;
}

input {
  background: rgba(30, 30, 30, 0.8);
  color: #ffffff;
  border: 2px solid #bb86fc;
  border-radius: 20px;
  padding: 14px 20px;
  margin: 10px 0;
  width: 100%;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

textarea {
  background: rgba(30, 30, 30, 0.8);
  color: #ffffff;
  border: 2px solid #bb86fc;
  border-radius: 20px;
  padding: 14px 20px;
  margin: 10px 0;
  width: 100%;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #7c4dff;
  box-shadow: 0 0 30px rgba(187, 134, 252, 0.5);
  transform: translateY(-3px) scale(1.02);
  animation: glow 2s infinite;
}

button {
  background: linear-gradient(135deg, #bb86fc 0%, #7c4dff 100%);
  color: #ffffff;
  border: none;
  padding: 16px 40px;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 8px 20px rgba(187, 134, 252, 0.4);
}

button:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 35px rgba(187, 134, 252, 0.6);
}

button:active {
  transform: translateY(-2px) scale(0.98);
}

.btn-small {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: rgba(30, 30, 30, 0.95);
  margin: 5% auto;
  padding: 40px;
  border: 2px solid #bb86fc;
  border-radius: 24px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 10px 40px rgba(187, 134, 252, 0.3);
  animation: slideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-content h2 {
  color: #bb86fc;
  margin-bottom: 25px;
}

#partnerships-editor {
  margin-top: 20px;
}

.editor-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  padding: 10px;
  background: rgba(20, 20, 20, 0.5);
  border-radius: 12px;
  flex-wrap: wrap;
}

.editor-toolbar button {
  padding: 8px 15px;
  font-size: 0.9rem;
  min-width: auto;
}

.text-editor {
  background: rgba(30, 30, 30, 0.8);
  color: #ffffff;
  border: 2px solid #bb86fc;
  border-radius: 20px;
  padding: 20px;
  min-height: 300px;
  font-size: 1rem;
  line-height: 1.6;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  outline: none;
  overflow-y: auto;
}

.text-editor:focus {
  border-color: #7c4dff;
  box-shadow: 0 0 30px rgba(187, 134, 252, 0.5);
}

.text-editor:empty:before {
  content: 'Start typing your partnership notes here...';
  color: #888;
  font-style: italic;
}

.auto-save-status {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #4caf50;
  text-align: right;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.hero-content {
  text-align: center;
  max-width: 600px;
  padding: 60px 40px;
  background: rgba(30, 30, 30, 0.6);
  border-radius: 30px;
  border: 2px solid #bb86fc;
  box-shadow: 0 10px 40px rgba(187, 134, 252, 0.3);
  animation: slideIn 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 20px;
}

.hero-content .subtitle {
  font-size: 1.5rem;
  margin-bottom: 40px;
}

.hero-btn {
  display: inline-block;
  background: linear-gradient(135deg, #bb86fc 0%, #7c4dff 100%);
  color: #ffffff;
  border: none;
  padding: 18px 50px;
  border-radius: 25px;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 8px 20px rgba(187, 134, 252, 0.4);
}

.hero-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 35px rgba(187, 134, 252, 0.6);
}

.hero-btn:active {
  transform: translateY(-2px) scale(0.98);
}

.panel-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid rgba(187, 134, 252, 0.3);
  padding-bottom: 10px;
}

.tab-btn {
  background: rgba(30, 30, 30, 0.6);
  border: 2px solid #bb86fc;
  color: #ffffff;
  padding: 12px 30px;
  border-radius: 12px 12px 0 0;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: linear-gradient(135deg, #bb86fc 0%, #7c4dff 100%);
  box-shadow: 0 0 20px rgba(187, 134, 252, 0.5);
}

.tab-btn:hover:not(.active) {
  background: rgba(187, 134, 252, 0.2);
  transform: translateY(-2px);
}

.panel-content {
  animation: slideIn 0.5s ease;
}

.close {
  color: #bb86fc;
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close:hover {
  color: #7c4dff;
  transform: scale(1.2);
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-header-top {
    flex-direction: column;
    text-align: center;
  }
  
  .admin-header-top > div:first-child {
    text-align: center;
  }
  
  .user-info {
    align-items: center;
  }
  
  .editor-toolbar {
    justify-content: center;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content .subtitle {
    font-size: 1.2rem;
  }
}
