/* ==========================================
   DIGITIZING DEPOT - PROFESSIONAL DASHBOARD
   Premium Enterprise UI Theme
   ========================================== */

:root {
  /* Core Colors - Dark + Orange Theme */
  --dd-primary: #FF6B35;        /* Orange Accent */
  --dd-accent: #FF9A6A;         /* Lighter Orange */
  --dd-orange: #FF6B35;         /* Primary Orange */
  --dd-danger: #FF6B6B;         /* Red */
  --dd-success: #34D399;        /* Green */
  
  /* Grayscale / Dark */
  --dd-white: #FFFFFF;
  --dd-text-primary: #E6E9F2;
  --dd-text-secondary: #B8C0D6;
  --dd-border: rgba(255, 255, 255, 0.06);
  --dd-bg-light: #0e0f12;
  --dd-bg-lighter: #0a0a0c;
  
  /* Spacing */
  --g1: 0.5rem;
  --g2: 1rem;
  --g3: 1.5rem;
  --g4: 2rem;
  --g5: 2.5rem;
  --g6: 3rem;
  
  /* Typography */
  --head: 'Orbitron', sans-serif;
  --body: 'Rajdhani', sans-serif;
  
  /* Effects */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: linear-gradient(180deg, #070707 0%, #0b0d10 100%);
  color: var(--dd-text-primary);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x: hidden;
}

/* ======== LAYOUT ======== */
.dd-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: transparent;
}

.dd-sidebar {
  background: linear-gradient(180deg, #050505 0%, #000000 100%);
  border-right: 1px solid rgba(255,255,255,0.04);
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  width: 260px;
  z-index: 100;
  box-shadow: 0 12px 40px rgba(10, 10, 20, 0.06);
  display: flex;
  flex-direction: column;
}

/* Custom themed scrollbar for sidebar nav only */
.dd-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,107,35,0.5) transparent;
  padding: 2rem 0;
}

.dd-sidebar-nav::-webkit-scrollbar { width: 8px; }
.dd-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.dd-sidebar-nav::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(255,107,35,0.12), rgba(255,107,35,0.22)); border-radius: 6px; opacity: 0.6; transition: opacity 0.2s ease; }
.dd-sidebar-nav:hover::-webkit-scrollbar-thumb { opacity: 1; }

.dd-sidebar-logo {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  text-align: center;
}

.dd-sidebar-logo img {
  max-width: 100%;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(255,107,35,0.12));
}

.dd-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}
.dd-sidebar-title { display:flex; align-items:center; gap:0.6rem; color:var(--dd-text-secondary); font-weight:800; }
.dd-sidebar-title .dd-sidebar-dot { width:10px; height:10px; border-radius:50%; background: linear-gradient(45deg,var(--dd-primary),var(--dd-accent)); box-shadow:0 6px 18px rgba(255,107,35,0.08); }
.dd-sidebar-btn { background: rgba(255,255,255,0.02); border:1px solid rgba(255,255,255,0.02); padding:0.45rem; border-radius:10px; color:var(--dd-text-secondary); cursor:pointer; }
.dd-sidebar-btn:hover { background: rgba(255,107,35,0.04); color:var(--dd-primary); }

.dd-sidebar-nav {
  padding: 2rem 0;
}

/* Section labels inside sidebar */
.dd-nav-section {
  padding: 0.8rem 1.5rem;
  color: var(--dd-text-secondary);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
  margin-bottom: 0.3rem;
}
.dd-nav-section:before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--dd-primary), rgba(255,107,35,0.6));
  box-shadow: 0 6px 18px rgba(255,107,35,0.06);
}

.dd-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  color: var(--dd-text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s var(--ease);
  border-left: 3px solid transparent;
  cursor: pointer;
}

