/**
 * HerbalSpirit Cabinet & Auth Pages
 * Aesthetic: Botanical Apothecary — refined, organic, warm
 */

/* ============================================
   CABINET LAYOUT
   ============================================ */

.cabinet-wrapper {
  min-height: 60vh;
}

/* Page header with botanical texture */
.cabinet-header {
  background: linear-gradient(135deg, var(--herbal-dark) 0%, var(--herbal-primary) 60%, var(--herbal-medium) 100%);
  position: relative;
  overflow: hidden;
}

.cabinet-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5c0 0-8 12-8 20s3.6 8 8 8 8 0 8-8S30 5 30 5z' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
}

.cabinet-header .breadcrumb-light .breadcrumb-item a {
  color: var(--herbal-light);
}

.cabinet-header .breadcrumb-light .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.7);
}


/* ============================================
   SIDEBAR
   ============================================ */

.cabinet-sidebar {
  position: sticky;
  top: 100px;
}

.cabinet-sidebar .card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* User identity block */
.cabinet-user-block {
  padding: 1.5rem;
  background: linear-gradient(145deg, var(--herbal-bg-light) 0%, var(--herbal-bg-muted) 100%);
  border-bottom: 1px solid rgba(107, 124, 97, 0.12);
  text-align: center;
}

.cabinet-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-family: 'Spectral', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 12px rgba(107, 124, 97, 0.3);
  text-transform: uppercase;
}

.cabinet-user-name {
  font-family: 'Spectral', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--herbal-dark-text);
  margin-bottom: 0.15rem;
  line-height: 1.3;
}

.cabinet-user-email {
  font-size: 0.8rem;
  color: var(--herbal-medium);
  word-break: break-all;
}

/* Sidebar navigation */
.cabinet-nav {
  padding: 0.5rem 0;
}

.cabinet-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 0.65rem 1.5rem;
  color: var(--herbal-dark-text);
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.25s ease;
  text-decoration: none;
}

.cabinet-nav .nav-link i {
  width: 20px;
  text-align: center;
  margin-right: 0.65rem;
  font-size: 1rem;
  color: var(--herbal-medium);
  transition: color 0.25s ease;
}

.cabinet-nav .nav-link:hover {
  background-color: var(--herbal-bg-light);
  color: var(--herbal-primary);
  border-left-color: var(--herbal-accent);
}

.cabinet-nav .nav-link:hover i {
  color: var(--herbal-primary);
}

.cabinet-nav .nav-link.active {
  background-color: rgba(107, 124, 97, 0.08);
  color: var(--herbal-primary);
  border-left-color: var(--herbal-primary);
  font-weight: 600;
}

.cabinet-nav .nav-link.active i {
  color: var(--herbal-primary);
}

.cabinet-nav .nav-divider {
  height: 1px;
  background: var(--herbal-bg-muted);
  margin: 0.35rem 1.5rem;
}

.cabinet-nav .nav-link.text-danger {
  color: #c0392b;
}

.cabinet-nav .nav-link.text-danger i {
  color: #c0392b;
}

.cabinet-nav .nav-link.text-danger:hover {
  background-color: rgba(192, 57, 43, 0.06);
  border-left-color: #c0392b;
}


/* ============================================
   PROFILE CONTENT CARDS
   ============================================ */

.cabinet-card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.cabinet-card:hover {
  box-shadow: var(--shadow-lg);
}

.cabinet-card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--herbal-bg-muted);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cabinet-card .card-header h5 {
  font-family: 'Spectral', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--herbal-dark-text);
  margin: 0;
}

.cabinet-card .card-body {
  padding: 1.5rem;
}

/* Info row styling */
.cabinet-info-row {
  display: flex;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px dashed rgba(107, 124, 97, 0.12);
}

.cabinet-info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cabinet-info-label {
  flex-shrink: 0;
  width: 140px;
  font-size: 0.85rem;
  color: var(--herbal-medium);
  font-weight: 500;
}

.cabinet-info-value {
  font-size: 0.95rem;
  color: var(--herbal-dark-text);
  font-weight: 500;
}

.cabinet-info-value.empty {
  color: var(--herbal-accent);
  font-style: italic;
  font-weight: 400;
}


/* ============================================
   ORDER HISTORY
   ============================================ */

.cabinet-orders .table {
  margin-bottom: 0;
}

