/* Custom styles for SFP HTML */

/* Sidebar styling */
.sidebar {
  width: 280px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  background-color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease-in-out;
}

.dark .sidebar {
  background-color: #1e293b;
}

.sidebar-header {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.dark .sidebar-header {
  border-color: #334155;
}

.sidebar-logo-text {
  margin-left: 0.75rem;
}

.sidebar-content {
  padding: 1.25rem 0;
  height: calc(100% - 5rem);
  overflow-y: auto;
}

.sidebar-menu-header {
  padding: 0.5rem 1.25rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #94a3b8;
}

.sidebar-menu {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  color: #64748b;
  transition: all 0.2s;
  position: relative;
  text-decoration: none;
}

.dark .sidebar-menu {
  color: #94a3b8;
}

.sidebar-menu:hover, .sidebar-menu.active {
  color: #0ea5e9;
  background-color: #f1f5f9;
}

.dark .sidebar-menu:hover, .dark .sidebar-menu.active {
  color: #38bdf8;
  background-color: #334155;
}

.sidebar-menu-icon {
  display: flex;
  align-items: center;
  margin-right: 0.75rem;
}

.sidebar-menu-text {
  flex: 1;
}

.sidebar-menu-arrow {
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.sidebar-menu.active .sidebar-menu-arrow {
  transform: rotate(90deg);
}

.sidebar-submenu {
  padding-left: 1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

.sidebar-menu.active + .sidebar-submenu {
  max-height: 500px;
}

.sidebar-submenu-item {
  display: block;
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  color: #64748b;
  text-decoration: none;
  transition: all 0.2s;
}

.dark .sidebar-submenu-item {
  color: #94a3b8;
}

.sidebar-submenu-item:hover, .sidebar-submenu-item.active {
  color: #0ea5e9;
}

.dark .sidebar-submenu-item:hover, .dark .sidebar-submenu-item.active {
  color: #38bdf8;
}

/* Header styling */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 0;
}

.dark .header {
  background-color: #1e293b;
  border-color: #334155;
}

/* Main wrapper */
.wrapper {
  margin-left: 280px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Content area */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Card styling */
.card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  margin-bottom: 1.5rem;
}

.dark .card {
  background-color: #1e293b;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.dark .card-header {
  border-color: #334155;
}

.card-body {
  padding: 1.25rem;
}

/* Footer styling */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background-color: white;
}

.dark .footer {
  background-color: #1e293b;
  border-color: #334155;
}

/* Badge styling */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background-color: #dcfce7;
  color: #16a34a;
}

.badge-warning {
  background-color: #fef9c3;
  color: #ca8a04;
}

.badge-danger {
  background-color: #fee2e2;
  color: #dc2626;
}

.badge-secondary {
  background-color: #e5e7eb;
  color: #4b5563;
}

.dark .badge-success {
  background-color: rgba(22, 163, 74, 0.2);
  color: #4ade80;
}

.dark .badge-warning {
  background-color: rgba(202, 138, 4, 0.2);
  color: #facc15;
}

.dark .badge-danger {
  background-color: rgba(220, 38, 38, 0.2);
  color: #f87171;
}

.dark .badge-secondary {
  background-color: rgba(75, 85, 99, 0.2);
  color: #9ca3af;
}

/* Form elements */
.input, .select, .textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background-color: white;
  color: #1e293b;
  transition: border-color 0.2s;
}

.dark .input, .dark .select, .dark .textarea {
  background-color: #1e293b;
  border-color: #475569;
  color: #f1f5f9;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.btn-primary {
  background-color: #0ea5e9;
  color: white;
}

.btn-primary:hover {
  background-color: #0284c7;
}

.btn-primary-outline {
  background-color: transparent;
  border: 1px solid #0ea5e9;
  color: #0ea5e9;
}

.btn-primary-outline:hover {
  background-color: #0ea5e9;
  color: white;
}

.btn-success {
  background-color: #16a34a;
  color: white;
}

.btn-success:hover {
  background-color: #15803d;
}

.btn-success-outline {
  background-color: transparent;
  border: 1px solid #16a34a;
  color: #16a34a;
}

.btn-success-outline:hover {
  background-color: #16a34a;
  color: white;
}

.btn-secondary {
  background-color: #64748b;
  color: white;
}

.btn-secondary:hover {
  background-color: #475569;
}

.btn-secondary-outline {
  background-color: transparent;
  border: 1px solid #64748b;
  color: #64748b;
}

.dark .btn-secondary-outline {
  border-color: #94a3b8;
  color: #94a3b8;
}

.btn-secondary-outline:hover {
  background-color: #64748b;
  color: white;
}

.dark .btn-secondary-outline:hover {
  background-color: #94a3b8;
  color: #1e293b;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 500;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.dark .table th {
  background-color: #334155;
  color: #cbd5e1;
  border-color: #475569;
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #334155;
}

.dark .table td {
  border-color: #475569;
  color: #e2e8f0;
}

.table tbody tr:hover {
  background-color: #f8fafc;
}

.dark .table tbody tr:hover {
  background-color: #1e293b;
}

/* Tab styling */
.tabs-list {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid #e5e7eb;
}

.dark .tabs-list {
  border-color: #475569;
}

.tabs-item {
  margin-right: 0.25rem;
}

.tabs-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 2px solid transparent;
  color: #64748b;
  transition: all 0.2s;
}

.dark .tabs-btn {
  color: #94a3b8;
}

.tabs-btn:hover, .tabs-btn.active {
  color: #0ea5e9;
}

.tabs-btn.active {
  border-bottom-color: #0ea5e9;
}

.tabs-pane {
  display: none;
}

.tabs-pane.active {
  display: block;
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(0); /* Always show sidebar */
    position: fixed;
  }
  
  .wrapper {
    margin-left: 280px; /* Always maintain wrapper margin */
  }
}

/* Helper classes */
.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar-circle {
  border-radius: 9999px;
  overflow: hidden;
}

.avatar-img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  right: 0;
  margin-top: 0.5rem;
  min-width: 10rem;
  background-color: white;
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: none;
  z-index: 50;
}

.dark .dropdown-content {
  background-color: #1e293b;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

.dropdown.open .dropdown-content {
  display: block;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: #334155;
  text-decoration: none;
}

.dark .dropdown-link {
  color: #e2e8f0;
}

.dropdown-link:hover {
  background-color: #f1f5f9;
}

.dark .dropdown-link:hover {
  background-color: #334155;
}

.dropdown-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  color: #334155;
  cursor: pointer;
}

.dark .dropdown-btn {
  color: #e2e8f0;
}

.dropdown-btn:hover {
  background-color: #f1f5f9;
}

.dark .dropdown-btn:hover {
  background-color: #334155;
}

/* Animation class for feather icons */
.feather {
  height: 1em;
  width: 1em;
  overflow: visible;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: currentColor;
}
