:root {
  --dp-black: #0b0b0b;
  --dp-yellow: #ffd600;
  --dp-white: #ffffff;
  --dp-muted: #a8a8a8;
  --dp-panel: #151515;
  --dp-border: #292929;
}
html { font-size: 16px; min-height: 100%; }
body { min-height: 100vh; margin: 0; background: var(--dp-black); color: var(--dp-white); font-family: Montserrat, "Segoe UI", Arial, sans-serif; }
a { color: inherit; }
.dp-header { background: rgba(11,11,11,.96); border-bottom: 1px solid var(--dp-border); }
.dp-nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.dp-brand { display: flex; align-items: center; gap: 10px; color: var(--dp-yellow); text-decoration: none; font-size: 1.3rem; font-weight: 600; }
.dp-brand img { width: 42px; height: 42px; object-fit: contain; }
.dp-brand span strong, .dp-wordmark strong { color: var(--dp-white); }
.dp-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.dp-links a { color: #ddd; text-decoration: none; font-size: .92rem; }
.dp-links a:hover { color: var(--dp-yellow); }
.dp-logout { margin: 0; }
.dp-logout button { padding: 0; border: 0; background: transparent; color: #ddd; font: inherit; font-size: .92rem; cursor: pointer; }
.dp-logout button:hover { color: var(--dp-yellow); }
.dp-main { min-height: calc(100vh - 132px); padding-top: 42px; padding-bottom: 42px; }
.dp-footer { min-height: 56px; border-top: 1px solid var(--dp-border); color: #777; display: flex; align-items: center; font-size: .82rem; }
.dp-home, .dp-login-wrap { min-height: calc(100vh - 216px); display: grid; place-items: center; }
.dp-home-card, .dp-login-card { width: min(100%, 460px); text-align: center; }
.dp-hero-logo { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 14px 32px rgba(255,214,0,.16)); }
.dp-login-logo { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 10px 26px rgba(255,214,0,.14)); }
.dp-wordmark { margin-top: 10px; color: var(--dp-yellow); font-size: 2rem; font-weight: 600; letter-spacing: -.04em; }
.dp-home-card p, .dp-login-card > p, .dp-panel > p { color: var(--dp-muted); line-height: 1.65; }
.dp-home-card p { margin: 18px auto 28px; max-width: 420px; }
.dp-button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 0 24px; border: 0; border-radius: 8px; background: var(--dp-yellow); color: #111; text-decoration: none; font-weight: 700; transition: transform .15s ease, filter .15s ease; }
.dp-button:hover { color: #111; filter: brightness(1.04); transform: translateY(-1px); }
.dp-login-card { padding: 32px; background: var(--dp-panel); border: 1px solid var(--dp-border); border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.32); text-align: left; }
.dp-login-card .dp-login-logo, .dp-login-card .dp-wordmark { display: block; margin-left: auto; margin-right: auto; text-align: center; }
.dp-login-card h1 { margin-top: 28px; font-size: 1.45rem; }
.dp-input { min-height: 46px; background: #0f0f0f; border-color: #333; color: white; }
.dp-input:focus { background: #0f0f0f; color: white; border-color: var(--dp-yellow); box-shadow: 0 0 0 .2rem rgba(255,214,0,.12); }
.form-check-input:checked { background-color: var(--dp-yellow); border-color: var(--dp-yellow); }
.dp-panel h1 { margin: 8px 0 8px; font-weight: 700; }
.dp-eyebrow { color: var(--dp-yellow); font-size: .75rem; font-weight: 700; letter-spacing: .14em; }
.dp-card-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dp-card { padding: 22px; border: 1px solid var(--dp-border); border-radius: 12px; background: var(--dp-panel); text-decoration: none; }
.dp-card strong, .dp-card span { display: block; }
.dp-card strong { color: var(--dp-yellow); margin-bottom: 7px; }
.dp-card span { color: var(--dp-muted); font-size: .9rem; }
.dp-card:hover { border-color: #4b4200; }
@media (max-width: 767px) {
  .dp-nav { align-items: flex-start; flex-direction: column; padding-top: 14px; padding-bottom: 14px; }
  .dp-links { gap: 14px; }
  .dp-main { padding-top: 24px; }
  .dp-card-grid { grid-template-columns: 1fr; }
  .dp-login-card { padding: 24px 20px; }
}

.dp-page-head { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:24px; }
.dp-table-wrap { overflow-x:auto; border:1px solid var(--dp-border); border-radius:12px; }
.dp-table { width:100%; border-collapse:collapse; background:var(--dp-panel); }
.dp-table th,.dp-table td { padding:14px 16px; text-align:left; border-bottom:1px solid var(--dp-border); vertical-align:middle; }
.dp-table tbody td { padding-top:17px; padding-bottom:17px; border-bottom:0; }
.dp-table tbody tr { border-bottom:2px solid #343434; }
.dp-table tbody tr:last-child { border-bottom:0; }
.dp-table tbody tr:hover { background:rgba(255,255,255,.025); }
.dp-table th { color:var(--dp-yellow); font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; }
.dp-table tr:last-child td { border-bottom:0; }
.dp-actions { display:flex; gap:12px; align-items:center; white-space:nowrap; }
.dp-actions form { margin:0; }
.dp-actions a,.dp-link-danger,.dp-form-actions a { color:#ddd; background:none; border:0; padding:0; text-decoration:none; cursor:pointer; }
.dp-link-danger { color:#ff8b8b; }
.dp-form-panel { max-width:760px; }
.dp-form { margin-top:28px; display:grid; gap:8px; }
.dp-form label { margin-top:10px; font-weight:600; }
.dp-form input,.dp-form textarea,.dp-form select { min-height:46px; padding:10px 12px; border:1px solid #333; border-radius:8px; background:#0f0f0f; color:white; }
.dp-form textarea { height:92px; resize:vertical; }
.dp-form input:focus,.dp-form textarea:focus,.dp-form select:focus { outline:none; border-color:var(--dp-yellow); box-shadow:0 0 0 .2rem rgba(255,214,0,.10); }
.dp-form span.field-validation-error,.dp-validation { color:#ff8b8b; }
.dp-form-actions { margin-top:18px; display:flex; align-items:center; gap:18px; }
.dp-alert { margin:18px 0; padding:12px 14px; border:1px solid #665b00; border-radius:8px; background:#1d1a00; }
.dp-alert-success { border-color:#236b3a; background:#0d2816; color:#b9f6ca; transition:opacity .35s ease, transform .35s ease; }
.dp-alert-success.dp-alert-hiding { opacity:0; transform:translateY(-4px); }
.dp-alert-error { border-color:#663333; background:#1f0d0d; }
.dp-search { margin:18px 0; display:flex; align-items:center; gap:10px; }
.dp-search input { flex:1; min-width:220px; min-height:42px; padding:9px 12px; border:1px solid #333; border-radius:8px; background:#0f0f0f; color:white; }
.dp-search input:focus { outline:none; border-color:var(--dp-yellow); box-shadow:0 0 0 .2rem rgba(255,214,0,.10); }
.dp-search a { color:#ddd; text-decoration:none; }
.dp-pagination { margin-top:18px; display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.dp-pagination a,.dp-pagination span { min-width:34px; padding:7px 10px; border:1px solid #333; border-radius:7px; color:#ddd; text-align:center; text-decoration:none; }
.dp-pagination .is-current { border-color:var(--dp-yellow); color:var(--dp-yellow); }
.dp-pagination small { margin-left:auto; color:var(--dp-muted); }
.dp-breadcrumb-filter { display:flex; flex-wrap:wrap; align-items:center; gap:5px; }
.dp-breadcrumb-filter a { color:var(--dp-yellow); text-decoration:none; }
.dp-breadcrumb-filter a:hover { text-decoration:underline; }
.dp-breadcrumb-filter span { color:var(--dp-muted); }
.dp-product-cell { display:flex; align-items:center; gap:12px; min-width:240px; }
.dp-product-actions { justify-content:center; }
.dp-product-thumb-button { width:56px; height:56px; flex:0 0 56px; padding:3px; border:1px solid #3a3a3a; border-radius:8px; background:#fff; cursor:zoom-in; overflow:hidden; }
.dp-product-thumb { width:100%; height:100%; object-fit:contain; display:block; }
.dp-product-thumb-placeholder { width:56px; height:56px; flex:0 0 56px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; box-sizing:border-box; border:1px solid #3a3a3a; border-radius:8px; background:#181818; color:#8f8f8f; text-align:center; }
.dp-product-thumb-placeholder-icon { font-size:22px; line-height:1; }
.dp-product-thumb-placeholder small { font-size:8px; line-height:1.05; white-space:nowrap; }
.dp-image-lightbox[hidden] { display:none; }
.dp-image-lightbox { position:fixed; inset:0; z-index:2000; display:flex; align-items:center; justify-content:center; padding:40px; background:rgba(0,0,0,.82); }
.dp-image-lightbox img { max-width:min(1100px,92vw); max-height:88vh; object-fit:contain; border-radius:10px; background:#fff; box-shadow:0 20px 70px rgba(0,0,0,.55); }
.dp-image-lightbox-close { position:fixed; top:18px; right:24px; width:44px; height:44px; border:0; border-radius:50%; background:#222; color:#fff; font-size:30px; line-height:1; cursor:pointer; }
.dp-edit-image-preview { width:140px; height:140px; margin:8px 0; padding:6px; border:1px solid #333; border-radius:10px; background:#fff; }
.dp-edit-image-preview img { width:100%; height:100%; object-fit:contain; display:block; }

.dp-form select { min-height:46px; padding:10px 12px; border:1px solid #333; border-radius:8px; background:#0f0f0f; color:white; }
.dp-form select:focus { outline:none; border-color:var(--dp-yellow); box-shadow:0 0 0 .2rem rgba(255,214,0,.10); }
.dp-link-action { color:var(--dp-yellow); background:none; border:0; padding:0; cursor:pointer; }

/* Dashboard */
.dp-dashboard-section { margin-top: 30px; padding: 24px; border: 1px solid var(--dp-border); border-radius: 16px; background: #101010; }
.dp-section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:18px; }
.dp-section-head h2 { margin:0 0 5px; font-size:1.12rem; }
.dp-section-head p { margin:0; color:var(--dp-muted); font-size:.9rem; }
.dp-section-head > a { color:var(--dp-yellow); text-decoration:none; font-size:.88rem; }
.dp-metric-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.dp-metric { min-width:0; padding:18px; border:1px solid var(--dp-border); border-radius:12px; background:var(--dp-panel); text-decoration:none; }
.dp-metric strong,.dp-metric span,.dp-metric small { display:block; }
.dp-metric strong { color:var(--dp-yellow); font-size:1.8rem; line-height:1; }
.dp-metric span { margin-top:8px; font-weight:700; }
.dp-metric small { margin-top:4px; color:var(--dp-muted); }
.dp-metric:hover,.dp-flow-grid a:hover { border-color:#5b5000; }
.dp-dashboard-warning { border-color:#665b00; background:#171500; }
.dp-empty-state { padding:22px; border:1px dashed #343434; border-radius:12px; color:var(--dp-muted); }
.dp-empty-state strong,.dp-empty-state span { display:block; }
.dp-empty-state strong { color:#ddd; margin-bottom:5px; }
.dp-flow-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.dp-flow-grid a { display:flex; align-items:center; gap:12px; padding:16px; border:1px solid var(--dp-border); border-radius:12px; background:var(--dp-panel); text-decoration:none; }
.dp-flow-grid b { display:grid; place-items:center; flex:0 0 32px; height:32px; border-radius:50%; background:var(--dp-yellow); color:#111; }
.dp-flow-grid span,.dp-flow-grid strong,.dp-flow-grid small { display:block; }
.dp-flow-grid small { margin-top:3px; color:var(--dp-muted); }
.dp-card-grid-4 { grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:0; }
.dp-card-grid-5 { grid-template-columns:repeat(5,minmax(0,1fr)); margin-top:0; }
.dp-dashboard-secondary { background:#0d0d0d; }
@media (max-width: 991px) {
  .dp-metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dp-flow-grid,.dp-card-grid-4,.dp-card-grid-5 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 575px) {
  .dp-page-head,.dp-section-head { align-items:flex-start; flex-direction:column; }
  .dp-metric-grid,.dp-flow-grid,.dp-card-grid-4,.dp-card-grid-5 { grid-template-columns:1fr; }
  .dp-dashboard-section { padding:18px; }
}
.dp-listing-stack { display:flex; flex-wrap:wrap; gap:8px; }
.dp-listing-stack a { display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid var(--dp-border); border-radius:8px; background:#0f0f0f; text-decoration:none; }
.dp-listing-stack a:hover { border-color:#5b5000; }
.dp-listing-stack strong { color:var(--dp-yellow); font-size:.82rem; }
.dp-listing-stack small { color:var(--dp-muted); }

/* Stable link states: Bootstrap's :hover must not override dark-theme links. */
.dp-actions a:hover, .dp-actions a:focus,
.dp-form-actions a:hover, .dp-form-actions a:focus { color:var(--dp-yellow); }
.dp-listing-stack a,
.dp-listing-stack a:visited { color:#ddd; }
.dp-listing-stack a:hover,
.dp-listing-stack a:focus { color:#fff; border-color:var(--dp-yellow); background:#171700; }
.dp-listing-stack a:hover strong,
.dp-listing-stack a:focus strong { color:var(--dp-yellow); }
.dp-listing-stack a:hover small,
.dp-listing-stack a:focus small { color:#ddd; }

.dp-form-section { margin:12px 0 8px; padding:20px; border:1px solid var(--dp-border); border-radius:12px; display:grid; gap:8px; }
.dp-form-section legend { width:auto; padding:0 8px; color:var(--dp-yellow); font-size:1rem; font-weight:700; }
.dp-form-section > p { margin:0 0 8px; color:var(--dp-muted); font-size:.9rem; }
.dp-form-section label { margin-top:8px; }
.dp-form-section small { color:var(--dp-muted); }

.dp-inline-create { margin-top:10px; padding:12px 14px; border:1px dashed var(--dp-border); border-radius:10px; }
.dp-inline-create summary { cursor:pointer; color:var(--dp-yellow); font-weight:700; }
.dp-inline-create[open] { display:grid; gap:8px; }
.dp-inline-create .dp-button { margin-top:8px; width:max-content; }
.dp-success { color:#9fe39f !important; font-weight:600; }
