:root {
  --bg: #f4f1ec;
  --panel: #ffffff;
  --ink: #1d2329;
  --muted: #6c7781;
  --accent: #e05f2a;
  --accent-2: #235789;
  --border: #e6e1d9;
  --shadow: 0 14px 36px rgba(29, 35, 41, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body.dlm-body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 800px at 12% -10%, #fff3e6 0%, var(--bg) 45%, #eef2f5 100%);
}

.dlm-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.dlm-sidebar {
  padding: 24px 20px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f8f5f0 100%);
  position: sticky;
  top: 0;
  height: 100vh;
}

.dlm-brand {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.4px;
  font-size: 18px;
  margin-bottom: 18px;
}

.dlm-nav {
  display: grid;
  gap: 8px;
}

.dlm-nav-item,
.dlm-nav-group a {
  text-decoration: none;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background 160ms ease, transform 160ms ease;
}

.dlm-nav-item:hover,
.dlm-nav-group a:hover {
  background: rgba(29, 35, 41, 0.08);
  transform: translateY(-1px);
}

.dlm-nav-item.active {
  background: #1d2329;
  color: #ffffff;
}

.dlm-nav-title {
  margin: 14px 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}

.dlm-sidebar-note {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}

.dlm-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dlm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.dlm-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dlm-page-context {
  font-weight: 600;
  color: var(--muted);
}

.dlm-nav-toggle {
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.dlm-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(224, 95, 42, 0.12);
  border: 1px solid rgba(224, 95, 42, 0.2);
}

.dlm-user-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.dlm-user-highlight {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 18px rgba(224, 95, 42, 0.28);
}

.dlm-content {
  padding: 26px 28px 40px;
}

.content-wrapper {
  background: transparent;
}

.dlm-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dlm-page-title {
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 4px;
}

.dlm-page-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.dlm-page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dlm-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.dlm-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dlm-card-title {
  font-weight: 600;
  margin: 0 0 8px;
}

.content-header h1 {
  font-weight: 700;
  margin: 0 0 10px;
}

.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.box,
.small-box,
.login-box-body,
.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.box {
  padding: 16px;
}

.box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.box-title {
  font-weight: 600;
}

.small-box {
  padding: 18px;
  min-height: 140px;
}

.small-box .inner h3 {
  font-size: 28px;
  margin-top: 0;
}

.small-box.bg-green {
  background: #e9f7ef;
}

.small-box.bg-yellow {
  background: #fff5d9;
}

.small-box.bg-blue {
  background: #eaf0ff;
}

.small-box .icon {
  color: rgba(29, 35, 41, 0.25);
}

.small-box-footer {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-2);
  font-weight: 600;
}

.table {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}

.table > thead > tr > th,
.table > tbody > tr > td {
  border-color: var(--border);
  padding: 12px 10px;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #fbf9f6;
}

.btn {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 8px 12px;
  font-weight: 600;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border);
  color: var(--ink);
}

.btn-default {
  background: #ffffff;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--accent-2);
}

.form-control {
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: none;
}

.dlm-form {
  display: grid;
  gap: 16px;
}

.dlm-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dlm-table-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #f1e8dc;
  color: #6a4a2c;
  font-size: 12px;
  text-decoration: none;
  margin: 2px 4px 2px 0;
}

.dlm-table-actions a:hover {
  background: #e7dacb;
}

.dlm-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.main-footer {
  padding: 16px 28px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(440px, 100%);
  padding: 28px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
}

.auth-subtitle {
  color: var(--muted);
  margin-bottom: 18px;
}

.auth-footer {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 960px) {
  .dlm-shell {
    grid-template-columns: 1fr;
  }

  .dlm-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-110%);
    transition: transform 200ms ease;
    z-index: 30;
    width: 260px;
  }

  body.dlm-body.dlm-nav-open .dlm-sidebar {
    transform: translateX(0);
  }

  .dlm-topbar {
    position: sticky;
    top: 0;
  }
}

@media (max-width: 768px) {
  .dlm-topbar {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .dlm-topbar-left,
  .dlm-topbar-right {
    width: 100%;
  }

  .dlm-user {
    width: 100%;
    flex-wrap: wrap;
    border-radius: 12px;
    gap: 6px;
    padding: 8px;
  }

  .dlm-user-label {
    display: none;
  }

  .dlm-content {
    padding: 16px 14px 24px;
  }

  .main-footer {
    padding: 12px 14px;
  }

  .dlm-page-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .dlm-page-title {
    font-size: 22px;
  }

  .dlm-page-actions {
    width: 100%;
  }

  .dlm-page-actions .btn {
    width: 100%;
  }

  .match-result-form .nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
  }

  .match-result-form .tab-pane > div > label {
    display: block;
    min-width: 0 !important;
    margin-bottom: 4px;
  }

  .match-result-form .tab-pane > div > select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    margin-bottom: 8px;
  }

  .match-result-form .form-group {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .match-result-form .form-group .table {
    min-width: 620px;
  }

  .match-result-form .box-footer .btn {
    width: 100%;
  }
}
