.admin-panel-toggle {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--scratch-blue);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: transform 0.2s;
}

.admin-panel-toggle:hover {
  transform: scale(1.1);
}

.admin-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  max-width: 90vw;
  max-height: 80vh;
  background: var(--dark-bg);
  border-radius: 15px;
  box-shadow: 0 5px 30px rgba(0,0,0,0.3);
  z-index: 1001;
  overflow: auto;
}

.admin-panel-header {
  padding: 20px;
  background: linear-gradient(90deg, var(--scratch-blue), var(--scratch-orange));
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-panel-header h2 {
  color: white;
  margin: 0;
  font-size: 1.5em;
}

.close-panel {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.close-panel:hover {
  background: rgba(255,255,255,0.2);
}

.admin-panel-content {
  padding: 20px;
}

.admin-section {
  margin-bottom: 30px;
}

.admin-section h3 {
  color: white;
  margin-bottom: 20px;
  font-size: 1.2em;
}

.admin-button {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-button:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.stats-panel {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
}

.stats-panel h4 {
  color: white;
  margin: 0 0 15px 0;
  font-size: 1em;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  color: #ccc;
  margin-bottom: 8px;
  font-size: 0.9em;
}

.stat-item span {
  color: white;
}

.status-ok {
  color: #40BF4A !important;
}

/* Role-specific styles */
[data-role="owner"] .admin-button {
  background: linear-gradient(90deg, var(--scratch-blue), var(--scratch-orange));
}

[data-role="headadmin"] .admin-button {
  background: var(--scratch-jr-purple);
}

[data-role="admin"] .admin-button {
  background: var(--scratch-blue);
}

.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.admin-modal-content {
  background: var(--dark-bg);
  border-radius: 15px;
  padding: 20px;
  width: 80%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
}

.admin-modal-content h3 {
  color: white;
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--dark-border);
}

.modal-body {
  margin-bottom: 20px;
}

.close-modal {
  background: var(--scratch-blue);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  float: right;
}

.admin-list {
  margin-bottom: 20px;
}

.admin-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 10px;
}

.admin-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.admin-item .role {
  color: var(--scratch-blue);
  font-size: 0.9em;
}

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

.settings-group h4 {
  color: white;
  margin-bottom: 10px;
}

.settings-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: #ccc;
}

.settings-group input[type="text"],
.settings-group input[type="number"] {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--dark-border);
  padding: 5px 10px;
  border-radius: 4px;
  color: white;
}

.analytics-dashboard {
  color: white;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.metric {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.metric h4 {
  margin: 0 0 10px 0;
  color: #ccc;
}

.trend {
  font-size: 0.9em;
  margin-left: 10px;
}

.trend.up { color: #40BF4A; }
.trend.down { color: #FF3355; }

.feature-list {
  margin-bottom: 20px;
}

.feature-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 10px;
  color: white;
}

.feature-controls {
  display: flex;
  gap: 10px;
}

.log-filters {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

.log-entry {
  padding: 10px;
  margin-bottom: 5px;
  border-radius: 4px;
  font-family: monospace;
  display: flex;
  gap: 15px;
  color: white;
}

.log-entry.error { background: rgba(255, 51, 85, 0.2); }
.log-entry.warning { background: rgba(255, 171, 25, 0.2); }
.log-entry.info { background: rgba(76, 151, 255, 0.2); }

.content-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
}

.content-item img {
  width: 100px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.user-search {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 10px;
}

.user-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.ticket-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 10px;
  color: white;
}

.ticket-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.modal-body button {
  background: var(--scratch-blue);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s;
}

.modal-body button:hover {
  transform: scale(1.05);
}

.approve { background: #40BF4A; }
.remove { background: #FF3355; }
.warn { background: #FFB500; }

.modal-body input[type="text"],
.modal-body input[type="date"],
.modal-body select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--dark-border);
  padding: 8px 15px;
  border-radius: 4px;
  color: white;
}

.modal-body input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}