.cabinet-orders .table thead th {
  background: var(--herbal-bg-light);
  border-bottom: 2px solid var(--herbal-bg-muted);
  color: var(--herbal-dark-text);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem;
}

.cabinet-orders .table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  color: var(--herbal-dark-text);
  font-size: 0.9rem;
  border-bottom-color: var(--herbal-bg-light);
}

.cabinet-orders .table tbody tr:hover {
  background-color: var(--herbal-bg-light);
}

/* Order status badges */
.order-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.order-badge--new {
  background: rgba(52, 152, 219, 0.12);
  color: #2980b9;
}

.order-badge--confirmed {
  background: rgba(107, 124, 97, 0.15);
  color: var(--herbal-primary);
}

.order-badge--paid {
  background: rgba(39, 174, 96, 0.12);
  color: #27ae60;
}

.order-badge--cancelled {
  background: rgba(192, 57, 43, 0.1);
  color: #c0392b;
}

.order-badge--completed {
  background: rgba(107, 124, 97, 0.2);
  color: var(--herbal-dark);
}

/* Empty state */
.cabinet-empty {
  text-align: center;
  padding: 2.5rem 1rem;
}

.cabinet-empty i {
  font-size: 2.5rem;
  color: var(--herbal-accent);
  margin-bottom: 1rem;
  display: block;
}

.cabinet-empty p {
  color: var(--herbal-medium);
  font-size: 0.95rem;
  margin-bottom: 0;
}


/* ============================================
   PROFILE EDIT FORM
   ============================================ */

.cabinet-form .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--herbal-dark-text);
  margin-bottom: 0.35rem;
}

.cabinet-form .form-control {
  border-radius: 8px;
  border-color: var(--herbal-bg-muted);
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.cabinet-form .form-control:focus {
  border-color: var(--herbal-primary);
  box-shadow: 0 0 0 0.2rem rgba(107, 124, 97, 0.15);
}

.cabinet-form .btn-save {
  background: var(--gradient-primary);
  border: none;
  color: #fff;
  padding: 0.6rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.cabinet-form .btn-save:hover {
  box-shadow: var(--shadow-primary);
  transform: translateY(-1px);
}

.cabinet-form .btn-cancel {
  color: var(--herbal-medium);
  border: 1px solid var(--herbal-bg-muted);
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.25s ease;
  background: transparent;
}

.cabinet-form .btn-cancel:hover {
  border-color: var(--herbal-primary);
  color: var(--herbal-primary);
}


/* ============================================
   AUTH PAGES (Login, Signup, Password Reset)
   ============================================ */

.auth-wrapper {
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(107, 124, 97, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(166, 178, 149, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.auth-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(42, 54, 36, 0.1);
  overflow: hidden;
  position: relative;
}

.auth-card-accent {
  height: 4px;
  background: linear-gradient(90deg,
    var(--herbal-dark) 0%,
    var(--herbal-primary) 35%,
    var(--herbal-accent) 65%,
    var(--herbal-medium) 100%
  );
}

.auth-card .card-body {
  padding: 2rem 2rem 1.75rem;
}

.auth-title {
  font-family: 'Spectral', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--herbal-dark-text);
  text-align: center;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  text-align: center;
  color: var(--herbal-medium);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

/* Botanical leaf SVG decoration */
.auth-leaf {
  position: absolute;
  opacity: 0.04;
  pointer-events: none;
}

.auth-leaf--top {
  top: -20px;
  right: -15px;
  width: 120px;
  height: 120px;
  transform: rotate(25deg);
}

.auth-leaf--bottom {
  bottom: -25px;
  left: -10px;
  width: 100px;
  height: 100px;
  transform: rotate(-140deg);
}

/* Auth form fields */
.auth-form .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--herbal-dark-text);
  margin-bottom: 0.35rem;
}

.auth-form .form-control {
  border-radius: 8px;
  border-color: var(--herbal-bg-muted);
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.auth-form .form-control:focus {
  border-color: var(--herbal-primary);
  box-shadow: 0 0 0 0.2rem rgba(107, 124, 97, 0.15);
}

.auth-form .btn-auth {
  background: var(--gradient-primary);
  border: none;
  color: #fff;
  padding: 0.7rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.02em;
}

.auth-form .btn-auth:hover {
  box-shadow: var(--shadow-primary);
  transform: translateY(-1px);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.25rem 0;
  gap: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--herbal-bg-muted);
}

.auth-divider span {
  font-size: 0.8rem;
  color: var(--herbal-accent);
  font-weight: 500;
}

/* Auth links */
.auth-links {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--herbal-bg-light);
  margin-top: 0.5rem;
}

.auth-links a {
  color: var(--herbal-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-links a:hover {
  color: var(--herbal-dark);
  text-decoration: underline;
}

/* Alert styling override */
.auth-alert {
  border-radius: 8px;
  border: none;
  font-size: 0.88rem;
  padding: 0.75rem 1rem;
}

.auth-alert.alert-danger {
  background: rgba(192, 57, 43, 0.08);
  color: #c0392b;
}

.auth-alert.alert-success {
  background: rgba(107, 124, 97, 0.1);
  color: var(--herbal-dark);
}

/* Password field with toggle */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--herbal-accent);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--herbal-primary);
}


