:root {
  color-scheme: only light;
  --deep-blue: #1b365d;
  --deep-blue-2: #0f2f52;
  --spark-orange: #e88d32;
  --connected-blue: #4a90e2;
  --paper: #ffffff;
  --mist: #f4f7f6;
  --ink: #102033;
  --soft-ink: #5a6b7d;
  --line: #d7e1e8;
  --shadow: 0 16px 36px rgba(21, 45, 77, 0.2);
  --shadow-soft: 0 10px 24px rgba(21, 45, 77, 0.14);
  --radius: 18px;
  --radius-card: 12px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: only light;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  color-scheme: only light;
  background-color: var(--mist);
  font-family: "Cairo", "Tajawal", "Plus Jakarta Sans", system-ui, sans-serif;
  background:
    /* linear-gradient(rgba(244, 247, 246, 0.72), rgba(244, 247, 246, 0.72)), */
    url("/img/HomePageBackground.png") center / cover fixed no-repeat;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
}

/* body::before {
  background:
    radial-gradient(circle, rgba(27, 54, 93, 0.15) 0 7px, transparent 8px) 8% 72% / 280px 210px,
    radial-gradient(circle, rgba(74, 144, 226, 0.18) 0 9px, transparent 10px) 78% 9% / 300px 230px,
    radial-gradient(circle, rgba(27, 54, 93, 0.12) 0 5px, transparent 6px) 92% 58% / 210px 180px;
} */

body::after {
  /*         */
    /* linear-gradient(32deg, transparent 0 45%, rgba(27, 54, 93, 0.06) 46% 47%, transparent 48%),
    linear-gradient(142deg, transparent 0 53%, rgba(74, 144, 226, 0.07) 54% 55%, transparent 56%); */
  background-size: 360px 280px, 420px 320px;
  opacity: 0.75;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--deep-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-frame {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 22px 42px;
}

.brand-header {
  display: flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 8px;
  text-align: center;
}

.brand-header img {
  position: relative;
  bottom: 13px;
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.brand-header div {
  display: grid;
  gap: 0;
  line-height: 1.05;
}

.brand-header strong {
  color: var(--deep-blue);
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-header span {
  color: #a95f21;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 800;
}

.page-switcher {
  display: flex;
  width: min(760px, 100%);
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 16px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(21, 45, 77, 0.1);
  backdrop-filter: blur(14px);
}
.page-switcher form {
    display: contents;
}


/* .switch-button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: var(--deep-blue);
  background: transparent;
  font-weight: 800;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  white-space: nowrap;
} */
.switch-button {
  /* 1. حوّل العناصر إلى flex لتوسيط النص داخلها تماماً عمودياً وأفقياً */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  /* 2. استبدل min-height بـ height ثابت لضمان تطابق الارتفاع */
  height: 36px; 
  box-sizing: border-box;
  
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: var(--deep-blue);
  background: transparent;
  font-weight: 800;
  
  /* 3. اضمن تجانس الخط والـ line-height تماماً بين الأزرار والروابط */
  font-family: inherit;
  font-size: inherit;
  line-height: 1; 
  cursor: pointer; /* لإظهار اليد عند التأشير على زر الخروج */
  
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  white-space: nowrap;
}
.switch-button:hover,
.switch-button.is-active {
  color: #fff;
  background: linear-gradient(180deg, #f39d36, var(--spark-orange));
  box-shadow: 0 8px 18px rgba(232, 141, 50, 0.32);
  transform: translateY(-1px);
}

.app-stage {
  position: relative;
}

.page-view {
  animation: pageIn 220ms ease both;
}

.page-view[hidden] {
  display: none;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen-label {
  margin: 0 auto 6px;
  color: #07192e;
  font-family: "Plus Jakarta Sans", "Cairo", sans-serif;
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  font-weight: 800;
  text-align: center;
}

.mock-screen {
  position: relative;
  overflow: hidden;
  width: min(980px, 100%);
  min-height: 500px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.mock-screen::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(74, 144, 226, 0.08) 43% 44%, transparent 45%),
    radial-gradient(circle at 12% 84%, rgba(27, 54, 93, 0.14) 0 5px, transparent 6px),
    radial-gradient(circle at 90% 12%, rgba(74, 144, 226, 0.16) 0 8px, transparent 9px);
  opacity: 0.75;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}
/* h4{
  text-align: center;
} */
h1,
h2,
h3,
p {
  margin: 0;
}

input,
textarea,
select {
  width: 100%;
  border: 1.5px solid #afbdc8;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--ink);
  color-scheme: only light;
  background: #fff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
}

textarea {
  min-height: 112px;
  border-radius: 10px;
  resize: vertical;
}

select {
  appearance: none;
  -webkit-appearance: none;
  direction: inherit;
  text-align: start;
  text-align-last: start;
  padding-inline: 14px 52px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231b365d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 18px center / 14px 14px no-repeat;
}

html[dir="rtl"] select {
  padding-inline: 52px 14px;
  background-position: left 18px center;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--connected-blue);
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.14);
}

.primary-action,
.secondary-action,
.category-chip,
.spark-button,
.attach-button,
.dots {
  border: 0;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.primary-action {
  min-height: 38px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #f59c35, var(--spark-orange));
  box-shadow: 0 7px 14px rgba(232, 141, 50, 0.25);
  font-weight: 800;
}

.primary-action:hover {
  box-shadow: 0 0 0 5px rgba(232, 141, 50, 0.15), 0 10px 22px rgba(232, 141, 50, 0.32);
  transform: translateY(-1px);
}

.secondary-action {
  min-height: 30px;
  border: 1px solid #b7c4ce;
  border-radius: 999px;
  padding: 0 16px;
  color: var(--deep-blue);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.secondary-action:hover {
  border-color: var(--spark-orange);
  color: var(--spark-orange);
}

/* Home page */
.home-screen {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  padding: 28px 32px 28px 30px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.93) 32%, rgba(255, 255, 255, 0.95)),
    url("/img/HomePageBackground.png") center / cover;
}

.home-sidebar,
.feed-panel {
  position: relative;
  z-index: 1;
}

.home-sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
  padding-left: 18px;
  border-left: 1px solid rgba(27, 54, 93, 0.1);
}

.search-pill {
  display: flex;
  height: 28px;
  align-items: center;
  gap: 5px;
  border: 1px solid #aebbc4;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--soft-ink);
  background: rgba(255, 255, 255, 0.72);
}

.search-pill input {
  height: 24px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.78rem;
}

.sidebar-mark {
  width: 92px;
  margin: 10px auto 2px;
  border-radius: 14px;
  opacity: 0.2;
}

.side-stat {
  border-radius: 12px;
  padding: 10px;
  color: var(--deep-blue);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 7px 16px rgba(21, 45, 77, 0.08);
  text-align: center;
}

.side-stat-button {
  width: 100%;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.side-stat-button:hover,
.side-stat-button[aria-expanded="true"] {
  color: #fff;
  background: var(--connected-blue);
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.14), 0 7px 16px rgba(21, 45, 77, 0.08);
}

.side-stat-button:hover span,
.side-stat-button[aria-expanded="true"] span {
  color: rgba(255, 255, 255, 0.82);
}

.side-stat strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1;
}

