:root {
  --bg: #eef3f8;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #687385;
  --line: #dbe4ee;
  --brand: #0a6f8a;
  --brand-dark: #075369;
  --accent: #c8954a;
  --success: #1f9d63;
  --warning: #c8954a;
  --sidebar: #0b1220;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(10, 111, 138, 0.16), transparent 34rem),
    radial-gradient(circle at 85% 0%, rgba(200, 149, 74, 0.14), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
}

.login-visual {
  position: relative;
  overflow: hidden;
  padding: 64px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(5, 10, 20, 0.94), rgba(10, 111, 138, 0.64)),
    url("https://commons.wikimedia.org/wiki/Special:FilePath/Malaga_skyline_from_Gibralfaro_-_panoramio.jpg");
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-visual::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(2px);
}

.login-visual h1 {
  max-width: 560px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  position: relative;
  z-index: 1;
}

.login-badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.login-badges span,
.secure-note {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.login-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px;
}

.login-box {
  width: min(480px, 100%);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.86);
  padding: 42px;
  box-shadow: 0 34px 90px rgba(23, 32, 42, 0.18);
  backdrop-filter: blur(20px);
}

.login-box h2 {
  margin: 0;
  font-size: 36px;
  letter-spacing: -0.05em;
}

.login-box p {
  color: var(--muted);
}

.secure-note {
  margin: 20px 0 4px;
  border-color: rgba(10, 111, 138, 0.16);
  background: rgba(10, 111, 138, 0.08);
  color: var(--brand-dark);
}

.admin-logo {
  height: 70px;
  width: auto;
  margin-bottom: 28px;
}

.field {
  margin-top: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 16px;
  font: inherit;
  background: #fbfcfd;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search:focus {
  border-color: rgba(10, 111, 138, 0.55);
  box-shadow: 0 0 0 4px rgba(10, 111, 138, 0.1);
  background: #fff;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--brand), #0f8dac);
  color: #fff;
  padding: 13px 18px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(10, 111, 138, 0.22);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(10, 111, 138, 0.28);
}

.btn.dark {
  background: var(--sidebar);
}

.btn.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.btn.full {
  width: 100%;
  margin-top: 24px;
}

.btn-close:focus,
.nav-link:focus {
  box-shadow: none;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(7, 13, 24, 0.98)),
    var(--sidebar);
  color: #fff;
  padding: 28px 18px;
  overflow: auto;
}

.sidebar .admin-logo {
  height: 62px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.sidebar-title {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav a {
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 14px 15px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 750;
}

.side-nav i {
  width: 20px;
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.58);
}

.side-nav a.active i,
.side-nav a:hover i {
  color: #fff;
}

.side-nav a.active,
.side-nav a:hover {
  border-color: rgba(255, 255, 255, 0.13);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  color: #fff;
}

.admin-main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(219, 228, 238, 0.78);
  background: rgba(238, 243, 248, 0.82);
  padding: 18px 34px;
  backdrop-filter: blur(16px);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-dot {
  position: relative;
  border: 1px solid rgba(31, 157, 99, 0.18);
  border-radius: 999px;
  background: rgba(31, 157, 99, 0.1);
  color: var(--success);
  padding: 9px 13px 9px 28px;
  font-size: 13px;
  font-weight: 900;
}

.live-dot::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  transform: translateY(-50%);
}

.search {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.86);
  outline: none;
}

.admin-content {
  padding: 34px;
}

.admin-hero {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  margin-bottom: 30px;
  border: 1px solid rgba(10, 111, 138, 0.14);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(234, 246, 250, 0.92)),
    radial-gradient(circle at top right, rgba(10, 111, 138, 0.16), transparent 18rem);
  padding: 32px;
  box-shadow: 0 24px 70px rgba(23, 32, 42, 0.1);
}

