/* HEBE by Thalia Miranda — Principal Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Gelasio:ital,wght@0,500;0,600;0,700;1,500;1,600;1,700&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  --hebe-rose: #c05b71;
  --hebe-rose-light: #fbebf0;
  --hebe-gold: #d4a373;
  --hebe-gold-light: #faedcd;
  --hebe-dark: #2b2d42;
  --hebe-cream: #faf7f0;
  --hebe-white: #ffffff;
  --hebe-gray: #8d99ae;
  --hebe-success: #2ec4b6;
  
  --font-title: 'Gelasio', serif;
  --font-body: 'Poppins', sans-serif;
  
  --shadow-sm: 0 2px 8px rgba(192, 91, 113, 0.05);
  --shadow-md: 0 8px 30px rgba(192, 91, 113, 0.08);
  --shadow-lg: 0 16px 40px rgba(43, 45, 66, 0.12);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-body);
  background-color: var(--hebe-cream);
  color: var(--hebe-dark);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: var(--font-title);
  font-weight: 600;
}

/* Glassmorphism utility */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Premium Card */
.hebe-card {
  background: var(--hebe-white);
  border-radius: 16px;
  border: 1px solid rgba(192, 91, 113, 0.08);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  padding: 24px;
}

.hebe-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(192, 91, 113, 0.15);
}

/* Sidebar Styling */
.hebe-sidebar {
  width: 280px;
  height: calc(100vh - 56px);
  position: fixed;
  top: 56px;
  left: 0;
  background: var(--hebe-dark);
  color: var(--hebe-white);
  padding: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.hebe-sidebar .brand-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
  transition: var(--transition);
  overflow: hidden;
  max-height: 80px;
}

.hebe-sidebar .brand-section span {
  display: block;
  width: 100%;
  text-align: center;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hebe-sidebar .brand-title {
  color: var(--hebe-gold);
  font-size: 24px;
  letter-spacing: 1px;
}

.hebe-sidebar .nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  overflow-y: auto;
  overflow: hidden;
}

.hebe-sidebar .nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
}

.hebe-sidebar .nav-item a:hover {
  background: rgba(192, 91, 113, 0.15);
  color: var(--hebe-rose-light);
  transform: translateX(4px);
}

.hebe-sidebar .nav-item.active a {
  background: linear-gradient(135deg, var(--hebe-rose), #9e465a);
  color: var(--hebe-white);
  box-shadow: 0 4px 15px rgba(192, 91, 113, 0.3);
}

.hebe-sidebar .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
  transition: var(--transition);
}

/* Sidebar Collapsed State */
.hebe-sidebar.collapsed {
  width: 70px;
  padding: 24px 8px;
}

.hebe-sidebar.collapsed .brand-section {
  padding-bottom: 0;
  margin-bottom: 10px;
  border-bottom-color: transparent;
  max-height: 0;
}

.hebe-sidebar.collapsed .brand-section span {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.hebe-sidebar.collapsed .nav-menu .nav-item a {
  justify-content: center;
  padding: 12px 0;
  gap: 0;
}

.hebe-sidebar.collapsed .nav-menu .nav-item a:hover {
  transform: none;
}

.hebe-sidebar.collapsed .nav-menu .nav-item a span {
  display: none !important;
}

.hebe-sidebar.collapsed .user-info {
  justify-content: center;
  padding-top: 16px;
}

.hebe-sidebar.collapsed .user-info div:last-of-type,
.hebe-sidebar.collapsed .user-info a {
  display: none !important;
}

/* Content Area */
.hebe-main-content {
  margin-left: 280px;
  margin-top: 56px;
  padding: 40px;
  min-height: calc(100vh - 56px);
  transition: var(--transition);
  width: calc(100% - 280px);
}

.hebe-sidebar.collapsed ~ .hebe-main-content {
  margin-left: 70px;
  width: calc(100% - 70px);
}

/* Header Styling */
.hebe-header {
  height: 56px;
  background: var(--hebe-dark);
  color: var(--hebe-white);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hebe-header .header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hebe-header .toggle-btn {
  background: none;
  border: none;
  color: var(--hebe-white);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: var(--transition);
}

.hebe-header .toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--hebe-rose-light);
}

.hebe-header .brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.hebe-header .brand-text {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 20px;
  color: var(--hebe-gold);
  letter-spacing: 0.5px;
}

.hebe-header .header-info {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 16px;
  margin-left: 16px;
  display: flex;
  flex-direction: column;
}

