/* assets/style.css */

/* ===== Base layout ===== */
:root{
  --bg: #0b1220;
  --sidebar-w: 320px;

  --card-radius: 16px;
  --soft-border: rgba(0,0,0,.08);
  --shadow: 0 10px 30px rgba(0,0,0,.06);

  --muted: rgba(255,255,255,.65);
  --muted2: rgba(255,255,255,.45);
}

html, body { height: 100%; }
body{
  overflow: hidden;
  background: #f6f7fb;
}

.vh-100{ height: 100vh; }
.main-wrap{
  overflow-y: auto;
  background: #f6f7fb;
}

/* nicer scrollbar (optional) */
.main-wrap::-webkit-scrollbar{ width: 10px; }
.main-wrap::-webkit-scrollbar-track{ background: transparent; }
.main-wrap::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.12);
  border-radius: 999px;
}
.main-wrap::-webkit-scrollbar-thumb:hover{ background: rgba(0,0,0,.18); }

/* ===== Sidebar ===== */
.sidebar{
  width: var(--sidebar-w);
  background:
    radial-gradient(1000px 600px at 20% -10%, rgba(124,58,237,.35), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(34,197,94,.18), transparent 60%),
    var(--bg);
  color:#fff;
  border-right: 1px solid rgba(255,255,255,.08);
}

.brand{
  padding: 16px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* ===== Cards / tables ===== */
.card-modern{
  border-radius: var(--card-radius);
  border: 1px solid var(--soft-border);
  box-shadow: var(--shadow);
  overflow: hidden; /* чтобы header/таблица не торчали за радиусы */
}

.table-modern{ margin: 0; }
.table-modern thead th{
  font-weight: 700;
  color: rgba(0,0,0,.65);
}
.table-modern tbody tr:hover{
  background: rgba(99,102,241,.04);
}

.badge-modern{
  border-radius: 999px;
  padding: .35rem .6rem;
  font-weight: 600;
  letter-spacing: .1px;
}

/* ===== Search input with icon ===== */
.search-box{ position: relative; }
.search-box i{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .55;
}
.search-box input{ padding-left: 36px; }

/* ===== Project cards ===== */
.project-card{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 12px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: #fff;
}

.project-card:hover{
  background: rgba(255,255,255,.10);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
  color: #fff;
}

.project-card.active{
  background: linear-gradient(135deg, rgba(99,102,241,.32), rgba(168,85,247,.30));
  border-color: rgba(168,85,247,.55);
  box-shadow: 0 14px 28px rgba(168,85,247,.28);
  color: #fff;
}

/* ===== Sortable headers ===== */
.sortable-header{
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background .15s ease;
}
.sortable-header:hover{ background: rgba(0,0,0,.03); }

/* ===== Cells truncation ===== */
.url-cell{
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.links-cell{
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Toast ===== */
.toast-container{
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9999;
}

/* ===== Stats row (fix icon spacing + make nicer) ===== */
.stat-card{
  border-radius: 16px;
  border: 1px solid var(--soft-border);
  background: #fff;
  padding: 12px 14px;
  min-height: 72px;
  box-shadow: 0 10px 24px rgba(0,0,0,.05);
}

.stat-card .d-flex{
  align-items: center !important; /* фикс вертикального выравнивания */
}

/* фикс “разное расстояние” вокруг иконки */
.stat-card .icon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
}
.stat-card .icon i{
  display: block;
  line-height: 1; /* ключевой фикс */
  font-size: 18px;
}

.stat-card .value{
  font-size: 19px;
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
}

.stat-card .label{
  font-size: 11.5px;
  line-height: 1.1;
  margin: 2px 0 0;
  color: rgba(0,0,0,.55);
}

/* ===== Gradients ===== */
.gradient-primary{ background: linear-gradient(135deg, #6366f1, #a855f7); }
.gradient-success{ background: linear-gradient(135deg, #16a34a, #22c55e); }
.gradient-info{ background: linear-gradient(135deg, #0ea5e9, #22d3ee); }

/* ===== Buttons ===== */
.btn-gradient{
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border: 0;
  color: #fff;
  box-shadow: 0 10px 18px rgba(99,102,241,.18);
}
.btn-gradient:hover{
  opacity: .96;
  color: #fff;
  transform: translateY(-1px);
}
.btn-gradient:active{
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px){
  .sidebar{ width: 100%; }
  .stat-card{ padding: 12px; }
  .stat-card .value{ font-size: 18px; }
}
