@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=DM+Sans:wght@300;400;500&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #16181c;
  font-family: "DM Sans", sans-serif;
  color: #e8e4de;
}

/* ── Layout ── */
.layout {
  display: flex;
  min-height: 100vh;
  padding-top: 70px;
}

/* ── Sidebar ── */
.sidebar {
  width: 230px;
  background: rgba(255, 255, 255, 0.015);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 125px 0 36px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 24px;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  text-decoration: none;
  margin-right: 12px;
  border-radius: 0 4px 4px 0;
  border-left: 2px solid transparent;
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s;
}
.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
}
.sidebar-item.active {
  background: rgba(100, 160, 255, 0.08);
  border-left-color: #7aadff;
  color: #7aadff;
}
.sidebar-item i {
  width: 16px;
  text-align: center;
  font-size: 14px;
}

/* ── Main ── */
.main {
  margin-left: 230px;
  flex: 1;
  padding: 67px 48px 100px 48px;
  min-width: 0;
}

/* ── Header ── */
.main-header {
  margin-bottom: 40px;
}
.main-sup {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #7aadff;
  margin-bottom: 8px;
}
.main h1 {
  font-family: "Playfair Display", serif;
  font-size: 38px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 6px;
}
.main-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 300;
}

/* ── Cards principais ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-bottom: 3px;
}

.metric-card {
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
  display: flex;
  align-items: flex-start;
  gap: 18px;
  transition:
    border-color 0.25s,
    background 0.25s;
  cursor: default;
}
.metric-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.card-icon-wrap.green {
  background: rgba(100, 160, 255, 0.13);
  color: #90bfff;
}
.card-icon-wrap.blue {
  background: rgba(62, 91, 219, 0.15);
  color: #8faaf0;
}
.card-icon-wrap.amber {
  background: rgba(100, 130, 200, 0.15);
  color: #a0b8e8;
}
.card-icon-wrap.red {
  background: rgba(226, 75, 74, 0.13);
  color: #d97171;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}
.card-value {
  font-family: "Playfair Display", serif;
  font-size: 38px;
  font-weight: 400;
  color: #fff;
  line-height: 1;
}
.card-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.28);
  font-weight: 300;
  margin-top: 2px;
}

.accent-green {
  border-color: rgba(100, 160, 255, 0.15);
}
.accent-green:hover {
  border-color: rgba(100, 160, 255, 0.3);
  background: rgba(100, 160, 255, 0.04);
}
.accent-blue {
  border-color: rgba(62, 91, 219, 0.18);
}
.accent-blue:hover {
  border-color: rgba(62, 91, 219, 0.32);
  background: rgba(62, 91, 219, 0.04);
}
.accent-amber {
  border-color: rgba(100, 130, 200, 0.15);
}
.accent-amber:hover {
  border-color: rgba(100, 130, 200, 0.3);
  background: rgba(100, 130, 200, 0.04);
}
.accent-red {
  border-color: rgba(226, 75, 74, 0.15);
}
.accent-red:hover {
  border-color: rgba(226, 75, 74, 0.3);
  background: rgba(226, 75, 74, 0.04);
}

/* ── Cards secundários ── */
.secondary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-bottom: 28px;
}

.secondary-card {
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.018);
  display: flex;
  align-items: center;
  gap: 16px;
  transition:
    background 0.2s,
    border-color 0.2s;
  cursor: default;
}
.secondary-card:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.1);
}

.sec-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(100, 160, 255, 0.1);
  color: #90bfff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.sec-icon.orange {
  background: rgba(80, 120, 220, 0.12);
  color: #a0b8f0;
}
.sec-icon.purple {
  background: rgba(110, 130, 220, 0.12);
  color: #b0bff0;
}
.sec-icon.teal {
  background: rgba(80, 160, 210, 0.12);
  color: #90d0f0;
}

.sec-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 4px;
}
.sec-value {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  font-weight: 400;
  color: #fff;
}

/* ── Bottom grid ── */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3px;
  margin-bottom: 3px;
}

/* ── Chart card ── */
.chart-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.02);
  padding: 32px 36px;
}
.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}
.chart-card h2 {
  font-family: "Playfair Display", serif;
  font-size: 20px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 4px;
}
.chart-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 300;
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
.leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.leg-dot.green {
  background: #7aadff;
}
.leg-dot.red {
  background: #d97171;
}
.chart-wrap {
  position: relative;
  height: 220px;
}

/* ── Recent card ── */
.recent-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.02);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.recent-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 400;
  color: #fff;
}
.recent-badge {
  background: rgba(62, 91, 219, 0.15);
  color: #8faaf0;
  border: 1px solid rgba(62, 91, 219, 0.22);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
}
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.recent-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  color: rgba(255, 255, 255, 0.2);
  font-size: 22px;
}
.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s;
}
.recent-item:hover {
  background: rgba(255, 255, 255, 0.045);
}
.recent-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b2688, #3e5bdb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  font-family: "Playfair Display", serif;
}
.recent-info {
  flex: 1;
  min-width: 0;
}
.recent-name {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-livro {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.recent-status {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.recent-status.ativo {
  background: rgba(100, 160, 255, 0.1);
  color: #90bfff;
}
.recent-status.atrasado {
  background: rgba(226, 75, 74, 0.1);
  color: #d97171;
}

/* ── Categorias card ── */
.categories-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.02);
  padding: 32px 36px;
  margin-top: 3px;
}
.categories-header {
  margin-bottom: 28px;
}
.categories-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 20px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 4px;
}
.categories-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: center;
}
.cat-chart-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
}
.cat-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}
.cat-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cat-name {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  flex: 1;
}
.cat-count {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  color: #fff;
  font-weight: 400;
}
