/* ============================================================
   DirectorsChair Webapp — Apple-Inspired Design System
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #1C1C1E;
  --bg-secondary: #2C2C2E;
  --bg-tertiary: #3A3A3C;
  --bg-sidebar: #252528;
  --bg-header: #1C1C1E;

  --accent: #0A84FF;
  --accent-hover: #409CFF;
  --accent-muted: rgba(10, 132, 255, 0.15);
  --accent-subtle: rgba(10, 132, 255, 0.08);

  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-tertiary: rgba(255, 255, 255, 0.35);
  --text-quaternary: rgba(255, 255, 255, 0.2);

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-focus: rgba(10, 132, 255, 0.5);

  --success: #30D158;
  --warning: #FFD60A;
  --danger: #FF453A;
  --orange: #FF9F0A;
  --purple: #BF5AF2;
  --cyan: #64D2FF;
  --pink: #FF375F;
  --teal: #30D158;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.3);

  --sidebar-width: 240px;
  --header-height: 52px;

  --transition: 0.15s ease;
}

/* --- Light Theme Override --- */
[data-theme="light"] {
  --bg-primary: #F2F2F7;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #E5E5EA;
  --bg-sidebar: #F7F7F9;
  --bg-header: #F2F2F7;

  --accent: #007AFF;
  --accent-hover: #0056CC;
  --accent-muted: rgba(0, 122, 255, 0.1);
  --accent-subtle: rgba(0, 122, 255, 0.05);

  --text-primary: #1C1C1E;
  --text-secondary: rgba(0, 0, 0, 0.55);
  --text-tertiary: rgba(0, 0, 0, 0.35);
  --text-quaternary: rgba(0, 0, 0, 0.2);

  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  --border-focus: rgba(0, 122, 255, 0.5);

  --success: #34C759;
  --warning: #FF9F0A;
  --danger: #FF3B30;
  --orange: #FF9500;
  --purple: #AF52DE;
  --cyan: #32ADE6;
  --pink: #FF2D55;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .dc-switch .slider {
  background: #D1D1D6;
}

[data-theme="light"] .dc-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(0,0,0,0.4)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* --- Bootstrap Dark Override --- */
/* Override Bootstrap's default light theme to match our dark design */
.card {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--text-primary) !important;
}

.card-header {
  background-color: transparent !important;
  border-bottom-color: var(--border) !important;
  color: var(--text-primary) !important;
}

.card-body {
  color: var(--text-primary) !important;
}

.list-group-item {
  background-color: transparent !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

.list-group-item-action:hover {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

.table {
  color: var(--text-primary) !important;
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.03);
}

.table > thead {
  color: var(--text-tertiary) !important;
}

.btn-primary {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
}

.btn-primary:hover {
  background-color: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}

.btn-outline-primary {
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}

.btn-outline-primary:hover {
  background-color: var(--accent) !important;
  color: white !important;
}

.btn-outline-secondary {
  color: var(--text-secondary) !important;
  border-color: var(--border-strong) !important;
}

.btn-outline-secondary:hover {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

.form-control, .form-select {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

.form-control:focus, .form-select:focus {
  border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1) !important;
}

.form-check-input:checked {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
}

.alert {
  border-radius: var(--radius-md) !important;
}

.badge {
  font-weight: 600;
}

.bg-dark {
  background-color: var(--bg-tertiary) !important;
}

.bg-secondary {
  background-color: var(--bg-tertiary) !important;
}

.text-white-transparent-3 { color: rgba(255, 255, 255, 0.3) !important; }
.text-white-transparent-5 { color: rgba(255, 255, 255, 0.5) !important; }
.text-white-transparent-6 { color: rgba(255, 255, 255, 0.55) !important; }
.text-white-transparent-7 { color: rgba(255, 255, 255, 0.6) !important; }
.text-white-transparent-8 { color: rgba(255, 255, 255, 0.75) !important; }
.text-theme { color: var(--accent) !important; }
.bg-theme { background-color: var(--accent) !important; }

.border-white-transparent-1 { border-color: var(--border) !important; }

.page-header {
  color: var(--text-primary);
  font-weight: 700;
}

/* Override Bootstrap container within our layout */
.dc-content .container-fluid {
  padding: 0;
  max-width: none;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

::selection {
  background: var(--accent);
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- App Layout --- */
.dc-app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* --- Sidebar --- */
.dc-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
}

.dc-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.dc-sidebar-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.dc-sidebar-brand span {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.dc-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px;
}

.dc-nav-section {
  margin-bottom: 4px;
}

.dc-nav-header {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-tertiary);
  padding: 16px 10px 6px;
}

.dc-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.dc-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.dc-nav-item.active {
  background: var(--accent-muted);
  color: var(--accent);
}

.dc-nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.dc-nav-item .external-icon {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-quaternary);
}

.dc-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 10px;
}

