:root {
  --bg: #181818;
  --card: #23272f;
  --text: #fff;
  --accent: #1976d2;
  --primary-color: #3498db;
  --secondary-color: #2980b9;
  --success-color: #2ecc71;
  --warning-color: #fbc02d;
  --danger-color: #e74c3c;
  --stat-blue: #1976d2;
  --stat-green: #43a047;
  --stat-yellow: #fbc02d;
  --stat-red: #e53935;
  --border-radius: 10px;
  --box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] {
  --bg: #f5f6fa;
  --card: #fff;
  --text: #222;
  --accent: #1976d2;
  --primary-color: #1976d2;
  --secondary-color: #1256a0;
  --success-color: #43a047;
  --warning-color: #fbc02d;
  --danger-color: #e53935;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: var(--card);
  color: var(--text);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: background 0.2s;
}
.sidebar .logo {
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--accent);
  text-align: center;
  margin: 2rem 0 2rem 0;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 1rem;
}
.sidebar nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.sidebar nav a.active,
.sidebar nav a:hover {
  background: var(--accent);
  color: #fff;
}
.sidebar-footer {
  margin-top: auto;
  text-align: center;
  font-size: 0.9em;
  color: #888;
  padding: 1rem 0;
}

header {
  margin-left: 220px;
  height: 60px;
  background: var(--card);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-title {
  flex: 1;
  font-size: 1.2rem;
}
.user {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
.theme-toggle,
.burger {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

main {
  margin-left: 220px;
  padding: 2rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}
.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.welcome-card {
  background: var(--card);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.stats {
  display: flex;
  gap: 1rem;
}
.stat-card {
  flex: 1;
  background: var(--card);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  min-width: 120px;
  color: var(--text);
}
.stat-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.stat-card span {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}
.stat-card.blue {
  border-top: 4px solid var(--stat-blue);
}
.stat-card.green {
  border-top: 4px solid var(--stat-green);
}
.stat-card.yellow {
  border-top: 4px solid var(--stat-yellow);
}
.stat-card.red {
  border-top: 4px solid var(--stat-red);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.see-all {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95em;
}
.events-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.events-table th,
.events-table td {
  padding: 0.75rem 1rem;
  text-align: left;
}
.events-table th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
}
.events-table tr:not(:last-child) {
  border-bottom: 1px solid #2224;
}
.badge {
  display: inline-block;
  padding: 0.2em 0.7em;
  border-radius: 1em;
  font-size: 0.85em;
  font-weight: bold;
  color: #fff;
}
.badge.blue {
  background: var(--stat-blue);
}
.badge.green {
  background: var(--stat-green);
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.photo-card {
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}
.photo-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #ccc;
}
.photo-info {
  padding: 0.5rem 1rem;
  font-size: 0.95em;
}
.quick-actions {
  background: var(--card);
  border-radius: 10px;
  padding: 1.5rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.quick-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7em 1.2em;
  font-size: 1em;
  cursor: pointer;
  margin-bottom: 0.5em;
  transition: background 0.2s;
}
.quick-btn:hover {
  background: var(--secondary-color);
}
.recent-activity {
  background: var(--card);
  border-radius: 10px;
  padding: 1.5rem 1rem;
}
.recent-activity ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.recent-activity li {
  margin-bottom: 1em;
  font-size: 0.98em;
}
.activity-time {
  color: #aaa;
  font-size: 0.85em;
  margin-left: 0.5em;
}

.content-wrapper {
  margin-left: 220px;
  padding: 2rem 2rem 2rem 2rem;
  min-height: 100vh;
  background: var(--bg);
  transition: margin-left 0.3s;
}
.content-wrapper.full {
  margin-left: 60px;
}
.toggle-sidebar {
  display: inline-block;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 5px;
  margin-bottom: 20px;
  color: var(--text);
  background: none;
  border: none;
}
.toggle-sidebar:hover {
  background-color: rgba(52, 152, 219, 0.1);
}
.section-heading {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #222;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stats-card {
  background: var(--card);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  text-align: center;
  height: 100%;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  color: var(--text);
}
.stats-card:hover {
  transform: translateY(-5px);
}
.stats-card .icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: inline-block;
}
.stats-card .number {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 5px;
}
.stats-card .label {
  color: #aaa;
  font-size: 0.9rem;
}
.stats-card .color-indicator {
  position: absolute;
  top: 0;
  left: 0;
  height: 5px;
  width: 100%;
}
.events-color {
  background: var(--primary-color);
}
.photos-color {
  background: var(--success-color);
}
.users-color {
  background: var(--warning-color);
}
.views-color {
  background: var(--accent);
}
.recent-card {
  background: var(--card);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
  overflow: hidden;
  color: var(--text);
}
.recent-card .card-header {
  padding: 15px 20px;
  border-bottom: 1px solid #222;
  background: var(--card);
  font-weight: 600;
}
.recent-card .card-body {
  padding: 0;
}
.recent-card .list-group-item {
  border-left: none;
  border-right: none;
  padding: 15px 20px;
  background: var(--card);
  color: var(--text);
  border-color: #222;
}
.recent-card .list-group-item:first-child {
  border-top: none;
}
.status-badge {
  font-size: 0.7rem;
  padding: 0.25em 0.6em;
  border-radius: 10px;
}
.quick-action {
  background: var(--card);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 25px 20px;
  text-align: center;
  margin-bottom: 20px;
  transition: all 0.3s;
  height: 100%;
  color: var(--text);
}
.quick-action:hover {
  transform: translateY(-5px);
}
.quick-action .icon {
  font-size: 2rem;
  margin-bottom: 15px;
  display: inline-block;
  color: var(--primary-color);
}
.quick-action h5 {
  margin-bottom: 10px;
}
.quick-action p {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 15px;
}
.user-widget {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 50%;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
.welcome-message {
  min-height: 90px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  background: var(--card, #23272f);
  border-radius: 0;
  margin-bottom: 2rem;
  color: var(--text, #fff);
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.welcome-message .text-muted {
  color: #b0b8c1 !important;
}
.welcome-message .btn {
  white-space: nowrap;
}
@media (max-width: 768px) {
  .welcome-message {
    padding: 0 10px;
    flex-direction: column;
    align-items: flex-start;
    min-height: unset;
  }
}

/* Auth page styles */
.auth-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.auth-card {
  background: var(--card);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2.5rem 2rem 2rem 2rem;
  color: var(--text);
  width: 100%;
  max-width: 400px;
  margin: 40px 0;
}
.auth-title {
  font-size: 1.7rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.form-label {
  color: #aaa;
  margin-bottom: 0.2rem;
}
.form-control {
  background: var(--card);
  color: var(--text);
  border: 1px solid #333;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}
.btn-primary {
  background: var(--primary-color);
  border: none;
  border-radius: 8px;
}
.btn-primary:hover {
  background: var(--secondary-color);
}
.btn-link {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: bold;
  padding: 0;
  margin-left: 0.3em;
  text-decoration: underline;
}
.auth-switch {
  text-align: center;
  margin-bottom: 1.5rem;
}
.success-msg,
.error-msg {
  display: block;
  text-align: center;
  margin-bottom: 1rem;
  padding: 0.7em 1em;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1em;
}
.success-msg {
  background: var(--success-color);
  color: #fff;
}
.error-msg {
  background: var(--danger-color);
  color: #fff;
}
.logout-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #222;
  text-align: center;
}

/* New hover-shadow class for stats-card */
.stats-card.hover-shadow:hover {
  box-shadow: 0 0 0 4px #0d6efd33;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

/* Responsive */
@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-side {
    flex-direction: row;
    gap: 1rem;
  }
  header,
  main {
    margin-left: 0;
  }
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
  }
  .sidebar.open {
    transform: translateX(0);
  }
}
@media (max-width: 992px) {
  .sidebar {
    width: 60px;
  }
  .content-wrapper {
    margin-left: 60px;
  }
  .sidebar .logo {
    font-size: 1rem;
  }
  .sidebar nav a span {
    display: none;
  }
}
@media (max-width: 700px) {
  .stats {
    flex-direction: column;
  }
  .dashboard-side {
    flex-direction: column;
  }
  main {
    padding: 1rem;
  }
  .auth-card {
    padding: 1.2rem 0.7rem 1.2rem 0.7rem;
    margin: 20px 0;
  }
}
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .content-wrapper {
    margin-left: 0;
    padding: 1rem;
  }
  .toggle-sidebar {
    display: none;
  }
}