/* Badges on nav items */
.dd-nav-item .badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.badge--new { background: linear-gradient(90deg, #FFCE9E, #FFB37A); color: #2b1a08; }
.badge--hot { background: linear-gradient(90deg, #FFD27A, #FF9A4A); color: #2b1a08; }

.dd-nav-item:hover {
  background: rgba(255,255,255,0.02);
  color: var(--dd-primary);
  border-left-color: var(--dd-primary);
  padding-left: calc(1.5rem + 3px);
}

.dd-nav-item.active {
  background: linear-gradient(90deg, rgba(255,107,35,0.12) 0%, transparent 100%);
  color: var(--dd-primary);
  border-left-color: var(--dd-primary);
  padding-left: calc(1.5rem + 3px);
  font-weight: 700;
}

/* subtle gloss/wave effect on the sidebar */
.dd-sidebar::after {
  content: '';
  position: absolute;
  left: -46px;
  top: 10%;
  width: 420px;
  height: 260px;
  background: radial-gradient(ellipse at 20% 50%, rgba(255,107,35,0.08) 0%, transparent 28%), linear-gradient(90deg, rgba(255,107,35,0.03), transparent 60%);
  transform: rotate(-8deg);
  filter: blur(20px) saturate(110%);
  pointer-events: none;
  opacity: 0.95;
  animation: waveMove 9s linear infinite;
}

@keyframes waveMove {
  0% { transform: translateX(0) rotate(-8deg); }
  50% { transform: translateX(-12px) rotate(-8deg); }
  100% { transform: translateX(0) rotate(-8deg); }
}

.dd-nav-item i {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.dd-nav-item i { color: var(--dd-text-secondary); transition: color 0.25s var(--ease); }
.dd-nav-item.active i { color: var(--dd-primary); }

/* Larger nav targets for accessibility */
.dd-nav-item { font-size: 1rem; padding: 1.1rem 1.5rem; }

/* Focus styles */
a:focus, button:focus, .dd-input:focus, .dd-select:focus, .dd-textarea:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255,107,35,0.12);
}

.dd-main-content {
  grid-column: 2;
  padding: 2.5rem;
  background: transparent;
  animation: fadeIn 0.5s ease-in-out;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Responsive sidebar behavior */
@media (max-width: 1024px) {
  .dd-sidebar { left: -320px; transition: left 0.25s var(--ease); }
  .dd-sidebar.is-open { left: 0; }
  .dd-main-content { margin-left: 0; padding: 1.25rem; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ======== HEADER ======== */
.dd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.dd-header-left h1 {
  font-family: var(--head);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--dd-text-primary);
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.dd-breadcrumb {
  font-size: 0.95rem;
  color: var(--dd-text-secondary);
  font-weight: 600;
}

.dd-user-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dd-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--dd-primary) 0%, rgba(255,107,35,0.95) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 6px 20px rgba(255,107,35,0.12);
}

/* Large avatar block for profile */
.dd-avatar-large {
  width: 150px;
  height: 150px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 900;
  color: #000;
  background: linear-gradient(135deg, var(--dd-primary), #cf7a00);
  margin-bottom: var(--g4);
}

.dd-profile-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--g5);
}

.dd-profile-field {
  padding: var(--g2);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 8px;
  color: var(--dd-white);
}

.dd-user-name {
  font-weight: 700;
  color: var(--dd-text-primary);
  font-size: 1rem;
}

.dd-user-role {
  font-size: 0.85rem;
  color: var(--dd-text-secondary);
  font-weight: 600;
}

/* ======== PAGE TITLE ======== */
.dd-page-title {
  font-family: var(--head);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--dd-text-primary);
  letter-spacing: 0.02em;
  margin: 0;
  text-transform: uppercase;
}

/* ======== STATS GRID ======== */
.dd-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dd-stat-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.015) 100%);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  border: 1px solid rgba(255,255,255,0.03);
  transition: all 0.3s var(--ease);
}

.dd-stat-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.dd-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(255,107,35,0.12);
  color: var(--dd-primary);
}

.accent-primary { color: var(--dd-primary) !important; }
.accent-muted { color: var(--dd-text-secondary) !important; }

/* Quick-action tiles */
.qa-tile {
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
  display: block;
}
.qa-tile:hover { transform: translateY(-6px); border-color: rgba(122,63,242,0.12); }
.qa-tile .icon { font-size: 2rem; display: block; margin-bottom: 0.6rem; }
.qa-tile-title { font-weight: 700; color: var(--dd-text-primary); }
.qa-tile--purple { background: linear-gradient(135deg, rgba(255,107,35,0.06) 0%, rgba(255,107,35,0.03) 100%); }
.qa-tile--muted { background: linear-gradient(135deg, rgba(255,255,255,0.01) 0%, rgba(255,255,255,0.01) 100%); }

.dd-stat-content {
  flex: 1;
}

.dd-stat-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--dd-text-primary);
  font-family: var(--head);
}

.dd-stat-label {
  font-size: 0.85rem;
  color: var(--dd-text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.3rem;
}

/* ======== CARDS ======== */
.dd-card {
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.35) 100%);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  margin-bottom: 2rem;
  transition: all 0.3s var(--ease);
}

.dd-card--accent {
  border-left: 4px solid var(--dd-primary);
}

.dd-card--muted {
  border-left: 4px solid rgba(255,255,255,0.04);
}