/* Sidebar user section at bottom */
.dc-sidebar-user {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dc-sidebar-user .user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-muted);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.dc-sidebar-user .user-avatar img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.dc-sidebar-user .user-info {
  flex: 1;
  min-width: 0;
}

.dc-sidebar-user .user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dc-sidebar-user .user-role {
  font-size: 10px;
  color: var(--text-tertiary);
}

/* --- Main Content --- */
.dc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dc-header {
  height: var(--header-height);
  min-height: var(--header-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
  gap: 12px;
}

.dc-header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}

.dc-header-user:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dc-header-user .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.dc-header-user .avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-muted);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.dc-header-user .name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Dropdown menu */
.dc-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 4px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
}

.dc-dropdown.show {
  display: block;
}

.dc-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}

.dc-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.dc-dropdown-item.danger {
  color: var(--danger);
}

.dc-dropdown-item.danger:hover {
  background: rgba(255, 69, 58, 0.1);
}

.dc-dropdown-item i {
  width: 16px;
  text-align: center;
  font-size: 14px;
}

.dc-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}

/* --- Content Area --- */
.dc-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.dc-content-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 32px;
}

/* --- Page Headers --- */
.dc-page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0;
  color: var(--text-primary);
}

.dc-page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

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

.dc-page-header .dc-page-title {
  flex: 1;
}

/* --- Cards --- */
.dc-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}

.dc-card-hover:hover {
  border-color: var(--border-strong);
}

.dc-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dc-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dc-card-title i {
  color: var(--text-tertiary);
  font-size: 16px;
}

.dc-card-body {
  padding: 20px;
}

.dc-card-body-flush {
  padding: 0;
}

/* --- Stat Cards --- */
.dc-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color var(--transition);
}

.dc-stat-card:hover {
  border-color: var(--border-strong);
}

.dc-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.dc-stat-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.dc-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.dc-stat-icon.blue {
  background: rgba(10, 132, 255, 0.12);
  color: var(--accent);
}

.dc-stat-icon.green {
  background: rgba(48, 209, 88, 0.12);
  color: var(--success);
}

.dc-stat-icon.orange {
  background: rgba(255, 159, 10, 0.12);
  color: var(--orange);
}

.dc-stat-icon.purple {
  background: rgba(191, 90, 242, 0.12);
  color: var(--purple);
}

.dc-stat-icon.pink {
  background: rgba(255, 55, 95, 0.12);
  color: var(--pink);
}

.dc-stat-icon.cyan {
  background: rgba(100, 210, 255, 0.12);
  color: var(--cyan);
}

/* --- Buttons --- */
.dc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.dc-btn i {
  font-size: 14px;
}

.dc-btn-primary {
  background: var(--accent);
  color: white;
}

.dc-btn-primary:hover {
  background: var(--accent-hover);
  color: white;
}

.dc-btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.dc-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.dc-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.dc-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.dc-btn-danger {
  background: rgba(255, 69, 58, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 69, 58, 0.2);
}

.dc-btn-danger:hover {
  background: rgba(255, 69, 58, 0.2);
  color: var(--danger);
}

.dc-btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.dc-btn-lg {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-lg);
}

.dc-btn-block {
  width: 100%;
}

/* --- Badge --- */
.dc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.dc-badge-blue {
  background: rgba(10, 132, 255, 0.15);
  color: var(--accent);
}

.dc-badge-green {
  background: rgba(48, 209, 88, 0.15);
  color: var(--success);
}

.dc-badge-orange {
  background: rgba(255, 159, 10, 0.15);
  color: var(--orange);
}

.dc-badge-red {
  background: rgba(255, 69, 58, 0.15);
  color: var(--danger);
}

.dc-badge-purple {
  background: rgba(191, 90, 242, 0.15);
  color: var(--purple);
}

.dc-badge-gray {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

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

.dc-table thead th {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  background: var(--bg-tertiary);
}

.dc-table thead th:last-child {
  text-align: right;
}

.dc-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-primary);
  vertical-align: middle;
}

.dc-table tbody td:last-child {
  text-align: right;
}

.dc-table tbody tr:last-child td {
  border-bottom: none;
}

.dc-table tbody tr {
  transition: background var(--transition);
}

.dc-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.dc-table .text-muted {
  color: var(--text-secondary);
  font-size: 12px;
}

/* --- List Items --- */
.dc-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  color: var(--text-primary);
  text-decoration: none;
}

