/* css/admin.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary:       #080808;
  --bg-secondary:     #101010;
  --bg-tertiary:      #181818;
  --bg-card:          #141414;

  --gold-primary:     #C9A84C;
  --gold-light:       #E3C06A;
  --gold-faint:       rgba(201,168,76,0.10);
  --gold-border:      rgba(201,168,76,0.25);

  --text-primary:     #F5F0E8;
  --text-secondary:   #A89880;
  --text-tertiary:    #665544;
  --text-gold:        #C9A84C;

  --border-default:   #1E1E1E;
  --border-emphasis:  #2E2E2E;

  --success-green:    #25D366;
  --danger-red:       #e74c3c;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

/* Login Page Styles */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background-color: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.login-logo {
  text-align: center;
  margin-bottom: 35px;
}

.admin-login-logo {
  height: 90px;
  width: auto;
  object-fit: contain;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.login-logo h1 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text-gold);
  font-size: 2.2rem;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold-primary);
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background-color: var(--gold-primary);
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-submit:hover {
  background-color: var(--gold-light);
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
}

.error-message {
  background-color: rgba(231, 76, 60, 0.15);
  border: 1px solid var(--danger-red);
  color: #ff6b6b;
  padding: 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  text-align: center;
  display: none;
}

/* Admin Dashboard Structure */
.admin-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar styling */
.admin-sidebar {
  width: 280px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-brand {
  padding: 30px 24px;
  border-bottom: 1px solid var(--border-default);
}

.admin-sidebar-logo {
  height: 45px;
  width: auto;
  object-fit: contain;
  margin-bottom: 12px;
  display: block;
}

.sidebar-brand h2 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text-gold);
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: 0.05em;
}

.sidebar-brand p {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 4px;
}

.sidebar-menu {
  list-style: none;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-menu-item a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  cursor: pointer;
}

.sidebar-menu-item a:hover,
.sidebar-menu-item.active a {
  color: var(--text-gold);
  background-color: var(--bg-tertiary);
  border-left-color: var(--gold-primary);
}

/* Main content pane */
.admin-main {
  flex-grow: 1;
  margin-left: 280px;
  padding: 40px;
  background-color: var(--bg-primary);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-default);
}

.admin-header h1 {
  font-size: 1.8rem;
  font-weight: 600;
}

.admin-user {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Dashboard Section Panes */
.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

/* Section Box / Card styles */
.admin-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
}

.admin-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-gold);
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 10px;
}

/* Lists and Tables */
.admin-table-wrapper {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.admin-table th, 
.admin-table td {
  padding: 12px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-default);
}

.admin-table th {
  background-color: var(--bg-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  font-size: 0.9rem;
}

.admin-table tr:hover {
  background-color: var(--bg-tertiary);
}

/* Buttons in dashboard */
.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-admin-primary {
  background-color: var(--gold-primary);
  color: #000;
}

.btn-admin-primary:hover {
  background-color: var(--gold-light);
}

.btn-admin-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-admin-secondary:hover {
  background-color: var(--bg-tertiary);
}

.btn-admin-danger {
  background-color: rgba(231, 76, 60, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.btn-admin-danger:hover {
  background-color: var(--danger-red);
  color: #fff;
}

/* Items Manager Row Details */
.list-actions {
  display: flex;
  gap: 10px;
}

/* Media Uploader Grid (specifically for Rooms/Gallery) */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.media-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-default);
  background-color: var(--bg-secondary);
  aspect-ratio: 1;
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-delete-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.media-item:hover .media-delete-overlay {
  opacity: 1;
}

/* File Upload Controls */
.upload-btn-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.upload-btn-wrapper input[type=file] {
  font-size: 100px;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
}

/* Dynamic settings grids */
.settings-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.settings-full-width {
  grid-column: span 2;
}

/* Breakfast Menu Editor */
.menu-editor-category {
  margin-bottom: 40px;
}

.menu-item-row {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 12px;
}

.menu-item-row .form-input {
  flex-grow: 1;
}

/* Responsive Overrides */
@media (max-width: 992px) {
  .admin-sidebar {
    width: 80px;
  }
  
  .sidebar-brand h2,
  .sidebar-brand p,
  .sidebar-menu-item span {
    display: none;
  }

  .admin-main {
    margin-left: 80px;
    padding: 20px;
  }

  .settings-form-grid {
    grid-template-columns: 1fr;
  }

  .settings-full-width {
    grid-column: span 1;
  }
}

@media (max-width: 576px) {
  .admin-container {
    flex-direction: column;
  }

  .admin-sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }

  .sidebar-menu {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 10px;
  }

  .admin-main {
    margin-left: 0;
  }
  
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