.side-stat span {
  color: var(--soft-ink);
  font-size: 0.75rem;
  font-weight: 700;
}

.feed-panel {
  min-width: 0;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title h1 {
  color: #07192e;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 800;
}

.section-title p {
  color: var(--soft-ink);
  direction: ltr;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}

.category-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  border: 1px solid #c9d4dc;
  border-radius: 999px;
  padding: 0 12px;
  color: #0b1f35;
  background: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.category-chip img,
.flask-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.category-chip #ex{
  width: 35px;
  height: 35px;
  object-fit: cover;
}

.category-chip:hover,
.category-chip.is-active {
  border-color: var(--spark-orange);
  color: #fff;
  background: linear-gradient(180deg, #f49b34, var(--spark-orange));
  box-shadow: 0 7px 14px rgba(232, 141, 50, 0.24);
  transform: translateY(-1px);
}

.flask-icon {
  position: relative;
  display: inline-block;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 4px 4px 8px 8px;
}

.flask-icon::before {
  position: absolute;
  top: -8px;
  left: 6px;
  width: 5px;
  height: 8px;
  border: 2px solid currentColor;
  border-bottom: 0;
  content: "";
}

.flask-icon::after {
  position: absolute;
  right: 2px;
  bottom: 2px;
  left: 2px;
  height: 7px;
  border-radius: 0 0 6px 6px;
  background: var(--spark-orange);
  content: "";
}

.post-grid,
.mini-posts {
  display: grid;
  gap: 13px;
}

.post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.thread-card {
  position: relative;
  display: flex;
  min-height: 136px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(27, 54, 93, 0.18);
  border-radius: var(--radius-card);
  padding: 12px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.thread-card.has-post-image {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62)),
    var(--thread-card-bg) center / cover;
}

.thread-card::before {
  position: absolute;
  inset: 12px;
  z-index: 0;
  pointer-events: none;
  content: "";
  background: url("/img/OurLogoWithoutBackground.png") center / 118px auto no-repeat;
  opacity: 0.18;
}

.thread-card.has-post-image::before {
  background: none;
}

.thread-card > * {
  position: relative;
  z-index: 1;
}

.thread-card:hover {
  border-color: rgba(232, 141, 50, 0.48);
  box-shadow: 0 0 0 5px rgba(232, 141, 50, 0.12), var(--shadow-soft);
  transform: translateY(-3px);
}