.dc-list-item:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.dc-list-item:last-child {
  border-bottom: none;
}

.dc-list-item .item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.dc-list-item .item-icon.folder {
  background: rgba(10, 132, 255, 0.12);
  color: var(--accent);
}

.dc-list-item .item-icon.file {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-tertiary);
}

.dc-list-item .item-content {
  flex: 1;
  min-width: 0;
}

.dc-list-item .item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.dc-list-item .item-subtitle {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.dc-list-item .item-meta {
  font-size: 12px;
  color: var(--text-quaternary);
  flex-shrink: 0;
}

.dc-list-item .item-chevron {
  color: var(--text-quaternary);
  font-size: 12px;
  flex-shrink: 0;
}

/* --- Project Cards --- */
.dc-project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
  color: var(--text-primary);
}

.dc-project-card:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.1);
}

.dc-project-card-body {
  padding: 20px;
}

.dc-project-card .project-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dc-project-card .project-name i {
  color: var(--accent);
}

.dc-project-card .project-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dc-project-card .project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dc-project-card .project-date {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Forms & Inputs --- */
.dc-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.dc-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
}

.dc-input::placeholder {
  color: var(--text-quaternary);
}

.dc-select {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.4)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.dc-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
}

.dc-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.dc-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.dc-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Toggle switch */
.dc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.dc-toggle:last-child {
  border-bottom: none;
}

.dc-toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.dc-toggle-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.dc-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.dc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.dc-switch .slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-tertiary);
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition);
}

.dc-switch .slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
}

.dc-switch input:checked + .slider {
  background: var(--accent);
}

.dc-switch input:checked + .slider::before {
  transform: translateX(18px);
}

/* --- Tabs --- */
.dc-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.dc-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}

.dc-tab:hover {
  color: var(--text-primary);
}

.dc-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.dc-tab i {
  font-size: 14px;
}

.dc-tab-content {
  display: none;
}

.dc-tab-content.active {
  display: block;
}

/* --- Breadcrumb --- */
.dc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.dc-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dc-breadcrumb a:hover {
  color: var(--accent-hover);
}

.dc-breadcrumb .separator {
  color: var(--text-quaternary);
  font-size: 10px;
}

.dc-breadcrumb .current {
  color: var(--text-secondary);
}

/* --- Timeline --- */
.dc-timeline-item {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.dc-timeline-item:last-child {
  border-bottom: none;
}

.dc-timeline-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.dc-timeline-icon.login {
  background: rgba(48, 209, 88, 0.12);
  color: var(--success);
}

.dc-timeline-icon.logout {
  background: rgba(255, 159, 10, 0.12);
  color: var(--orange);
}

.dc-timeline-icon.default {
  background: rgba(10, 132, 255, 0.12);
  color: var(--accent);
}

.dc-timeline-content {
  flex: 1;
  min-width: 0;
}

.dc-timeline-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.dc-timeline-detail {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.dc-timeline-time {
  font-size: 11px;
  color: var(--text-quaternary);
  flex-shrink: 0;
}

/* --- Alerts --- */
.dc-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dc-alert-success {
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.2);
  color: var(--success);
}

.dc-alert-danger {
  background: rgba(255, 69, 58, 0.1);
  border: 1px solid rgba(255, 69, 58, 0.2);
  color: var(--danger);
}

.dc-alert-warning {
  background: rgba(255, 159, 10, 0.1);
  border: 1px solid rgba(255, 159, 10, 0.2);
  color: var(--orange);
}

.dc-alert-info {
  background: rgba(10, 132, 255, 0.1);
  border: 1px solid rgba(10, 132, 255, 0.2);
  color: var(--accent);
}

.dc-alert-close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
}

.dc-alert-close:hover {
  opacity: 1;
}

/* --- Empty State --- */
.dc-empty {
  text-align: center;
  padding: 48px 24px;
}

.dc-empty-icon {
  font-size: 48px;
  color: var(--text-quaternary);
  margin-bottom: 16px;
}

.dc-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.dc-empty-text {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
}

/* --- Grid --- */
.dc-grid {
  display: grid;
  gap: 20px;
}

.dc-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.dc-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.dc-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
  .dc-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .dc-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dc-grid-4,
  .dc-grid-3,
  .dc-grid-2 {
    grid-template-columns: 1fr;
  }
}

.dc-row {
  display: grid;
  gap: 20px;
}

.dc-row-2-1 {
  grid-template-columns: 2fr 1fr;
}

.dc-row-1-1 {
  grid-template-columns: 1fr 1fr;
}

.dc-row-3-1 {
  grid-template-columns: 3fr 1fr;
}

