:root {
  --bg: #fafafb;
  --sidebar: #303030;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #000000;
  --success: #12b981;
  --danger: #ef4444;
  --radius: 16px;
  --shadow: 0 12px 28px rgba(2, 8, 23, .07);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: Inter, system-ui, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text)
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh
}

/* ------------------------------- */
/* SIDEBAR                         */
/* ------------------------------- */

.sidebar {
  background: #262626;
  color: #f9fafb;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-radius: 0;
  /* Remove radius for full height look or keep? Image shows full sidebar. Let's keep it simple. */
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #f9fafb;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 8px;
}

.brand img {
  width: 180px;
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

/* ------------------------------- */
/* MENU                            */
/* ------------------------------- */

.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu .item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  color: #a3a3a3;
  /* Muted text */
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all .2s ease;
  border: none;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.menu .item svg {
  opacity: 0.8;
}

.menu .item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.menu .item.active {
  background: #404040;
  color: #fff;
}

.menu .item:hover::before,
.menu .item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: #fff;
  border-radius: 4px 0 0 4px;
}

/* ------------------------------- */
/* CONTENT                         */
/* ------------------------------- */

.content {
  padding: 28px;
  display: grid;
  gap: 22px;
  position: relative;
  /* Anchor for translate widget */
}

.lang-switch {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 100;
}

.btn-lang {
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  min-width: 100px;
  overflow: hidden;
}

.lang-switch:hover .lang-dropdown {
  display: block;
}

.lang-dropdown a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
}

.lang-dropdown a:hover {
  background: #f3f4f6;
}

.flash {
  display: grid;
  gap: 10px
}

.flash-item {
  background: #fff3cd;
  border: 1px solid #f0c36d;
  color: #8a6d3b;
  padding: 10px 12px;
  border-radius: 12px
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px
}

.panel h1,
.panel h2 {
  margin: 0 0 12px 0;
  font-size: 1.25rem
}

.actions {
  margin-top: 12px
}

.btn {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-weight: 600
}

.btn.primary {
  background: var(--primary);
  border-color: transparent;
  color: #fff
}

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

.dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  background: #f9fafb;
  cursor: pointer;
  transition: all .15s ease
}

.dropzone:hover {
  background: #f3f4f6
}

.dropzone.drag {
  background: #eef2ff;
  border-color: #6366f1
}

.dz-icon {
  font-size: 28px;
  margin-bottom: 6px
}

.dz-title {
  font-weight: 700
}

.dz-sub {
  color: var(--muted);
  font-size: .95rem
}

.dz-file {
  margin-top: 8px;
  color: #111827;
  font-size: .9rem;
  opacity: .8
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px
}

.list a {
  color: var(--text);
  text-decoration: none
}

.table-wrap {
  overflow: auto
}

.table {
  width: 100%;
  border-collapse: collapse
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  text-align: left
}

.table th {
  color: var(--muted)
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: .8rem
}

.badge.success {
  background: #d1fae5;
  color: #065f46
}

.badge.danger {
  background: #fee2e2;
  color: #991b1b
}

.badge.warning {
  background: #fef3c7;
  color: #92400e
}

.truncate {
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.verify-result .result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 14px
}

.status {
  font-size: 28px;
  line-height: 1
}

.status.ok {
  color: var(--success)
}

.status.bad {
  color: var(--danger)
}

.status.warning {
  color: #f59e0b
}

.status.unknown {
  color: #9ca3af
}

.status-text {
  font-weight: 800
}

.status-text.ok {
  color: var(--success)
}

.status-text.bad {
  color: var(--danger)
}

.status-text.warning {
  color: #f59e0b
}

.grid-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px
}

.grid-details label {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: 4px
}

.grid-details code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 6px
}

.btn.success {
  background: var(--success);
  border-color: transparent;
  color: #fff
}

.btn.warning {
  background: #f59e0b;
  border-color: transparent;
  color: #fff
}

/* Small screen mode */
@media (max-width: 860px) {
  .layout {
    grid-template-columns: 88px 1fr
  }

  .brand span {
    display: none
  }
}