/* Movie Theater Admin Backend Styles */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  --primary-color: #e50914;
  --primary-dark: #b20710;
  --primary-light: #f5222d;
  --dark-bg: #141414;
  --dark-surface: #1f1f1f;
  --dark-surface-lighter: #2a2a2a;
  --dark-border: #333333;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-tertiary: #737373;
  --accent-blue: #0071eb;
  --accent-green: #46d369;
  --accent-yellow: #f5c518;
  --danger: #e87c03;
  --success: #46d369;
  --warning: #f5c518;
  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.3);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background-color: #141414;
  color: #ffffff;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* Layout Structure */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.admin-sidebar {
  width: 240px;
  background-color: var(--dark-surface);
  border-right: 1px solid var(--dark-border);
  height: 100%;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--dark-border);
}

.sidebar-brand h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--primary-color);
}

.sidebar-brand .logo {
  width: 32px;
  height: 32px;
  margin-right: 0.75rem;
  background-color: var(--primary-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-nav {
  padding: 1rem 0;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  font-weight: 600;
}

.nav-item {
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: rgba(229, 9, 20, 0.15);
  color: var(--text-primary);
  border-left: 3px solid var(--primary-color);
}

.nav-item i {
  margin-right: 0.75rem;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* Main Content Area */
.admin-main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header */
.admin-header {
  height: 64px;
  background-color: #1f1f1f;
  border-bottom: 1px solid #333333;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.header-title {
  display: flex;
  align-items: center;
}

.header-title h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  margin-left: 1rem;
}

.breadcrumbs span {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.breadcrumbs i {
  margin: 0 0.5rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-actions button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.header-actions button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.user-menu:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Content Area */
.admin-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  background-color: #141414;
}

/* Dashboard Stats */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background-color: var(--dark-surface);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.stat-change {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
}

.stat-change.positive {
  color: var(--accent-green);
}

.stat-change.negative {
  color: var(--danger);
}

.stat-change i {
  margin-right: 0.25rem;
}

/* Calendar Container */
.calendar-container {
  background-color: #1f1f1f;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  height: calc(100vh - 120px);
}

#calendar {
  height: 100%;
}

/* FullCalendar Dark Theme Customizations */
.fc {
  --fc-border-color: #333333;
  --fc-page-bg-color: #1f1f1f;
  --fc-neutral-bg-color: #2a2a2a;
  --fc-list-event-hover-bg-color: #2a2a2a;
  --fc-today-bg-color: rgba(229, 9, 20, 0.1);
  --fc-event-bg-color: #e50914;
  --fc-event-border-color: #e50914;
  --fc-event-text-color: #ffffff;
  --fc-event-selected-overlay-color: rgba(255, 255, 255, 0.2);
}

.fc .fc-toolbar-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.fc .fc-button {
  background-color: #2a2a2a;
  border-color: #333333;
  color: #b3b3b3;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  text-transform: none;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
  box-shadow: none;
}

.fc .fc-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #333333;
  color: #ffffff;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background-color: #e50914;
  border-color: #e50914;
  color: #ffffff;
}

.fc-theme-standard th {
  padding: 0.75rem 0;
  font-weight: 600;
  color: #b3b3b3;
}

.fc-theme-standard td {
  border-color: #333333;
}

.fc-col-header-cell-cushion,
.fc-daygrid-day-number {
  color: #b3b3b3;
  text-decoration: none;
}

.fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  color: #e50914;
  font-weight: 600;
}

.fc-event {
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.fc-event-time {
  font-weight: 600;
}

.fc-event-title {
  font-weight: 400;
}

.fc-timegrid-slot-label-cushion {
  color: #737373;
  font-size: 0.75rem;
}

.fc-timegrid-axis-cushion {
  color: #737373;
  font-size: 0.75rem;
}

/* Modal Styles */
#modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(3px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#modalOverlay.active {
  opacity: 1;
}

#addPlageModal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  background: #1f1f1f;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  border: 1px solid #333333;
  opacity: 0;
  transform: translate(-50%, -60%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#addPlageModal.active {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #333333;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: #737373;
  cursor: pointer;
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.modal-body {
  padding: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  border-top: 1px solid #333333;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #b3b3b3;
  font-size: 0.875rem;
}

input[type="date"],
input[type="time"],
input[type="number"],
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #333333;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-size: 0.9375rem;
  color: #ffffff;
  background-color: #2a2a2a;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: #e50914;
  box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.2);
}

select option {
  background-color: #1f1f1f;
  color: #ffffff;
}

button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

button[type="submit"] {
  background-color: #e50914;
  color: white;
}

button[type="submit"]:hover {
  background-color: #b20710;
}

button[type="button"] {
  background-color: #2a2a2a;
  color: #b3b3b3;
}

button[type="button"]:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background-color: var(--dark-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-tertiary);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .admin-sidebar {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--dark-border);
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 0.5rem 0;
  }

  .nav-section {
    margin-bottom: 0;
    margin-right: 1rem;
  }

  .nav-section-title {
    display: none;
  }

  .dashboard-stats {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .calendar-container {
    height: calc(100vh - 100px);
  }

  .fc .fc-toolbar {
    flex-direction: column;
    gap: 0.5rem;
  }

  #addPlageModal {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .admin-header {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    gap: 0.5rem;
  }

  .header-title {
    width: 100%;
    justify-content: space-between;
  }

  .breadcrumbs {
    display: none;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .modal-footer {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}

/* Animation for modal */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translate(-50%, -60%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

#modalOverlay.active {
  animation: fadeIn 0.3s forwards;
}

#addPlageModal.active {
  animation: slideIn 0.3s forwards;
}