.admin-hero h2 {
  max-width: 780px;
  margin: 18px 0 0;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.admin-hero p {
  max-width: 700px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.admin-hero-preview {
  align-self: stretch;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  padding: 24px;
}

.admin-hero-preview span,
.admin-hero-preview p {
  color: var(--muted);
}

.admin-hero-preview strong {
  display: block;
  margin: 18px 0 8px;
  color: var(--brand);
  font-size: 62px;
  letter-spacing: -0.06em;
}

.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(36px, 4vw, 58px);
  letter-spacing: -0.05em;
}

.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat-card,
.panel,
.editor-card,
.media-card {
  border: 1px solid rgba(219, 228, 238, 0.9);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 48px rgba(23, 32, 42, 0.08);
  backdrop-filter: blur(16px);
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 100px;
  height: 100px;
  border-radius: 999px;
  background: rgba(10, 111, 138, 0.08);
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: 44px;
  letter-spacing: -0.04em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  margin-top: 22px;
}

.dashboard-grid.advanced {
  grid-template-columns: 0.9fr 1.1fr;
}

.panel {
  padding: 26px;
}

.panel h2 {
  margin: 0 0 18px;
}

.task-list,
.activity-list {
  display: grid;
  gap: 12px;
}

.task,
.activity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
}

.text-admin-link {
  color: var(--brand);
  font-weight: 900;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.badge.green {
  background: rgba(31, 157, 99, 0.12);
  color: var(--success);
}

.badge.gold {
  background: rgba(200, 149, 74, 0.16);
  color: #9c6d27;
}

.badge.blue {
  background: rgba(10, 111, 138, 0.12);
  color: var(--brand);
}

.table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(23, 32, 42, 0.08);
}

.property-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 850;
}

.chip.active {
  border-color: rgba(10, 111, 138, 0.24);
  background: rgba(10, 111, 138, 0.1);
  color: var(--brand);
}

.crud-layout {
  display: grid;
  gap: 22px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-actions a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 7px 10px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.row-actions a.danger {
  color: #b42318;
}

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

th,
td {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.property-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.property-cell span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.property-cell img {
  width: 86px;
  height: 62px;
  border-radius: 16px;
  object-fit: cover;
}

.editor-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
}

.editor-card {
  padding: 28px;
}

.crud-form {
  scroll-margin-top: 92px;
}

.content-table {
  margin-bottom: 22px;
}

.form-help {
  margin: -8px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.check-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.check-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfd;
  padding: 12px 14px;
  color: var(--ink);
  font-weight: 800;
}

.check-list input {
  width: 16px;
  height: 16px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tool {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 9px 12px;
  color: var(--muted);
  font-weight: 850;
}

.fake-editor {
  min-height: 380px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 253, 0.92)),
    url("https://commons.wikimedia.org/wiki/Special:FilePath/Malaga_skyline_from_Gibralfaro_-_panoramio.jpg");
  background-size: cover;
  background-position: center;
  padding: 28px;
}

.quick-admin {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.quick-admin a {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
  padding: 22px;
  font-weight: 900;
}

.quick-admin i {
  display: block;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 22px;
}

.fake-editor h2 {
  font-size: 36px;
  letter-spacing: -0.04em;
}

.fake-editor p:not(.badge) {
  max-width: 620px;
  color: #344054;
  font-size: 17px;
  line-height: 1.65;
}

.block-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.block-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 15px 16px;
}

.block-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.media-card {
  overflow: hidden;
}

.media-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.media-card div {
  padding: 14px;
}

.media-card strong {
  display: block;
}

.media-card span {
  color: var(--muted);
  font-size: 13px;
}

.media-actions {
  margin-top: 12px;
}

.translations-card {
  margin-top: 22px;
}

.settings-section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.settings-section-title h2 {
  margin: 0;
}

.settings-section-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.translation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.translation-status {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
  padding: 20px;
}

.translation-status strong {
  display: block;
  margin-top: 14px;
  font-size: 22px;
}

.translation-status p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.translations-table {
  margin-top: 10px;
}

.cms-modal {
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
}