.thread-card[data-post-url] {
  cursor: pointer;
}

.thread-card.is-hidden {
  display: none;
}
.is-hidden{
  display: none;
}

.thread-card header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  z-index: 99999;
}

.thread-card h2,
.thread-card h3 {
  color: #07192e;
  font-family: "Plus Jakarta Sans", "Cairo", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
}

.thread-card time {
  color: #566575;
  unicode-bidi: isolate;
  font-size: 0.62rem;
  font-weight: 700;
}

.thread-card p {
  margin-top: 10px;
  color: #101820;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.thread-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: #526273;
  font-size: 0.72rem;
  font-weight: 700;
}

.thread-card footer form,
.post-preview-actions form {
  margin: 0;
}

.dots {
  display: grid;
  place-items: end;
  width: 24px;
  height: 22px;
  border-radius: 999px;
  color: #687887;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  list-style: none;
}

.dots::-webkit-details-marker {
  display: none;
}

.dots:hover {
  color: var(--deep-blue);
  background: rgba(27, 54, 93, 0.08);
}

.post-options {
  position: relative;
  z-index: 3;
  justify-self: end;
}

.post-options-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: -50px;
  display: grid;
  min-width: 104px;
  width: max-content;
  gap: 4px;
  border: 1px solid rgba(27, 54, 93, 0.14);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(21, 45, 77, 0.16);
}

.post-options-menu a,
.post-options-menu button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--deep-blue);
  background: transparent;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  text-align: start;
}

.post-options-menu a:hover,
.post-options-menu button:hover {
  background: rgba(27, 54, 93, 0.08);
  text-decoration: none;
}

.post-options-menu .post-delete-action {
  color: #b42318;
}

.spark-button {
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--deep-blue);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.7rem;
  font-weight: 800;
}

.spark-button:hover,
.spark-button.is-lit {
  color: #fff;
  background: var(--spark-orange);
  box-shadow: 0 0 0 4px rgba(232, 141, 50, 0.15);
}

/* Post preview page */
.post-preview-screen {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 22px;
  padding: 28px 32px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.96) 36%, rgba(255, 255, 255, 0.98)),
    var(--post-preview-bg, url("/img/HomePageBackground.png")) center / cover;
}

.post-preview-screen.comments-open {
  width: min(1180px, 100%);
  grid-template-columns: 150px minmax(0, 1fr) minmax(300px, 360px);
}

.post-preview-side,
.post-preview-panel,
.comments-panel {
  position: relative;
  z-index: 1;
}

.post-preview-side {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-left: 18px;
  border-left: 1px solid rgba(27, 54, 93, 0.1);
}

.post-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.post-preview-mark {
  width: 102px;
  margin: 8px auto 4px;
  opacity: 0.22;
}

.post-preview-panel {
  min-width: 0;
  max-height: min(620px, calc(100vh - 220px));
  overflow-y: auto;
  overscroll-behavior: auto;
  border: 1px solid rgba(27, 54, 93, 0.16);
  border-radius: var(--radius-card);
  padding: clamp(20px, 4vw, 38px);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.post-preview-header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  margin-bottom: 18px;
}

.post-preview-header .avatar {
  position: relative;
  top: 68%;
  width: 46px;
  height: 46px;
}

.post-preview-header p {
  color: #07192e;
  font-size: 0.94rem;
  font-weight: 800;
}

.post-preview-header time {
  color: var(--soft-ink);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 0.75rem;
  font-weight: 700;
}

.post-edited-at {
  margin-top: 2px;
  color: #6d7884;
  font-size: 0.72rem;
  font-weight: 800;
}

.owner-badge {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  border-radius: 999px;
  padding: 0 7px;
  color: #fff;
  background: var(--deep-blue);
  font-size: 0.62rem;
  font-weight: 800;
  vertical-align: middle;
}

.post-preview-category {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: #fff;
  background: var(--spark-orange);
  font-size: 0.76rem;
  font-weight: 800;
}

.post-preview-panel h1 {
  margin-top: 14px;
  color: #07192e;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  font-weight: 800;
  line-height: 1.25;
}

.post-preview-content {
  margin-top: 18px;
  padding-inline-end: 8px;
  color: #15263a;
  font-size: clamp(1rem, 1.4vw, 1.13rem);
  font-weight: 700;
  line-height: 1.9;
  white-space: normal;
}

.post-preview-content p + p,
.post-preview-content p + h2,
.post-preview-content p + h3,
.post-preview-content h2 + p,
.post-preview-content h3 + p {
  margin-top: 10px;
}

.post-preview-content h2,
.post-preview-content h3 {
  color: #07192e;
  font-weight: 800;
  line-height: 1.35;
}

.post-preview-content h2 {
  font-size: 1.35rem;
}