.dd-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.dd-card-header {
  padding: 1.25rem 1.5rem;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

.dd-card-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--dd-text-primary);
  font-family: var(--head);
  letter-spacing: 0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dd-card-body {
  padding: 1.5rem;
}

/* ======== FORMS ======== */
.dd-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dd-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
}

.dd-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dd-form-group.full {
  grid-column: 1 / -1;
}

.dd-form-label {
  font-family: var(--head);
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--dd-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dd-form-input,
.dd-form-textarea,
.dd-form-select,
.dd-input,
.dd-textarea,
.dd-select {
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 10px;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--dd-text-primary);
  transition: all 0.2s var(--ease);
  background: rgba(255,255,255,0.02);
}

.dd-form-input:focus,
.dd-form-textarea:focus,
.dd-form-select:focus,
.dd-input:focus,
.dd-textarea:focus,
.dd-select:focus {
  outline: none;
  border-color: var(--dd-primary);
  background: rgba(255,255,255,0.03);
  box-shadow: 0 0 0 6px rgba(255,107,35,0.08);
}

.dd-form-input::placeholder,
.dd-form-textarea::placeholder,
.dd-input::placeholder,
.dd-textarea::placeholder {
  color: var(--dd-text-secondary);
  font-weight: 500;
}

/* Inline code token */
.dd-code {
  background: rgba(255,107,35,0.06);
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--dd-primary);
  font-weight: 700;
}

.dd-form-textarea,
.dd-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.dd-form-select,
.dd-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F39C12' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 20px;
  padding-right: 2.5rem;
}

.dd-form-select option,
.dd-select option {
  /* Dark dropdown background to match dashboard theme and improve readability */
  background: var(--dd-bg-lighter);
  color: var(--dd-text-primary);
  padding: 0.6rem 0.8rem;
  font-weight: 600;
}

/* Disabled/placeholder options should appear muted */
.dd-form-select option[disabled],
.dd-select option[disabled] {
  color: var(--dd-text-secondary);
}

/* Hover and selected states for options (where supported) */
.dd-form-select option:hover,
.dd-select option:hover,
.dd-form-select option:checked,
.dd-select option:checked {
  background: rgba(255,107,35,0.06);
  color: var(--dd-text-primary);
}

/* optgroup styling for grouped selects */
.dd-form-select optgroup,
.dd-select optgroup {
  background: transparent;
  color: var(--dd-text-secondary);
}

.dd-required {
  color: var(--dd-danger);
  font-weight: 900;
  margin-left: 0.3rem;
}

/* ======== FILE UPLOAD ======== */
.dd-file-upload {
  border: 2px dashed var(--dd-primary);
  border-radius: 12px;
  padding: 2.2rem 1.6rem;
  text-align: center;
  cursor: pointer;
  background: transparent;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.dd-file-upload::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(243, 156, 18, 0.08);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: 0;
}

.dd-file-upload:hover {
  border-color: var(--dd-primary);
  background: rgba(243, 156, 18, 0.1);
}

.dd-file-upload:hover::before {
  opacity: 1;
}

.dd-file-upload i {
  font-size: 2.8rem;
  color: var(--dd-primary);
  margin-bottom: 0.8rem;
  display: block;
  position: relative;
  z-index: 1;
}

.dd-file-upload p {
  color: var(--dd-text-primary);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0.6rem 0;
  position: relative;
  z-index: 1;
}

.dd-file-upload p:hover {
  color: var(--dd-primary);
}

.dd-file-upload small {
  color: var(--dd-text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  display: block;
  margin-top: 0.6rem;
  position: relative;
  z-index: 1;
}

/* File list */
.dd-file-list {
  margin-top: 0.8rem;
}

.dd-file-list .file-row {
  padding: 0.75rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  display: flex;
  gap: 0.8rem;
  align-items: center;
  transition: all 0.2s var(--ease);
}

.dd-file-list .file-row:hover {
  background: var(--dd-bg-light);
  border-color: var(--dd-primary);
}

.dd-file-list .file-row i {
  color: var(--dd-primary);
  font-size: 1rem;
  width: 24px;
}

/* Dragover state */
.dd-file-upload.is-dragover {
  border-color: var(--dd-primary);
  background: rgba(255,107,35,0.02);
}

.dd-file-list .file-row .name {
  color: var(--dd-text-primary);
  font-size: 0.95rem;
  font-weight: 600;
}

/* ======== BUTTONS ======== */
.dd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
  font-size: 0.85rem;
  padding: 0.95rem 1.4rem;
  border-radius: 10px;
  border: none;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.dd-btn-primary {
  background: linear-gradient(135deg, var(--dd-primary) 0%, #FF6B35 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.dd-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(243, 156, 18, 0.45);
}

.dd-btn-primary:active {
  transform: translateY(0);
}

.dd-btn-secondary {
  background: var(--dd-bg-light);
  color: var(--dd-text-primary);
  border: 1.5px solid var(--dd-border);
}

.dd-btn-secondary:hover {
  background: white;
  border-color: var(--dd-primary);
  color: var(--dd-primary);
}

.dd-btn-ghost {
  background: transparent;
  color: var(--dd-text-primary);
  border: 1.5px solid var(--dd-border);
}

.dd-btn-ghost:hover {
  background: var(--dd-bg-light);
  border-color: var(--dd-primary);
  color: var(--dd-primary);
}

/* Small button variant */
.dd-btn--small { padding: 0.5rem 0.85rem; font-size: 0.82rem; }

/* ======== FORM ACTIONS ======== */
.dd-form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--dd-border);
}