.hebe-header .header-info .user-name {
  font-weight: 500;
  color: var(--hebe-white);
}

.hebe-header .header-info .sucursal-name {
  font-size: 11px;
  color: var(--hebe-rose-light);
}

.hebe-header .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hebe-header .header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hebe-header .action-btn {
  background: rgba(192, 91, 113, 0.15);
  border: 1px solid rgba(192, 91, 113, 0.3);
  color: var(--hebe-rose-light);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.hebe-header .action-btn:hover {
  background: var(--hebe-rose);
  color: var(--hebe-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(192, 91, 113, 0.2);
}

.hebe-header .caja-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.hebe-header .caja-btn.abierta {
  background: rgba(46, 196, 182, 0.15);
  border: 1px solid rgba(46, 196, 182, 0.3);
  color: #2ec4b6;
}

.hebe-header .caja-btn.abierta:hover {
  background: #2ec4b6;
  color: var(--hebe-white);
  transform: translateY(-2px);
}

.hebe-header .caja-btn.cerrada {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #dc3545;
}

.hebe-header .caja-btn.cerrada:hover {
  background: #dc3545;
  color: var(--hebe-white);
  transform: translateY(-2px);
}

.hebe-header .logout-btn {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #dc3545;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.hebe-header .logout-btn:hover {
  background: #dc3545;
  color: var(--hebe-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(220, 53, 69, 0.2);
}

/* Premium Buttons */
.btn-hebe {
  background: linear-gradient(135deg, var(--hebe-rose), #9e465a);
  color: var(--hebe-white);
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(192, 91, 113, 0.2);
  transition: var(--transition);
}

.btn-hebe:hover {
  background: linear-gradient(135deg, #a84c60, #883b4c);
  color: var(--hebe-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(192, 91, 113, 0.3);
}

.btn-hebe-outline {
  background: transparent;
  color: var(--hebe-rose);
  border: 2px solid var(--hebe-rose);
  border-radius: 12px;
  padding: 10px 22px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-hebe-outline:hover {
  background: var(--hebe-rose-light);
  color: var(--hebe-rose);
  transform: translateY(-2px);
}

/* Custom Table Design */
.hebe-table-container {
  background: var(--hebe-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(192, 91, 113, 0.08);
}

.hebe-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.hebe-table th {
  background-color: var(--hebe-rose-light);
  color: var(--hebe-rose);
  font-family: var(--font-title);
  font-weight: 600;
  text-align: left;
  padding: 16px 24px;
  border-bottom: 2px solid rgba(192, 91, 113, 0.1);
}

.hebe-table td {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(192, 91, 113, 0.05);
  color: var(--hebe-dark);
}

.hebe-table tr:hover {
  background-color: rgba(250, 247, 240, 0.5);
}

/* Top Navbar Style */
.hebe-navbar {
  background: var(--hebe-white);
  border-radius: 16px;
  padding: 16px 32px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(192, 91, 113, 0.05);
}

/* Mobile responsive adjustments */
@media (max-width: 991.98px) {
  .hebe-header {
    padding: 0 12px;
  }
  .hebe-header .header-info {
    display: none; /* Hide header details on mobile */
  }
  .hebe-sidebar {
    top: 56px;
    height: calc(100vh - 56px);
    transform: translateX(-100%);
  }
  .hebe-sidebar.show {
    transform: translateX(0);
  }
  .hebe-sidebar.collapsed {
    transform: translateX(-100%); /* Collapsed stays hidden on mobile unless toggled */
  }
  .hebe-sidebar.collapsed.show {
    transform: translateX(0);
    width: 280px; /* Expand on mobile when showing */
  }
  .hebe-sidebar.collapsed.show .brand-section {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 80px;
  }
  .hebe-sidebar.collapsed.show .brand-section span {
    opacity: 1;
    transform: translateY(0);
    display: block !important;
  }
  .hebe-sidebar.collapsed.show .nav-menu .nav-item a span,
  .hebe-sidebar.collapsed.show .user-info div:last-of-type,
  .hebe-sidebar.collapsed.show .user-info a {
    display: block !important;
  }
  .hebe-sidebar.collapsed.show .nav-menu .nav-item a {
    justify-content: flex-start;
    padding: 12px 16px;
    gap: 12px;
  }
  .hebe-main-content {
    margin-left: 0 !important;
    padding: 20px;
    width: 100% !important;
  }
}