/* =========================================================
   ARTICLE REVISION DIFF – PREMIUM
========================================================= */

.article-diff-toolbar,
.article-diff-shell,
.article-diff-meta-card,
.article-diff-compare-card,
.article-diff-section-card{
  border-radius:24px !important;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.06) !important;
  background:linear-gradient(180deg, rgba(255,255,255,.99), rgba(255,255,255,.96));
  box-shadow:0 14px 34px rgba(0,0,0,.05);
}

body.dark .article-diff-toolbar,
body.dark .article-diff-shell,
body.dark .article-diff-meta-card,
body.dark .article-diff-compare-card,
body.dark .article-diff-section-card{
  background:linear-gradient(180deg, rgba(15,23,42,.99), rgba(15,23,42,.96));
  border-color:rgba(255,255,255,.08) !important;
  box-shadow:0 20px 46px rgba(0,0,0,.38);
}

.article-diff-toolbar .card-body,
.article-diff-shell .card-body,
.article-diff-meta-card .card-body,
.article-diff-compare-card .card-body,
.article-diff-section-card .card-body{
  position:relative;
  z-index:1;
  padding:1.25rem;
}

.article-diff-kicker{
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:.35rem;
}

.article-diff-title{
  margin:0;
  font-size:1.6rem;
  font-weight:700;
  line-height:1.2;
}

.article-diff-subtitle{
  margin-top:.35rem;
  color:var(--muted);
  font-size:.95rem;
}

.article-diff-actions,
.article-diff-footer{
  display:flex;
  flex-wrap:wrap;
  gap:.75rem;
}

.article-diff-meta-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:1rem 1.5rem;
}

.article-diff-meta-item{
  display:flex;
  flex-direction:column;
  gap:.2rem;
}

.article-diff-meta-label{
  font-size:.8rem;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
}

.article-diff-meta-value{
  font-size:1rem;
  color:var(--text);
  word-break:break-word;
}

.article-diff-note{
  border-radius:18px;
  padding:.95rem 1rem;
  border:1px solid rgba(0,0,0,.06);
  background:
    radial-gradient(220px 90px at 8% 0%, rgba(31,139,36,.04), transparent 60%),
    radial-gradient(220px 90px at 92% 0%, rgba(198,29,35,.04), transparent 60%),
    linear-gradient(180deg, rgba(248,250,252,.96), rgba(255,255,255,.98));
  color:var(--text);
  box-shadow:0 8px 20px rgba(0,0,0,.04);
}

body.dark .article-diff-note{
  border-color:rgba(255,255,255,.08);
  background:
    radial-gradient(220px 90px at 8% 0%, rgba(31,139,36,.10), transparent 60%),
    radial-gradient(220px 90px at 92% 0%, rgba(198,29,35,.10), transparent 60%),
    linear-gradient(180deg, rgba(30,41,59,.95), rgba(15,23,42,.98));
  box-shadow:0 12px 28px rgba(0,0,0,.25);
}

.article-diff-section-title{
  font-size:1rem;
  font-weight:800;
  margin:0 0 1rem 0;
  color:var(--text);
}

.article-diff-compare-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:1rem;
}

.article-diff-compare-box{
  height:100%;
  padding:18px;
  border-radius:20px;
  border:1px solid rgba(0,0,0,.06);
  background:
    radial-gradient(220px 90px at 8% 0%, rgba(31,139,36,.05), transparent 60%),
    radial-gradient(220px 90px at 92% 0%, rgba(198,29,35,.05), transparent 60%),
    linear-gradient(180deg, rgba(248,250,252,.96), rgba(255,255,255,.98));
  box-shadow:0 10px 24px rgba(0,0,0,.04);
}

body.dark .article-diff-compare-box{
  border-color:rgba(255,255,255,.08);
  background:
    radial-gradient(220px 90px at 8% 0%, rgba(31,139,36,.10), transparent 60%),
    radial-gradient(220px 90px at 92% 0%, rgba(198,29,35,.10), transparent 60%),
    linear-gradient(180deg, rgba(30,41,59,.95), rgba(15,23,42,.98));
  box-shadow:0 14px 30px rgba(0,0,0,.25);
}

