/* ==========================================================================
   PRIM'S HOTEL - PANEL ADMINISTRADOR STYLESHEET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --admin-sidebar: #0B291A;
  --admin-sidebar-hover: #13452D;
  --admin-bg: #F4F6F4;
  --admin-card: #FFFFFF;
  --admin-primary: #134E2A;
  --admin-gold: #D4AF37;
  --admin-text: #1C2B22;
  --admin-muted: #6C7D73;
  --admin-border: #E0E6E2;
  --admin-danger: #D93838;
  --admin-success: #1E8E47;
  --admin-warning: #E58E12;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Layout */
.admin-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--admin-sidebar);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header img {
  height: 42px;
  width: auto;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
}

.sidebar-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  color: #FFFFFF;
  font-weight: 700;
}

.sidebar-header span {
  font-size: 0.75rem;
  color: var(--admin-gold);
  display: block;
  font-weight: 600;
}

.sidebar-menu {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.menu-item i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.menu-item:hover,
.menu-item.active {
  background: var(--admin-sidebar-hover);
  color: var(--admin-gold);
}

.menu-item.active i,
.menu-item:hover i {
  color: var(--admin-gold);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-main {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  background: #FFFFFF;
  height: 70px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--admin-border);
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-title h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  color: var(--admin-primary);
  font-weight: 700;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--admin-primary);
  color: var(--admin-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.admin-body {
  padding: 30px;
  flex: 1;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--admin-card);
  padding: 24px;
  border-radius: 14px;
  border: 1px solid var(--admin-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-info h3 {
  font-size: 0.85rem;
  color: var(--admin-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-info .stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--admin-primary);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(19, 78, 42, 0.1);
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

/* Data Table Component */
.card-table {
  background: var(--admin-card);
  border-radius: 14px;
  border: 1px solid var(--admin-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  margin-bottom: 30px;
}

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

.card-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  color: var(--admin-primary);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.925rem;
}

.table th {
  background: #FAFBF9;
  padding: 14px 20px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--admin-muted);
  border-bottom: 1px solid var(--admin-border);
  text-transform: uppercase;
  font-size: 0.775rem;
  letter-spacing: 0.5px;
}

.table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--admin-border);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: #F9FAF8;
}

.table-thumb {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-success { background: #E6F6EC; color: #1E8E47; }
.badge-warning { background: #FFF4E5; color: #E58E12; }
.badge-danger { background: #FDE8E8; color: #D93838; }
.badge-info { background: #E8F4FD; color: #1976D2; }

/* Action Buttons */
.btn-action {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  margin-right: 4px;
}

.btn-edit { background: #EBF3ED; color: var(--admin-primary); }
.btn-edit:hover { background: var(--admin-primary); color: #fff; }

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

/* Login Page Styling */
.login-body {
  background: linear-gradient(135deg, var(--admin-sidebar) 0%, #153B26 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: #FFFFFF;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.login-logo {
  max-height: 65px;
  margin-bottom: 16px;
}

.login-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  color: var(--admin-primary);
  margin-bottom: 6px;
}

.login-subtitle {
  color: var(--admin-muted);
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.875rem;
}

.alert-danger {
  background: #FDE8E8;
  color: #D93838;
  border: 1px solid #F8B4B4;
}

.alert-success {
  background: #E6F6EC;
  color: #1E8E47;
  border: 1px solid #B7E4C7;
}

/* Modals */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.admin-modal.active {
  opacity: 1;
  visibility: visible;
}

.admin-modal-content {
  background: #FFFFFF;
  border-radius: 16px;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
}

/* Responsive Admin */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .admin-sidebar.active {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
}