/* ============================================
   HEADER USER DROPDOWN
   ============================================ */

.navbar-tool.user-tool {
  position: relative;
}

.user-tool .navbar-tool-icon-box {
  position: relative;
}

/* Online indicator dot */
.user-tool .user-online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #27ae60;
  border-radius: 50%;
  border: 2px solid #fff;
}

/* User dropdown menu */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(42, 54, 36, 0.15);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
  z-index: 1050;
  border: 1px solid var(--herbal-bg-muted);
}

.user-tool:hover .user-dropdown,
.user-tool.show .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--herbal-bg-light);
}

.user-dropdown-header .user-name {
  font-family: 'Spectral', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--herbal-dark-text);
  line-height: 1.3;
}

.user-dropdown-header .user-email {
  font-size: 0.78rem;
  color: var(--herbal-medium);
}

.user-dropdown-link {
  display: flex;
  align-items: center;
  padding: 0.55rem 1rem;
  color: var(--herbal-dark-text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.user-dropdown-link i {
  width: 20px;
  margin-right: 0.6rem;
  color: var(--herbal-medium);
  font-size: 0.95rem;
  text-align: center;
  transition: color 0.2s;
}

.user-dropdown-link:hover {
  background: var(--herbal-bg-light);
  color: var(--herbal-primary);
}

.user-dropdown-link:hover i {
  color: var(--herbal-primary);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--herbal-bg-light);
  margin: 0.35rem 0;
}

.user-dropdown-link--danger {
  color: #c0392b;
}

.user-dropdown-link--danger i {
  color: #c0392b;
}

.user-dropdown-link--danger:hover {
  background: rgba(192, 57, 43, 0.06);
  color: #c0392b;
}


/* ============================================
   MESSAGES / ALERTS
   ============================================ */

.cabinet-alert {
  border-radius: 10px;
  border: none;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.cabinet-alert.alert-success {
  background: rgba(107, 124, 97, 0.1);
  color: var(--herbal-dark);
}


/* ============================================
   ANIMATIONS
   ============================================ */

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

.cabinet-animate {
  animation: cabinetFadeIn 0.4s ease forwards;
}

.cabinet-animate-delay-1 { animation-delay: 0.05s; opacity: 0; }
.cabinet-animate-delay-2 { animation-delay: 0.12s; opacity: 0; }
.cabinet-animate-delay-3 { animation-delay: 0.2s; opacity: 0; }

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

.auth-animate {
  animation: authSlideIn 0.5s ease forwards;
}


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991.98px) {
  .cabinet-sidebar {
    position: static;
  }

  .cabinet-sidebar .card {
    margin-bottom: 1rem;
  }

  .cabinet-user-block {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 1rem 1.25rem;
  }

  .cabinet-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.15rem;
    margin: 0 0.85rem 0 0;
    flex-shrink: 0;
  }

  .cabinet-nav .nav-link {
    padding: 0.55rem 1.25rem;
    font-size: 0.85rem;
  }

  .cabinet-info-label {
    width: 120px;
  }

  .auth-card .card-body {
    padding: 1.5rem 1.25rem 1.25rem;
  }
}

@media (max-width: 575.98px) {
  .cabinet-info-row {
    flex-direction: column;
    gap: 0.15rem;
  }

  .cabinet-info-label {
    width: auto;
    font-size: 0.8rem;
  }

  .cabinet-info-value {
    font-size: 0.9rem;
  }

  .cabinet-orders .table thead th,
  .cabinet-orders .table tbody td {
    font-size: 0.82rem;
    padding: 0.65rem 0.5rem;
  }
}