.post-preview-content h3 {
  font-size: 1.12rem;
}

.post-media-image {
  width: 100%;
  height: clamp(220px, 36vh, 340px);
  margin-top: 18px;
  border-radius: var(--radius-card);
  background: #fff;
  object-fit: contain;
}

.post-media-link {
  display: block;
  margin-top: 10px;
  color: var(--connected-blue);
  direction: ltr;
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.post-preview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid rgba(27, 54, 93, 0.12);
  color: var(--soft-ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.post-preview-actions .spark-button {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-block: 0;
  white-space: nowrap;
}

.comments-toggle {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--deep-blue);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.comments-toggle:hover,
.comments-toggle[aria-expanded="true"] {
  color: #fff;
  background: var(--connected-blue);
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.14);
}

.comments-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  max-height: min(620px, calc(100vh - 220px));
  overflow-y: auto;
  overscroll-behavior: auto;
  border: 1px solid rgba(27, 54, 93, 0.16);
  border-radius: var(--radius-card);
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.comments-panel[hidden] {
  display: none;
}

.comments-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comments-heading h2 {
  color: #07192e;
  font-size: 1rem;
  font-weight: 800;
}

.comments-heading span {
  color: var(--soft-ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.comment-form {
  display: grid;
  gap: 7px;
}

.comment-form textarea {
  min-height: 68px;
  font-size: 0.84rem;
  line-height: 1.55;
}

.comment-form .primary-action {
  justify-self: end;
  min-width: 96px;
  padding-inline: 16px;
}

.comment-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.comment-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  row-gap: 0;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.comment-item > .avatar {
  grid-row: 1 / span 3;
  margin-top: 2px;
}

.comment-item > div:not(.avatar) {
  display: contents;
}

.comment-item > div > header,
.comment-item > div > p,
.comment-item > div > .comment-actions {
  grid-column: 2;
  min-width: 0;
}

.comment-item header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 7px;
  line-height: 1.25;
}

.comment-item .comment-options {
  align-self: center;
  margin-inline-start: auto;
}

.comment-item .comment-options .post-options-menu {
  inset-inline-end: 0;
  inset-inline-start: auto;
}

html[dir="rtl"] .comment-item .comment-options .post-options-menu {
  inset-inline-end: auto;
  inset-inline-start: 0;
}

.comment-item strong {
  color: #07192e;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
}

.comment-item time,
.empty-comments {
  color: var(--soft-ink);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.25;
}

.comment-item p {
  margin-top: 2px;
  color: #15263a;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  margin-top: 3px;
}

.comment-reply {
  min-width: 0;
}

.comment-reply:not([open]) {
  display: inline-flex;
  align-items: center;
}

.comment-reply[open] {
  flex: 1 1 220px;
}

.comment-actions form {
  display: flex;
  align-items: center;
  margin: 0;
}

.comment-action-button,
.comment-reply summary {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--deep-blue);
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  list-style: none;
}

.comment-action-button b {
  margin-inline-start: 4px;
}

.comment-reply summary::-webkit-details-marker {
  display: none;
}

.comment-action-button:hover,
.comment-action-button.is-liked,
.comment-reply summary:hover {
  color: #fff;
  background: var(--spark-orange);
}

.comment-reply-form {
  display: grid;
  width: 100%;
  max-width: 320px;
  min-width: 0;
  gap: 7px;
  margin-top: 6px;
}

.comment-reply-form textarea {
  min-height: 48px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.comment-replies-block {
  grid-column: 1 / -1;
  min-width: 0;
  margin-top: 6px;
  padding-inline-start: 44px;
}

.comment-replies-block > summary {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  color: var(--connected-blue);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
  list-style: none;
}

.comment-replies-block > summary::-webkit-details-marker {
  display: none;
}

.comment-replies-block > summary:hover {
  text-decoration: underline;
}

.comment-replies {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 8px;
  padding-inline-start: 10px;
  border-inline-start: 1px solid rgba(27, 54, 93, 0.12);
}

.comment-replies .comment-item {
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 8px;
  padding: 0;
}

.comment-replies .avatar-photo {
  width: 30px;
  height: 30px;
  border-width: 2px;
}

.comment-replies .comment-replies-block {
  padding-inline-start: 38px;
}

.comment-replies .comment-replies {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.comment-replies .comment-replies .comment-replies-block {
  padding-inline-start: 0;
}

.comment-replies:empty {
  display: none;
}

.comment-item-reply {
  background: transparent;
}

.comment-replies .comment-replies .comment-item-reply {
  border-inline-width: 0;
}

/* Settings page */
.settings-screen {
  min-height: 510px;
  padding: 28px 32px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.94)),
    url("/img/HomePageBackground.png") center / cover;
}

.settings-hero,
.settings-grid,
.settings-panel {
  position: relative;
  z-index: 1;
}

.settings-hero {
  margin-bottom: 18px;
}

.settings-hero h1 {
  color: #07192e;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 800;
}

.settings-hero p,
.settings-section-title p {
  color: var(--soft-ink);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.6;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.settings-panel {
  border: 1px solid rgba(27, 54, 93, 0.12);
  border-radius: var(--radius-card);
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.settings-section-title {
  margin-bottom: 12px;
}

.settings-section-title h2 {
  color: #07192e;
  font-size: 1.02rem;
  font-weight: 800;
}

.settings-form {
  display: grid;
  gap: 9px;
}

.settings-form label {
  color: #152942;
  font-size: 0.82rem;
  font-weight: 800;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.devices-list {
  display: grid;
  gap: 10px;
}

.device-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border: 1px solid rgba(27, 54, 93, 0.1);
  border-radius: var(--radius-card);
  padding: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.device-row h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: #07192e;
  font-size: 0.94rem;
  font-weight: 800;
}

.device-row dl {
  display: grid;
  gap: 5px;
  margin: 9px 0 0;
}

.device-row dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--soft-ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.device-row dd {
  margin: 0;
  color: #15263a;
  overflow-wrap: anywhere;
}

.avatar {
  overflow: hidden;
  flex: 0 0 auto;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 5px 10px rgba(21, 45, 77, 0.2);
}

.avatar-photo {
  width: 34px;
  height: 34px;
  background:
    radial-gradient(circle at 50% 33%, #f3b48e 0 21%, transparent 22%),
    radial-gradient(circle at 50% 83%, var(--deep-blue) 0 34%, transparent 35%),
    linear-gradient(145deg, #e9eef3, #bccbda);
}

.avatar-photo.has-user-image {
  background-position: center;
  background-size: cover;
}

.avatar-2 {
  background:
    radial-gradient(circle at 50% 34%, #efad87 0 20%, transparent 21%),
    radial-gradient(circle at 50% 80%, #e88d32 0 34%, transparent 35%),
    linear-gradient(145deg, #ecf3f9, #cdd8e4);
}

.avatar-3 {
  background:
    radial-gradient(circle at 50% 34%, #d99173 0 20%, transparent 21%),
    radial-gradient(circle at 50% 80%, #4a90e2 0 34%, transparent 35%),
    linear-gradient(145deg, #edf3f6, #cad8df);
}

.avatar-4 {
  background:
    radial-gradient(circle at 50% 34%, #ebb08d 0 20%, transparent 21%),
    radial-gradient(circle at 50% 80%, #203c63 0 34%, transparent 35%),
    linear-gradient(145deg, #eff3f0, #d7ded9);
}

.avatar-5 {
  background:
    radial-gradient(circle at 50% 34%, #e7a07e 0 20%, transparent 21%),
    radial-gradient(circle at 50% 80%, #426b79 0 34%, transparent 35%),
    linear-gradient(145deg, #eef5f5, #cbdadd);
}

.avatar-6 {
  background:
    radial-gradient(circle at 50% 34%, #f0bd95 0 20%, transparent 21%),
    radial-gradient(circle at 50% 80%, #e88d32 0 34%, transparent 35%),
    linear-gradient(145deg, #f6f0df, #dad2b3);
}

.tint-peach,
.tint-lilac,
.tint-blue,
.tint-cream,
.tint-mint,
.tint-yellow {
  background: rgba(255, 255, 255, 0.24);
}

/* Login page */
.login-screen {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 430px;
}

.login-art,
.login-panel {
  position: relative;
  z-index: 1;
}

.login-art {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-left: 1px solid rgba(27, 54, 93, 0.1);
  background: rgba(244, 247, 246, 0.68);
}

.login-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
}
.login-art h2{
  position: relative;
  bottom: 140px;
  left: 1px;
}
.login-art #i2{
  position: relative; 
  opacity: 0.1;
}
.phoneLabel {
  position: relative;
  display: inline-block;
}
/* .phoneLabel::after{
  content: "+212";
  position: absolute;
  top: 144%;
  right: 85%;

  font-size: 16px;
} */

.phone-input-wrapper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 9999px; /* Rounded pill shape from your image */
  padding: 8px 16px;
  background-color: #ffffff;
}

/* Focused state handling */
.phone-input-wrapper:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Fixed non-editable country code */
.country-code {
  font-weight: bold;
  color: #0f172a;
  margin-right: 8px; /* Perfectly controlled spacing */
  user-select: none; /* Prevents the user from highlighting it */
}

/* Editable phone number part */
.phone-input-wrapper input {
  border: none;
  outline: none;
  padding: 0;
  font-size: 16px;
  color: #334155;
  width: 100%;
}

.phone-input-wrapper input::placeholder {
  color: #94a3b8;
}
/* .login-art #i2::after{
  position: absolute;
  content: "";
  background-image: url(/assets/img/TeachersCardsCategoryIcon.png);
  border: solid black;
  border-radius: 50%;
  z-index: 10000;
} */
 .profile-edit-art::after {
    position: absolute;
    content: "";
    display: block;
    inset: 28px;
    border: 1px solid rgba(255, 255, 255, 0.54);
    border-radius: 24px;
    z-index: 0;
}

.profile-edit-screen {
  grid-template-columns: 0.95fr 1.05fr;
}

.profile-edit-art {
  isolation: isolate;
  padding: 34px;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(12, 30, 51, 0.92), rgba(47, 83, 118, 0.82)),
    rgba(244, 247, 246, 0.68);
}

.profile-edit-art #i2 {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.18;
}

.profile-edit-card {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 320px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 22px;
  padding: 28px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 54px rgba(5, 18, 35, 0.24);
  backdrop-filter: blur(10px);
}

.profile-edit-avatar {
  width: 112px;
  height: 112px;
  border-width: 4px;
}

.profile-edit-card h2 {
  position: static;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 800;
}

.profile-edit-card p {
  max-width: 260px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.7;
}

.profile-edit-panel {
  align-content: start;
  overflow-y: auto;
}

.profile-edit-form {
  gap: 10px;
}

.profile-edit-form textarea {
  min-height: 96px;
}
.login-panel {
  display: grid;
  align-content: center;
  padding: 42px 54px;
  background: rgba(255, 255, 255, 0.92);
}

.tiny-brand {
  position: absolute;
  right: auto;
  bottom: 24px;
  left: 24px;
  width: 54px;
  opacity: 0.9;
}

.login-panel h1,
.post-form h1 {
  color: #07192e;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 800;
  text-align: center;
}

.auth-form,
.post-form {
  display: grid;
  gap: 8px;
}

.auth-form {
  margin-top: 22px;
}

.auth-form label,
.post-form label {
  color: #152942;
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-form input {
  height: 35px;
  padding: 5px 14px;
}

.file-picker-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker-status {
  min-width: 0;
  color: var(--soft-ink);
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.password-rules {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  color: var(--soft-ink);
  font-size: 0.76rem;
  font-weight: 800;
  list-style: none;
}

.password-rule {
  display: flex;
  align-items: center;
  gap: 7px;
}

.password-rule::before {
  display: grid;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid #aab8c3;
  border-radius: 50%;
  color: #fff;
  content: "";
  font-size: 0.68rem;
  line-height: 1;
}

.password-rule.is-valid {
  color: #1b365d;
}

.password-rule.is-valid::before {
  border-color: #2f9461;
  background: #2f9461;
  content: "✓";
}

.auth-form a {
  width: fit-content;
  color: #0c1e33;
  font-size: 0.76rem;
  font-weight: 800;
}

.auth-form p {
  color: #5d6873;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.auth-form p button {
  border: 0;
  color: #9f5a19;
  background: transparent;
  font-weight: 800;
}

/* Profile page */
.profile-screen {
  min-height: 510px;
  padding: 22px 48px 34px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.92)),
    url("/img/OurLogoWithBackground.png") center / cover;
}

.profile-hero,
.profile-body,
.profile-body2 {
  position: relative;
  z-index: 1;
}

.profile-hero {
  overflow: hidden;
  min-height: 178px;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-soft);
  text-align: center;
  padding-bottom: 10px;
}

.profile-cover {
  height: 86px;
  background:
    linear-gradient(180deg, rgba(13, 65, 105, 0.96), rgba(27, 54, 93, 0.98)),
    url("/img/OurLogoWithBackground.png") center / 240px no-repeat;
}

.avatar-profile {
  width: 84px;
  height: 84px;
  margin: -44px auto 8px;
}

.profile-hero h1 {
  color: #07192e;
  font-size: 1.2rem;
  font-weight: 800;
}

.profile-bio {
  max-width: 460px;
  margin: 6px auto 10px;
  padding: 0 18px;
  color: #526273;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.6;
}

.profile-body{
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 18px;
  margin-top: 22px;
}
.profile-body2{
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 50px;
}

.info-card,
.profile-posts {
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.info-card {
  padding: 18px;
}

.info-card h2,
.profile-posts h2 {
  color: #07192e;
  font-size: 1rem;
  font-weight: 800;
}

.info-card h2 {
  text-align: center;
}

.info-card dl {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
}

.info-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: "Plus Jakarta Sans", "Cairo", sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
}

.info-card dt {
  color: #263b50;
}

.info-card dd {
  direction: ltr;
  margin: 0;
  color: #111f2f;
}


.profile-posts {
  min-width: 0;
  padding: 16px;
}

.profile-posts h2 {
  margin-bottom: 12px;
  text-align: start;
}

.mini-posts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.thread-card.compact {
  min-height: 126px;
  padding: 10px;
}

.thread-card.compact header {
  grid-template-columns: 32px minmax(0, 1fr) auto;
}

.thread-card.compact p {
  font-size: 0.78rem;
}

/* Posting page */
.posting-screen {
  display: grid;
  grid-template-areas: "form art";
  grid-template-columns: 0.85fr 1.15fr;
  min-height: 430px;
  align-items: stretch;
  justify-items: stretch;
  padding: 0;
  direction: ltr;
  background: rgba(255, 255, 255, 0.88);
}

.posting-art {
  grid-area: art;
  border-right: 1px solid rgba(27, 54, 93, 0.1);
  border-left: 0;
}

.post-form {
  grid-area: form;
  position: relative;
  z-index: 1;
  align-content: center;
  width: min(430px, 100%);
  min-width: 0;
  margin: 0 auto;
  border-radius: 0;
  padding: 42px 54px;
  direction: ltr;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

html[dir="rtl"] .post-form {
  direction: rtl;
}

.post-form input,
.post-form select {
  min-height: 34px;
}

.attachment-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.attach-button {
  min-height: 30px;
  border: 1px solid #aab8c3;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--deep-blue);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.attach-button:hover,
.attach-button.is-active {
  border-color: var(--connected-blue);
  color: #fff;
  background: var(--connected-blue);
}

.attachment-line span,
.form-status {
  min-height: 20px;
  color: var(--connected-blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.publish-action {
  margin-top: 4px;
}

.post-edit-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.site-frame > .form-status {
  margin: 0 auto 6px;
}

.form-status {
  text-align: center;
}

.corner-logo {
  position: absolute;
  z-index: 1;
  width: 54px;
  opacity: 0.9;
}

.corner-logo-start {
  top: 28px;
  left: 34px;
}

.corner-logo-end {
  right: 28px;
  bottom: 28px;
}

@media (max-width: 900px) {
  .site-frame {
    padding-inline: 14px;
  }

  .page-switcher {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .mock-screen {
    min-height: auto;
  }

  .post-preview-screen.comments-open {
    width: min(980px, 100%);
    grid-template-columns: 1fr;
  }

  .settings-grid,
  .device-row {
    grid-template-columns: 1fr;
  }

  .home-screen,
  .login-screen,
  .posting-screen,
  .post-preview-screen,
  .profile-body,
.profile-body2 {
    grid-template-columns: 1fr;
  }

  .posting-screen {
    grid-template-areas:
      "art"
      "form";
  }

  .home-sidebar {
    grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(120px, 160px));
    align-items: center;
    padding: 0 0 16px;
    border-left: 0;
    border-bottom: 1px solid rgba(27, 54, 93, 0.1);
  }

  .post-preview-side {
    grid-template-columns: minmax(160px, 1fr) repeat(2, minmax(110px, 150px));
    align-items: center;
    padding: 0 0 16px;
    border-left: 0;
    border-bottom: 1px solid rgba(27, 54, 93, 0.1);
  }

  .post-preview-panel,
  .comments-panel {
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .sidebar-mark {
    display: none;
  }

  .post-preview-mark {
    display: none;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-art {
    min-height: 220px;
    border-left: 0;
    border-bottom: 1px solid rgba(27, 54, 93, 0.1);
  }

  .posting-art {
    border-right: 0;
  }

  .login-panel {
    padding: 30px;
  }

  .profile-screen {
    padding: 18px;
  }

  .info-card h2,
  .profile-posts h2 {
    text-align: start;
  }
}

@media (max-width: 620px) {
  .brand-header {
    gap: 8px;
  }

  .brand-header img {
    width: 58px;
    height: 58px;
  }

  .switch-button {
    padding-inline: 13px;
    font-size: 0.86rem;
  }

  .mock-screen {
    border-radius: 14px;
  }

  .home-screen {
    padding: 18px;
  }

  .post-preview-screen {
    padding: 18px;
  }

  .posting-screen {
    padding: 0;
  }

  .home-sidebar,
  .post-preview-side,
  .post-grid,
  .mini-posts {
    grid-template-columns: 1fr;
  }

  .post-preview-panel {
    padding: 18px;
  }

  .post-preview-actions {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
  }

  .section-title {
    display: block;
  }

  .section-title p {
    margin-top: 4px;
    direction: inherit;
  }

  .category-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .category-chip {
    justify-content: center;
    padding-inline: 8px;
  }

  .login-panel {
    padding: 24px 18px 76px;
  }

  .profile-cover {
    height: 74px;
  }

  .profile-body,
.profile-body2 {
    gap: 14px;
  }

  .post-form {
    width: 100%;
    margin: 0;
    padding: 18px;
  }

  .corner-logo {
    width: 42px;
  }
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 51, 0.45);
  backdrop-filter: blur(4px);
}

.confirm-modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  border: 1px solid rgba(27, 54, 93, 0.12);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.confirm-modal-card h2 {
  margin: 0 0 8px;
  color: var(--deep-blue);
  font-size: 1.25rem;
}

.confirm-modal-card p {
  margin: 0 0 18px;
  color: var(--soft-ink);
  line-height: 1.5;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-screen {
  min-height: 510px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(27, 54, 93, 0.1);
  text-align: start;
  vertical-align: middle;
}

.admin-table th {
  color: var(--deep-blue);
  font-weight: 800;
  background: rgba(244, 247, 246, 0.8);
}

.admin-table td .secondary-action {
  margin-inline-end: 8px;
}

.admin-logs-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-logs-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-logs-select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
}

.admin-logs-table td:last-child {
  max-width: 520px;
  overflow-wrap: anywhere;
}

.log-level {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.log-level-info {
  color: #0f4c81;
  background: rgba(74, 144, 226, 0.16);
}

.log-level-warn {
  color: #8a5a00;
  background: rgba(232, 141, 50, 0.18);
}

.log-level-error {
  color: #8a1f1f;
  background: rgba(220, 53, 69, 0.14);
}

.comment-options .post-options-menu textarea {
  width: 100%;
  min-height: 72px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 8px 10px;
  resize: vertical;
}

.log-row {
  cursor: pointer;
  transition: background 160ms ease;
}

.log-row:hover,
.log-row:focus-visible {
  background: rgba(74, 144, 226, 0.08);
  outline: none;
}

.log-summary-cell {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.log-detail-modal[hidden] {
  display: none;
}

.log-detail-card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border: 1px solid rgba(27, 54, 93, 0.12);
  border-radius: var(--radius);
  padding: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.log-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.log-detail-header h2 {
  margin: 0;
  color: var(--deep-blue);
}

.log-detail-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  background: rgba(244, 247, 246, 0.9);
}

.log-detail-summary p {
  margin: 0;
  color: var(--ink);
}

.log-detail-section {
  margin-bottom: 14px;
}

.log-detail-section h3 {
  margin: 0 0 8px;
  color: var(--deep-blue);
  font-size: 0.95rem;
}

.log-detail-section pre {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(27, 54, 93, 0.1);
  border-radius: var(--radius-card);
  background: #0f1c2d;
  color: #e8f0f8;
  overflow: auto;
  max-height: 280px;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.danger-panel {
  border-color: rgba(220, 53, 69, 0.22);
  background: rgba(255, 247, 247, 0.92);
}

.danger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(220, 53, 69, 0.35);
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(220, 53, 69, 0.12);
  color: #8a1f1f;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.danger-action:hover,
.danger-action:focus-visible {
  background: rgba(220, 53, 69, 0.18);
  border-color: rgba(220, 53, 69, 0.55);
  outline: none;
}

.delete-account-form {
  max-width: 420px;
}

.user-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.user-status-active {
  color: #0f4c81;
  background: rgba(74, 144, 226, 0.16);
}

.user-status-banned_temporary,
.user-status-banned_permanent {
  color: #8a1f1f;
  background: rgba(220, 53, 69, 0.14);
}

.user-status-pending_deletion {
  color: #8a5a00;
  background: rgba(232, 141, 50, 0.18);
}

.user-status-deleted {
  color: #4a5568;
  background: rgba(148, 163, 184, 0.22);
}

.user-status-line {
  display: grid;
  gap: 6px;
  justify-items: center;
  margin-top: 8px;
}

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

.ban-panel-help {
  margin: 0 0 16px;
  color: var(--muted);
}

.ban-form {
  display: grid;
  gap: 12px;
}

.profile-avatar-preview {
  border: 0;
  padding: 0;
  cursor: zoom-in;
}

.profile-avatar-preview:focus-visible {
  outline: 3px solid rgba(74, 144, 226, 0.45);
  outline-offset: 4px;
}

.avatar-profile-link {
  cursor: pointer;
}

.avatar-profile-link:focus-visible {
  outline: 3px solid rgba(74, 144, 226, 0.45);
  outline-offset: 4px;
}

.avatar-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.avatar-preview-modal[hidden] {
  display: none;
}

.avatar-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 51, 0.55);
  backdrop-filter: blur(4px);
}

.avatar-preview-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  border: 1px solid rgba(27, 54, 93, 0.12);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.avatar-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.avatar-preview-header h2 {
  margin: 0;
  color: var(--deep-blue);
  font-size: 1.05rem;
}

.avatar-preview-card img {
  display: block;
  width: 100%;
  max-height: min(70vh, 640px);
  object-fit: contain;
  border-radius: var(--radius-card);
  background: rgba(244, 247, 246, 0.9);
}