@media (max-width: 640px) {
  .dd-form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .dd-form-actions .dd-btn {
    width: 100%;
  }
}

/* ======== TABLES ======== */
.dd-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0,0,0,0.5);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dd-table thead {
  background: linear-gradient(90deg, var(--dd-primary) 0%, #FF6B35 100%);
  color: white;
}

.dd-table th {
  padding: 1.2rem;
  text-align: left;
  font-weight: 900;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--head);
}

.dd-table td {
  padding: 1.05rem 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  color: var(--dd-text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.dd-table tbody tr:hover {
  background: var(--dd-bg-light);
}

.dd-table tbody tr:last-child td {
  border-bottom: none;
}

/* ======== ALERTS ======== */
.dd-alert {
  padding: 1.2rem 1.5rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.dd-alert-success {
  background: rgba(81, 207, 102, 0.1);
  color: var(--dd-success);
  border-left: 4px solid var(--dd-success);
}

.dd-alert-danger {
  background: rgba(255, 107, 107, 0.1);
  color: var(--dd-danger);
  border-left: 4px solid var(--dd-danger);
}

/* ======== RESPONSIVE ======== */
@media (max-width: 1024px) {
  .dd-container {
    grid-template-columns: 1fr;
  }

  .dd-sidebar {
    position: static;
    height: auto;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0;
  }

  .dd-sidebar-logo {
    flex: 1;
    padding: 1rem;
    border-right: 2px solid var(--dd-border);
    border-bottom: none;
  }

  .dd-sidebar-nav {
    display: flex;
    gap: 0;
    padding: 0;
    flex: 2;
    overflow-x: auto;
  }

  .dd-nav-item {
    padding: 1rem;
    border-left: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }

  .dd-nav-item:hover,
  .dd-nav-item.active {
    border-left: none;
    border-bottom-color: var(--dd-primary);
  }

  .dd-main-content {
    grid-column: 1;
    padding: 2rem;
  }

  .dd-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .dd-page-title {
    font-size: 2rem;
  }

  .dd-stats-grid {
    grid-template-columns: 1fr;
  }

  .dd-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dd-container {
    grid-template-columns: 1fr;
  }

  .dd-main-content {
    padding: 1.5rem;
  }

  .dd-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .dd-page-title {
    font-size: 1.8rem;
  }

  .dd-breadcrumb {
    display: none;
  }

  .dd-card-header {
    padding: 1.5rem;
  }

  .dd-card-body {
    padding: 1.5rem;
  }

  .dd-form-grid {
    grid-template-columns: 1fr;
  }

  .dd-stats-grid {
    grid-template-columns: 1fr;
  }

  .dd-table th,
  .dd-table td {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

/* ======== UTILITIES ======== */
.dd-text-center { text-align: center; }
.dd-text-right { text-align: right; }
.dd-text-left { text-align: left; }

.dd-mt-1 { margin-top: var(--g1); }
.dd-mt-2 { margin-top: var(--g2); }
.dd-mt-3 { margin-top: var(--g3); }
.dd-mt-4 { margin-top: var(--g4); }

.dd-mb-1 { margin-bottom: var(--g1); }
.dd-mb-2 { margin-bottom: var(--g2); }
.dd-mb-3 { margin-bottom: var(--g3); }
.dd-mb-4 { margin-bottom: var(--g4); }

.dd-hidden { display: none !important; }
.dd-visible { display: block !important; }

/* ======== MOBILE RESPONSIVE ======== */
/* Toggle button for mobile sidebar */
.dd-sidebar-toggle {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background: var(--dd-primary);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 0;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.3s var(--ease);
}

.dd-sidebar-toggle:hover {
  background: var(--dd-accent);
}

.dd-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
}

.dd-overlay.active {
  display: block;
}

/* Tablet (1024px and below) - HIDE DESKTOP SIDEBAR, SHOW MOBILE DRAWER */
@media (max-width: 1024px) {
  .dd-sidebar {
    display: none;
  }

  .dd-container {
    grid-template-columns: 1fr;
  }

  .dd-main-content {
    margin-left: 0;
    padding-top: 0;
  }

  .dd-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .dd-mobile-drawer {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #050505 0%, #000000 100%);
    z-index: 200;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255,255,255,0.04);
    padding: 0;
  }

  .dd-mobile-drawer.active {
    transform: translateX(0);
  }

  .dd-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    display: none;
  }

  .dd-mobile-overlay.active {
    display: block;
  }

  html, body {
    overflow-x: hidden;
  }

  body.mobile-drawer-open {
    overflow: hidden;
  }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
  html, body {
    font-size: 15px;
  }

  .dd-container {
    grid-template-columns: 1fr;
  }

  .dd-sidebar {
    display: none;
  }

  .dd-container {
    grid-template-columns: 1fr;
  }

  .dd-main-content {
    padding: 1rem !important;
    margin-top: 60px !important;
  }

  .dd-form-group {
    margin-bottom: 1rem;
  }

  .dd-form-section {
    padding: 1.5rem 1rem;
  }

  .dd-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }

  .dd-input,
  .dd-select,
  .dd-textarea {
    padding: 0.75rem;
    font-size: 16px;
  }

  /* Grid adjustments */
  .dd-grid-2,
  [class*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns: repeat(2"] {
    grid-template-columns: 1fr !important;
  }

  .dd-grid-3,
  [class*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  .dd-feature {
    padding: 1.25rem;
  }

  .dd-feature h3 {
    font-size: 1.1rem;
  }

  .dd-feature p {
    font-size: 0.9rem;
  }

  .dd-step-circle {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    min-width: 40px;
    min-height: 40px;
  }

  /* Modal/overlay */
  .dd-modal {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
  }

  /* Alert boxes */
  .dd-alert {
    padding: 1rem;
    font-size: 0.95rem;
  }

  /* Profile view adjustments */
  .dd-profile-header {
    flex-direction: column !important;
    text-align: center;
  }

  .dd-profile-avatar {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }

  /* Reduce header padding */
  .dd-header {
    padding: 1rem;
  }

  .dd-header h1 {
    font-size: 1.5rem;
  }

  .dd-header p {
    font-size: 0.9rem;
  }

  /* Flexbox adjustments for responsive */
  .dd-flex {
    flex-direction: column !important;
  }

  /* Ensure forms stack properly */
  .dd-form-row,
  .dd-row {
    flex-direction: column !important;
  }

  .dd-form-row > *,
  .dd-row > * {
    width: 100% !important;
  }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
  html, body {
    font-size: 14px;
  }

  .dd-sidebar-toggle {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  .dd-main-content {
    padding: 0.75rem !important;
    margin-top: 45px !important;
  }

  .dd-form-section {
    padding: 1rem 0.75rem;
  }

  .dd-form-group {
    margin-bottom: 0.75rem;
  }

  .dd-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    width: 100%;
  }

  .dd-input,
  .dd-select,
  .dd-textarea {
    padding: 0.625rem;
    font-size: 16px;
    width: 100%;
  }

  .dd-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }

  .dd-nav-item {
    padding: 0.625rem 0.75rem;
    font-size: 0.9rem;
  }

  .dd-feature {
    padding: 1rem;
  }

  .dd-feature h3 {
    font-size: 1rem;
  }

  .dd-feature p {
    font-size: 0.85rem;
  }

  .dd-step-circle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    line-height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .dd-header {
    padding: 0.75rem;
  }

  .dd-header h1 {
    font-size: 1.25rem;
  }

  .dd-profile-avatar {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
  }

  /* Stack form fields on extra small screens */
  .dd-form-actions {
    flex-direction: column !important;
    gap: 0.5rem;
  }

  .dd-form-actions button {
    width: 100%;
  }

  /* Sidebar width adjustment */
  .dd-sidebar {
    width: 85vw !important;
    max-width: 260px;
  }
}

/* Extra small (360px and below) */
@media (max-width: 360px) {
  html, body {
    font-size: 13px;
  }

  .dd-main-content {
    padding: 0.5rem !important;
  }

  .dd-sidebar-logo {
    padding: 1rem 0.75rem;
  }

  .dd-sidebar-logo img {
    height: 40px;
  }

  .dd-sidebar-toggle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .dd-main-content {
    margin-top: 40px !important;
  }
}