.article-diff-compare-head{
  font-size:.95rem;
  font-weight:800;
  margin-bottom:.85rem;
  color:var(--text);
}

.article-diff-badges{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
}

.article-diff-badge{
  min-height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:.48rem .8rem;
  font-weight:700;
  border:1px solid rgba(0,0,0,.08);
  background:rgba(255,255,255,.92);
  color:var(--text);
  box-shadow:0 4px 14px rgba(0,0,0,.03);
}

body.dark .article-diff-badge{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.10);
  box-shadow:none;
}

.article-diff-lines{
  display:flex;
  flex-direction:column;
  gap:.55rem;
}

.article-diff-line{
  border-radius:18px;
  padding:.85rem 1rem;
  border:1px solid rgba(0,0,0,.06);
  font-size:.95rem;
  line-height:1.6;
  white-space:pre-wrap;
  word-break:break-word;
  box-shadow:0 6px 16px rgba(0,0,0,.03);
}

.article-diff-line-sign{
  display:inline-block;
  min-width:1.2rem;
  font-weight:800;
}

.article-diff-line--same{
  background:rgba(248,250,252,.95);
  color:#6b7280;
}

.article-diff-line--add{
  background:#ecfdf3;
  border-color:#b7ebc6;
  color:#166534;
}

.article-diff-line--del{
  background:#fff1f2;
  border-color:#fecdd3;
  color:#b42318;
}

body.dark .article-diff-line--same{
  background:rgba(255,255,255,.05);
  border-color:rgba(255,255,255,.08);
  color:#cbd5e1;
}

body.dark .article-diff-line--add{
  background:rgba(22,101,52,.18);
  border-color:rgba(34,197,94,.28);
  color:#bbf7d0;
}

body.dark .article-diff-line--del{
  background:rgba(127,29,29,.20);
  border-color:rgba(248,113,113,.28);
  color:#fecaca;
}

.article-diff-card-header{
  padding:1rem 1.25rem;
  border-bottom:1px solid rgba(0,0,0,.05);
  font-size:1rem;
  font-weight:800;
  color:var(--text);
  background:rgba(255,255,255,.55);
}

body.dark .article-diff-card-header{
  border-bottom-color:rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
}

/* =========================================================
   RTL
========================================================= */

html[dir="rtl"] .article-diff-toolbar,
html[dir="rtl"] .article-diff-shell,
html[dir="rtl"] .article-diff-meta-card,
html[dir="rtl"] .article-diff-compare-card,
html[dir="rtl"] .article-diff-section-card,
html[dir="rtl"] .article-diff-compare-box,
html[dir="rtl"] .article-diff-line,
html[dir="rtl"] .article-diff-note{
  text-align:right;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 991.98px){
  .article-diff-toolbar,
  .article-diff-shell,
  .article-diff-meta-card,
  .article-diff-compare-card,
  .article-diff-section-card{
    border-radius:20px !important;
  }

  .article-diff-meta-grid,
  .article-diff-compare-grid{
    grid-template-columns:1fr;
  }

  .article-diff-compare-box{
    border-radius:18px;
    padding:16px;
  }
}

@media (max-width: 576px){
  .article-diff-toolbar .card-body,
  .article-diff-shell .card-body,
  .article-diff-meta-card .card-body,
  .article-diff-compare-card .card-body,
  .article-diff-section-card .card-body{
    padding:1rem !important;
  }

  .article-diff-actions .btn,
  .article-diff-footer .btn{
    width:100%;
  }

  .article-diff-title{
    font-size:1.35rem;
  }

  .article-diff-line{
    border-radius:16px;
    padding:.8rem .9rem;
  }

  .article-diff-compare-box{
    padding:14px;
    border-radius:16px;
  }
}