:root {
  --cream: #fffaf0;
  --beige: #f7f3e8;
  --card: #fefcf6;
  --text-dark: #2e241c;
  --text-body: #4e463e;
  --gold: #d0aa7b;
  --primary: #c05a2c;
  --primary-hover: #a84d24;
  --accent: #6d9e6f;
  --border: #e7e2cf;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: linear-gradient(135deg, #f9f5f0, #f0e6dc);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: var(--text-body);
}

.container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 250, 240, 0.95);
  border-radius: 12px;
  padding: 15px 25px;
  box-shadow: var(--shadow);
  border-bottom: 2px solid var(--gold);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 28px;
  color: var(--gold);
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
  cursor: pointer;
}

.logo-text span {
  color: var(--text-dark);
  cursor: pointer;
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.admin-name {
  font-weight: 500;
  color: var(--text-dark);
}

.logout-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.logout-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.main-content {
  display: flex;
  gap: 20px;
  height: 75vh;
}

.sidebar {
  width: 250px;
  background: rgba(255, 250, 240, 0.95);
  border-radius: 12px;
  padding: 20px 0;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.nav-item {
  padding: 14px 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-body);
  text-decoration: none;
  font-weight: 500;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(208, 170, 123, 0.1);
  color: var(--primary);
}

.nav-item.active {
  background: rgba(208, 170, 123, 0.15);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

.nav-icon {
  width: 24px;
  font-size: 18px;
}

.content-panel {
  flex: 1;
  background: rgba(255, 250, 240, 0.95);
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--shadow);
  overflow-y: auto;
}

.panel-title {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border);
}

.panel-title i {
  color: var(--primary);
}

.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.order-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.order-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.order-id {
  font-weight: 600;
  color: var(--text-dark);
}

.order-time {
  font-size: 14px;
  color: #888;
}

.order-table {
  background: var(--beige);
  padding: 5px 10px;
  border-radius: 20px;
  font-weight: 500;
  color: var(--primary);
}

.order-details {
  margin-bottom: 20px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

.order-total {
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 10px;
  text-align: right;
}

.order-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.accept-btn {
  background: var(--accent);
  color: white;
}

.reject-btn {
  background: #e74c3c;
  color: white;
}

.card {
  background: rgba(255, 250, 240, 0.95);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.card-header h2 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.add-btn {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.add-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

thead {
  background-color: rgba(208, 170, 123, 0.15);
}

th,
td {
  padding: 1rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 1rem;
}

td {
  color: var(--text-body);
  font-size: 0.95rem;
}

tbody tr:hover {
  background-color: rgba(247, 243, 232, 0.5);
  cursor: pointer;
}

.icon-btn {
  padding: 0.6rem 0.8rem;
  margin-right: 0.4rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
}

.icon-btn.edit {
  background: rgba(208, 170, 123, 0.2);
  color: var(--text-dark);
}

.icon-btn.delete {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

.icon-btn.edit:hover {
  background: var(--gold);
  color: white;
}

.icon-btn.delete:hover {
  background: #e74c3c;
  color: white;
}

.hidden {
  display: none;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--card);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  background: var(--primary);
  padding: 1.5rem 2rem;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.close-btn:hover {
  transform: rotate(90deg);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(208, 170, 123, 0.2);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  flex: 1;
  padding: 0.9rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: rgba(192, 90, 44, 0.1);
}

.delete-confirm {
  text-align: center;
  padding: 2rem;
}

.delete-confirm p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

.delete-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-cancel {
  background: var(--beige);
  color: var(--text-dark);
}

.btn-delete {
  background: #e74c3c;
  color: white;
}

.btn-cancel:hover {
  background: rgba(208, 170, 123, 0.2);
}

.btn-delete:hover {
  background: #c0392b;
}

/* ===== MUSIC PLAYER STYLES ===== */
.music-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.player-controls {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.player-info {
  flex: 1;
  min-width: 200px;
}

.now-playing-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.now-playing-artist {
  font-size: 0.95rem;
  color: var(--text-body);
}

.player-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.music-btn {
  width: 45px;
  height: 45px;
  border: 2px solid var(--border);
  background: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--primary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.1);
}

.music-btn.play-btn {
  width: 55px;
  height: 55px;
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.music-btn.play-btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 200px;
}

.volume-control i {
  color: var(--primary);
  font-size: 1.2rem;
}

.volume-slider {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
}

.progress-container {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 0.8rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-body);
  font-weight: 500;
}

.playlist-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.playlist-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.playlist-header h3 {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin: 0;
}

.filter-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-input {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(208, 170, 123, 0.2);
}

.priority-filter {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
}

.priority-filter:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(208, 170, 123, 0.2);
}

.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.music-item {
  background: var(--beige);
  border-radius: 10px;
  padding: 1.5rem;
  border-left: 4px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.music-item.priority-high {
  border-left-color: #e74c3c;
  background: rgba(231, 76, 60, 0.05);
}

.music-item.priority-medium {
  border-left-color: var(--gold);
  background: rgba(208, 170, 123, 0.05);
}

.music-item.priority-low {
  border-left-color: var(--accent);
  background: rgba(109, 158, 111, 0.05);
}

.music-item.playing {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  background: var(--card);
}

.music-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.priority-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.priority-badge.high {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

.priority-badge.medium {
  background: rgba(208, 170, 123, 0.2);
  color: var(--gold);
}

.priority-badge.low {
  background: rgba(109, 158, 111, 0.2);
  color: var(--accent);
}

.order-ref {
  font-size: 0.85rem;
  color: var(--text-body);
  font-weight: 500;
}

.music-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.music-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.music-artist {
  font-size: 0.9rem;
  color: var(--primary);
  margin: 0;
  font-weight: 500;
}

.music-description {
  font-size: 0.85rem;
  color: var(--text-body);
  margin: 0;
}

.music-item-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.play-music-btn {
  flex: 1;
  padding: 0.7rem 1.2rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.play-music-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.music-duration {
  font-size: 0.85rem;
  color: var(--text-body);
  font-weight: 500;
  min-width: 50px;
  text-align: right;
}

/* to hide another card while displaying the current clicked card */
.hidden {
  display: none;
}