@media (max-width: 1024px) {
  .dc-row-2-1,
  .dc-row-1-1,
  .dc-row-3-1 {
    grid-template-columns: 1fr;
  }
}

/* --- Utility --- */
.dc-flex {
  display: flex;
}

.dc-flex-center {
  display: flex;
  align-items: center;
}

.dc-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dc-gap-sm { gap: 8px; }
.dc-gap-md { gap: 16px; }
.dc-gap-lg { gap: 24px; }

.dc-mt-sm { margin-top: 8px; }
.dc-mt-md { margin-top: 16px; }
.dc-mt-lg { margin-top: 24px; }
.dc-mt-xl { margin-top: 32px; }

.dc-mb-sm { margin-bottom: 8px; }
.dc-mb-md { margin-bottom: 16px; }
.dc-mb-lg { margin-bottom: 24px; }

.dc-text-center { text-align: center; }
.dc-text-right { text-align: right; }
.dc-text-muted { color: var(--text-secondary); }
.dc-text-tertiary { color: var(--text-tertiary); }
.dc-text-accent { color: var(--accent); }
.dc-text-success { color: var(--success); }
.dc-text-warning { color: var(--warning); }
.dc-text-danger { color: var(--danger); }

.dc-font-sm { font-size: 12px; }
.dc-font-xs { font-size: 10px; }

.dc-flex-1 { flex: 1; min-width: 0; }
.dc-shrink-0 { flex-shrink: 0; }

.dc-hidden { display: none; }

/* --- Code / JSON --- */
.dc-code {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  color: var(--text-secondary);
  max-height: 500px;
  overflow-y: auto;
}

/* --- Avatar --- */
.dc-avatar {
  border-radius: 50%;
  object-fit: cover;
}

.dc-avatar-sm { width: 28px; height: 28px; }
.dc-avatar-md { width: 40px; height: 40px; }
.dc-avatar-lg { width: 80px; height: 80px; }
.dc-avatar-xl { width: 120px; height: 120px; }

.dc-avatar-placeholder {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 600;
}

/* --- Auth Pages (centered, no sidebar) --- */
.dc-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 32px;
}

.dc-auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
}

.dc-auth-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.dc-auth-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.dc-auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* --- Entity Counts / Summary Row --- */
.dc-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.dc-summary-item {
  text-align: center;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.dc-summary-item .value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.dc-summary-item .label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* --- Scene/File Content Blocks --- */
.dc-content-block {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 8px;
}

.dc-content-block .block-header {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Responsive sidebar --- */
@media (max-width: 768px) {
  .dc-sidebar {
    position: fixed;
    left: -260px;
    transition: left 0.3s ease;
  }

  .dc-sidebar.open {
    left: 0;
  }

  .dc-content {
    padding: 20px;
  }

  .dc-page-title {
    font-size: 22px;
  }
}

/* --- Separator --- */
.dc-separator {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* --- Input group (search) --- */
.dc-input-group {
  display: flex;
  gap: 0;
}

.dc-input-group .dc-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.dc-input-group .dc-btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* --- Feature list --- */
.dc-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
}

.dc-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent-muted);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.dc-feature-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dc-feature-desc {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* --- Pagination --- */
.dc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.dc-pagination-info {
  font-size: 13px;
  color: var(--text-secondary);
}

/* --- Inline switch (scaled down for table rows) --- */
.dc-switch-inline {
  display: inline-flex;
  position: relative;
  width: 34px;
  height: 20px;
  flex-shrink: 0;
}

.dc-switch-inline input {
  opacity: 0;
  width: 0;
  height: 0;
}

.dc-switch-inline .slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-tertiary);
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition);
}

.dc-switch-inline .slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
}

.dc-switch-inline input:checked + .slider {
  background: var(--accent);
}

.dc-switch-inline input:checked + .slider::before {
  transform: translateX(14px);
}

/* --- Filter chips --- */
.dc-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 20px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.dc-filter-chip:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.dc-filter-chip.active {
  background: var(--accent-muted);
  color: var(--accent);
  border-color: var(--accent);
}

/* --- Breadcrumb --- */
.dc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.dc-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.dc-breadcrumb a:hover {
  text-decoration: underline;
}

/* --- Warning & Danger buttons --- */
.dc-btn-warning {
  background: var(--orange);
  color: #000;
  border: none;
}

.dc-btn-warning:hover {
  background: #FFB340;
}

.dc-btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
}

.dc-btn-danger:hover {
  background: #FF6961;
}

/* --- Modal overlay --- */
.dc-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.dc-modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  padding: 24px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.dc-modal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.dc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
