/* Odoo-style Settings Redesign Styles */

.odoo-settings-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  margin-top: 15px;
}

.odoo-settings-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.odoo-save-btn {
  background: #7C4DFF;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(124, 77, 255, 0.3);
}

.odoo-save-btn:hover {
  background: #6C3EE8;
  transform: translateY(-1px);
}

.odoo-discard-btn {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 18px;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.odoo-discard-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.settings-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-right: 15px;
}

.settings-search-wrapper {
  position: relative;
  width: 280px;
}

.settings-search-wrapper input {
  width: 100%;
  padding: 8px 16px;
  padding-left: 36px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  transition: all 0.3s ease;
}

.settings-search-wrapper input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(124, 77, 255, 0.15);
  outline: none;
}

.odoo-settings-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: 100%;
}

/* Sidebar navigation */
.odoo-settings-nav {
  width: 240px;
  background: var(--surface2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 8px;
  gap: 4px;
  overflow-y: auto;
  flex-shrink: 0;
}

.setting-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.setting-nav-item:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.setting-nav-item.active {
  background: rgba(124, 77, 255, 0.1);
  color: var(--accent);
  font-weight: 700;
  border-right: 4px solid var(--accent);
  border-radius: 10px 0 0 10px; /* modified for RTL */
}

.setting-nav-icon {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
}

/* Panel content */
.odoo-settings-panel {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: var(--surface);
  scroll-behavior: smooth;
  height: 100%;
}

.settings-section {
  margin-bottom: 40px;
  animation: fadeIn 0.3s ease;
}

.settings-section h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

/* Settings Card Redesign */
.settings-section .settings-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 0 !important;
}

.settings-section .settings-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.settings-section .settings-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Button settings gear inside sections */
.section-settings-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.section-settings-btn:hover {
  background: rgba(124, 77, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.page-header-with-settings {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header-with-settings .page-header {
  margin-bottom: 0 !important;
}

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

/* Sidebar Navigation Grouping Section Headers */
.sidebar-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text3);
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 14px 6px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-section-title:first-of-type {
  margin-top: 4px;
  border-top: none;
}

/* ── Nav Accordion Group ─────────────────────── */
.nav-group {
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 4px;
}

.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text3);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
  margin-bottom: 2px;
}

.nav-group-header:hover {
  background: rgba(255,255,255,.04);
  color: var(--text2);
}

.nav-group-header.open {
  color: var(--accent);
  opacity: 1;
}

.nav-group-header.open .nav-group-arrow {
  transform: rotate(180deg) !important;
}

/* Items container: collapse animation */
.nav-group-items {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
  opacity: 0;
}

.nav-group-items.open {
  max-height: 300px;
  opacity: 1;
}

/* Sub-items indentation + connector */
.nav-sub-item {
  padding-right: 28px !important;
  position: relative;
  font-size: 13px !important;
}

.nav-sub-item::before {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text3);
  opacity: 0.5;
  transition: all .2s;
}

.nav-sub-item.active::before {
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 6px var(--glow);
}

/* Active group header highlight */
.nav-group-header.has-active {
  color: var(--accent) !important;
  opacity: 1;
}


[data-theme="snow"] .sidebar-section-title,
[data-theme="frost"] .sidebar-section-title,
[data-theme="sand"] .sidebar-section-title {
  border-top-color: rgba(0, 0, 0, 0.05);
  opacity: 0.75;
}

