/* ===== GLOBAL ===== */
* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #faf7f4;
  font-family: "Segoe UI", sans-serif;
}
a {
  text-decoration: none;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 20px;
}

.page-header-left h4 {
  margin: 0;
  color: var(--dt-text);
  font-size: 18px;
  font-weight: 700;
}

.page-header-left p {
  margin: 2px 0 0;
  color: var(--dt-text-3);
  font-size: 12px;
}

.page-header-left .header-icon {
  width: 40px;
  height: 40px;
  margin-right: 12px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  background: var(--dt-accent-light);
  color: var(--dt-accent);
  font-size: 1.05rem;
}
/* ===== TOP NAVBAR ===== */
.top-navbar {
  height: 56px;
  background: #1a1a2e;
  color: white;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.top-navbar .brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #e9a745;
  margin-right: 1rem;
}
.top-navbar .store-badge {
  background: #16213e;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #a8b2d8;
}
.top-navbar .user-info {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.top-navbar .role-badge-user {
  background: #e9a245;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}
.top-navbar .role-badge-hq {
  background: #8a0df0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.top-navbar .role-badge-admin {
  background: #dc3545;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.top-navbar .role-badge-store {
  background: #198754;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.top-navbar .role-badge-staff {
  background: #0d6efd;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 220px;
  background: #ffffff;
  position: fixed;
  top: 56px;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 900;
  padding: 1rem 0;
}
.sidebar .nav-link {
  color: #f76300;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: #f76300;
  background: rgba(233, 69, 96, 0.1);
  border-left-color: #e9a745;
}
.sidebar .nav-section {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #4a5568;
  padding: 1rem 1.25rem 0.3rem;
  letter-spacing: 0.1em;
  display: block;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: 220px;
  margin-top: 56px;
  padding: 1.5rem;
  flex: 1;
}

.pos-content {
  margin-top: 56px;
  margin-left: 0;
  flex: 1;
}

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}
.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.login-logo .logo-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #e9b045, #c07f2b);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin-bottom: 0.75rem;
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
}
.login-logo h1 {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
}
.login-logo p {
  color: #a8b2d8;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
.login-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}
.login-card h2 {
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.login-card .subtitle {
  color: #a8b2d8;
  font-size: 0.85rem;
  margin-bottom: 1.75rem;
}
.login-card .form-label {
  color: #a8b2d8;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.login-card .input-wrapper {
  position: relative;
}
.login-card .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #4a5568;
  pointer-events: none;
}
.login-card .form-control {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  padding-left: 2.75rem;
}
.login-card .form-control::placeholder {
  color: #4a5568;
}
.login-card .form-control:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: #e9a745;
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
  color: white;
}
.login-card .form-control:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #1a2a4a inset !important;
  -webkit-text-fill-color: white !important;
}
.login-card .form-check-label {
  color: #a8b2d8;
  font-size: 0.85rem;
}
.login-card .btn-login {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #e99445, #c07f2b);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(233, 69, 96, 0.4);
}
.login-card .btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.5);
}
.login-card .btn-login:active {
  transform: translateY(0);
}
.login-card .alert-error {
  background: rgba(233, 69, 96, 0.15);
  border: 1px solid rgba(233, 69, 96, 0.3);
  border-radius: 10px;
  color: #ffba6b;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}
.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: #4a5568;
  font-size: 0.8rem;
}
/* ===== SIDEBAR MOBILE ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 899;
}
.sidebar-overlay.show {
  display: block;
}

.detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #6b7280;
  font-size: 0.92rem;
}

.detail-breadcrumb a {
  color: #1f6fb2;
  text-decoration: none;
  font-weight: 500;
}

.detail-breadcrumb a:hover {
  text-decoration: underline;
}

.detail-breadcrumb .breadcrumb-separator {
  color: #9ca3af;
}

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0 !important;
  }
  .pos-content {
    margin-left: 0;
  }
}
/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .main-content {
    margin-left: 0;
  }
  .pos-content {
    margin-left: 0;
  }
}
