/* Regulance Custom Styles */

/* ===== Base Styles ===== */
html {
  scroll-behavior: smooth;
}

/* ===== Card Enhancements ===== */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* ===== Sidebar Styles ===== */
.sidebar {
  transition: width 0.3s ease;
}

.sidebar .menu li a {
  border-radius: 0.5rem;
  margin: 0.125rem 0.5rem;
  transition: all 0.2s ease;
}

.sidebar .menu li a:hover {
  background-color: oklch(var(--b3));
}

.sidebar .menu li a.menu-active,
.sidebar .menu li a.active {
  background-color: oklch(var(--p) / 0.1);
  color: oklch(var(--p));
  font-weight: 500;
}

.sidebar .menu li a.menu-active svg,
.sidebar .menu li a.active svg {
  color: oklch(var(--p));
}

/* Collapsible menu groups */
.sidebar .menu details > summary {
  list-style: none;
  cursor: pointer;
  border-radius: 0.5rem;
  margin: 0.125rem 0.5rem;
  transition: all 0.2s ease;
}

.sidebar .menu details > summary::-webkit-details-marker {
  display: none;
}

/* Hide DaisyUI's default chevron */
.sidebar .menu details > summary::after {
  display: none;
}

.sidebar .menu details > summary:hover {
  background-color: oklch(var(--b3));
}

/* Submenu animation */
.sidebar .menu details > ul.menu-dropdown {
  overflow: hidden;
  max-height: 0;
  padding: 0;
  opacity: 0;
  transition: max-height 0.25s ease-out, opacity 0.2s ease-out, padding 0.2s ease-out;
}

.sidebar .menu details[open] > ul.menu-dropdown {
  max-height: 500px;
  padding-top: 0.25rem;
  opacity: 1;
}

/* Submenu styling */
.sidebar .menu-dropdown {
  padding-left: 0.75rem;
  margin-left: 0.875rem;
  border-left: 2px solid oklch(var(--bc) / 0.1);
}

.sidebar .menu-dropdown li a {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* ===== Button Enhancements ===== */
.btn {
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary {
  box-shadow: 0 1px 3px 0 rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}

/* ===== Input Focus States ===== */
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: oklch(var(--p));
  box-shadow: 0 0 0 3px oklch(var(--p) / 0.1);
}

/* ===== Table Enhancements ===== */
.table th {
  background-color: oklch(var(--b2));
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.table tr:hover td {
  background-color: oklch(var(--b2) / 0.5);
}

/* ===== Badge Variations ===== */
.badge-outline {
  background-color: transparent;
}

/* ===== Stats Enhancements ===== */
.stats {
  border-radius: 0.75rem;
}

.stat-title {
  opacity: 0.7;
  font-size: 0.875rem;
}

.stat-value {
  font-weight: 700;
}

/* ===== Tabs Enhancements ===== */
.tabs-box {
  background-color: oklch(var(--b2));
  padding: 0.25rem;
  border-radius: 0.75rem;
}

.tabs-box .tab {
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.tabs-box .tab-active {
  background-color: oklch(var(--b1));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===== Alert Styles ===== */
.alert {
  border-radius: 0.75rem;
}

/* ===== Dropdown Enhancements ===== */
.dropdown-content {
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* ===== Breadcrumbs ===== */
.breadcrumbs ul li a {
  transition: color 0.2s ease;
}

.breadcrumbs ul li a:hover {
  color: oklch(var(--p));
}

.breadcrumbs ul li + li::before {
  opacity: 0.5;
}

/* ===== Loading States ===== */
.skeleton {
  background: linear-gradient(90deg, oklch(var(--b2)) 25%, oklch(var(--b3)) 50%, oklch(var(--b2)) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: oklch(var(--b2));
}

::-webkit-scrollbar-thumb {
  background: oklch(var(--b3));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: oklch(var(--bc) / 0.3);
}

/* ===== Gradient Backgrounds ===== */
.bg-gradient-brand {
  background: linear-gradient(135deg, oklch(var(--p)) 0%, oklch(var(--s)) 100%);
}

.bg-gradient-brand-subtle {
  background: linear-gradient(135deg, oklch(var(--p) / 0.1) 0%, oklch(var(--s) / 0.1) 100%);
}

/* ===== Status Indicators ===== */
.status {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  display: inline-block;
}

.status-success {
  background-color: oklch(var(--su));
  box-shadow: 0 0 0 3px oklch(var(--su) / 0.2);
}

.status-error {
  background-color: oklch(var(--er));
  box-shadow: 0 0 0 3px oklch(var(--er) / 0.2);
}

.status-warning {
  background-color: oklch(var(--wa));
  box-shadow: 0 0 0 3px oklch(var(--wa) / 0.2);
}

.status-info {
  background-color: oklch(var(--in));
  box-shadow: 0 0 0 3px oklch(var(--in) / 0.2);
}

/* ===== Animations ===== */
.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

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

.animate-slide-in {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== Icon Sizing ===== */
.icon-sm { width: 1rem; height: 1rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 2rem; height: 2rem; }

/* ===== Empty States ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.empty-state-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  opacity: 0.3;
}

/* ===== Form Improvements ===== */
.form-control label.label {
  padding-bottom: 0.25rem;
}

.label-text {
  font-weight: 500;
}

/* ===== Responsive Utilities ===== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }
}
