/* php-version/assets/css/style.css */
:root {
  --primary: #facc15;
  --primary-hover: #eab308;
  --primary-light: #fef08a;
  --bg-dark: #020617;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #f1f5f9;
  --secondary: #0f172a;
  --success: #10b981;
  --danger: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background-color: #f8fafc;
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 50;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 0.25rem;
}

.nav-item i {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

.nav-item:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.nav-item:hover i {
  transform: translateX(3px);
}

.nav-item.active {
  background: var(--primary);
  color: black;
  box-shadow: 0 10px 25px -5px rgba(250, 204, 21, 0.4);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 3rem 4rem;
  max-width: 1600px;
}

/* Cards */
.stat-card {
  background: white;
  padding: 2.5rem;
  border-radius: 2.5rem;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: black;
  padding: 1rem 2rem;
  border-radius: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -10px rgba(250, 204, 21, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 550px;
  padding: 3.5rem;
  border-radius: 3.5rem;
  box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hide scrollbar in modal */
.modal-content::-webkit-scrollbar {
  display: none;
}

.modal-content {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

/* Filter Buttons */
.filter-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 1rem;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.2s;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
}

.filter-btn:hover {
  color: var(--text-main);
}

.filter-btn.active {
  background: white;
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Animations from Tailwind but defined here for safety */
.animate-in {
  animation-duration: 500ms;
  animation-fill-mode: both;
}

.fade-in {
  animation-name: fade-in;
}

.slide-in-from-left {
  animation-name: slide-in-from-left;
}

.slide-in-from-bottom-4 {
  animation-name: slide-in-from-bottom;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-in-from-left {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-in-from-bottom {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Node Studio Preview Container */
.preview-container {
  background: #020617;
  border-radius: 4rem;
  border: 16px solid #0f172a;
  box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

/* Content Cards */
.content-card {
  background: white;
  border-radius: 2.5rem;
  border: 2px solid var(--border);
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.content-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.content-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 8px rgba(250, 204, 21, 0.15);
}

/* Branch Cards */
.branch-card {
  background: white;
  border-radius: 2.5rem;
  border: 2px solid var(--border);
  position: relative;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.branch-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.branch-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 8px rgba(250, 204, 21, 0.15);
}

/* Bulk Actions Bar */
#bulk-actions,
#branch-bulk-actions,
#user-bulk-actions,
#config-bulk-actions {
  width: max-content;
  max-width: 90vw;
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
  background: #0f172a;
  border-radius: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slide-up-fade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0 !important;
}

#bulk-actions.hidden,
#branch-bulk-actions.hidden,
#user-bulk-actions.hidden,
#config-bulk-actions.hidden {
  display: none !important;
}

@keyframes slide-up-fade {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

#bulk-actions .w-12.h-12,
#branch-bulk-actions .w-12.h-12,
#user-bulk-actions .w-12.h-12,
#config-bulk-actions .w-12.h-12 {
  width: 2.5rem;
  height: 2.5rem;
}

#bulk-actions .p-3.5,
#branch-bulk-actions .p-3.5,
#user-bulk-actions .p-3.5,
#config-bulk-actions .p-3.5 {
  padding: 0.6rem;
}

.checkbox-indicator {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: white;
  z-index: 10;
}

.selected .checkbox-indicator {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
  box-shadow: 0 8px 16px -4px rgba(250, 204, 21, 0.5);
}

/* Professional Inputs */
input,
select,
textarea {
  transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.1) !important;
}

/* Tab Styles */
.media-tab {
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
}

.media-tab.active {
  background: white;
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tab-panel {
  animation: fade-in 0.3s ease-out;
}