.cms-modal .modal-header,
.cms-modal .modal-footer {
  border-color: var(--line);
  background: #f8fbfd;
}

.cms-modal .modal-title {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.modal-kicker {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cms-tabs {
  border-bottom: 1px solid var(--line);
  gap: 8px;
}

.cms-tabs .nav-link {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
}

.cms-tabs .nav-link.active {
  border-color: rgba(10, 111, 138, 0.22);
  background: rgba(10, 111, 138, 0.1);
  color: var(--brand);
}

.form-control,
.form-select {
  border-color: var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(10, 111, 138, 0.5);
  box-shadow: 0 0 0 0.25rem rgba(10, 111, 138, 0.1);
}

.form-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.upload-drop {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 2px dashed rgba(10, 111, 138, 0.28);
  border-radius: 24px;
  background: rgba(10, 111, 138, 0.06);
  padding: 28px;
  text-align: center;
}

.upload-drop i {
  color: var(--brand);
  font-size: 46px;
}

.upload-drop strong {
  margin-top: 10px;
  font-size: 20px;
}

.upload-drop span {
  color: var(--muted);
}

@media (max-width: 980px) {
  body {
    background:
      radial-gradient(circle at 50% 0%, rgba(10, 111, 138, 0.16), transparent 24rem),
      var(--bg);
  }

  .login-page,
  .admin-layout,
  .dashboard-grid,
  .editor-layout,
  .admin-hero,
  .form-grid,
  .translation-grid {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 42vh;
    padding: 34px 24px;
  }

  .login-visual h1 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .login-card {
    padding: 24px 16px 38px;
  }

  .login-box {
    border-radius: 26px;
    padding: 28px 22px;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 18px 14px;
  }

  .sidebar .admin-logo {
    height: 54px;
    margin-bottom: 14px;
  }

  .sidebar-title {
    margin-bottom: 12px;
  }

  .side-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .side-nav a {
    flex: 0 0 auto;
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .topbar {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .top-actions {
    justify-content: stretch;
  }

  .top-actions .btn,
  .topbar .btn {
    width: 100%;
  }

  .search {
    width: 100%;
    border-radius: 16px;
    font-size: 16px;
  }

  .admin-content {
    padding: 18px 14px 34px;
  }

  .page-title {
    display: grid;
    gap: 14px;
    align-items: start;
  }

  .page-title h1 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .page-title .btn {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    border-radius: 20px;
    padding: 20px;
  }

  .stat-card strong {
    font-size: 34px;
  }

  .panel,
  .editor-card,
  .table-card,
  .media-card {
    border-radius: 22px;
  }

  .panel,
  .editor-card {
    padding: 20px;
  }

  .task,
  .activity,
  .block-list div,
  .settings-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .table-card {
    overflow-x: auto;
  }

  table {
    min-width: 860px;
  }

  th,
  td {
    padding: 14px;
  }

  .property-toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .property-toolbar::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: 0 0 auto;
  }

  .property-cell img {
    width: 68px;
    height: 52px;
  }

  .row-actions {
    min-width: 220px;
  }

  .form-grid {
    gap: 0;
  }

  .field input,
  .field select,
  .field textarea {
    min-height: 48px;
    font-size: 16px;
  }

  .form-actions .btn {
    width: 100%;
  }

  .fake-editor {
    min-height: 300px;
    border-radius: 20px;
    padding: 22px;
  }

  .fake-editor h2 {
    font-size: 30px;
  }

  .editor-toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tool {
    flex: 0 0 auto;
  }

  .media-card img {
    height: 170px;
  }

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

@media (max-width: 520px) {
  .stats-grid,
  .media-grid,
  .quick-admin {
    grid-template-columns: 1fr;
  }

  .login-badges {
    display: grid;
  }

  .admin-logo {
    height: 58px;
  }

  .btn,
  .btn.ghost,
  .btn.dark {
    width: 100%;
  }

  .media-card img {
    height: 210px;
  }
}
