/* ZemGuru modular styles 16/16. Original cascade order preserved. */
/* ZEMGURU ADMIN CALLS ORDER HARD FIX CSS START */
.admin-call-oper-board,
.admin-call-records-board {
  display: grid;
  gap: 18px;
}
.admin-call-oper-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.admin-call-oper-head h2,
.admin-call-records-board h2 {
  margin: 0;
}
.admin-call-oper-head p,
.admin-call-records-board p {
  margin: 6px 0 0;
}
.admin-call-oper-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.admin-call-oper-kpis > div {
  border: 1px solid var(--border, #e2e8e2);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255,255,255,.74);
}
.admin-call-oper-kpis b {
  display: block;
  font-size: 30px;
  line-height: 1;
  color: var(--green, #187033);
}
.admin-call-oper-kpis span {
  display: block;
  margin-top: 6px;
  color: var(--muted, #6b7280);
  font-weight: 700;
  font-size: 13px;
}
.admin-call-oper-tools {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px 180px 180px;
  gap: 10px;
}
.admin-call-oper-tools .search,
.admin-call-oper-tools .filter {
  min-height: 48px;
}
.admin-call-group-block {
  border: 1px solid var(--border, #dde7dd);
  border-radius: 20px;
  background: rgba(255,255,255,.92);
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(20, 44, 30, .055);
}
.admin-call-group-block.is-archived {
  opacity: .78;
}
.admin-call-group-block-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(33, 92, 51, .10);
  background: linear-gradient(180deg, rgba(246,252,247,.95), rgba(255,255,255,.92));
}
.admin-call-group-block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-call-group-block-title h3 {
  margin: 0;
  font-size: 22px;
}
.admin-call-group-block-head .muted {
  margin-top: 6px;
}
.admin-call-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.admin-call-group-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(33,92,51,.08);
}
.admin-call-group-stats div {
  border: 1px solid rgba(33,92,51,.10);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(248,251,249,.8);
}
.admin-call-group-stats b {
  display: block;
  font-size: 22px;
}
.admin-call-group-stats span {
  display: block;
  color: var(--muted, #6b7280);
  font-size: 12px;
  font-weight: 700;
}
.admin-call-group-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 20px 20px;
}
.admin-call-group-column {
  border: 1px solid rgba(33,92,51,.09);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,.78);
  min-width: 0;
}
.admin-call-group-column h4 {
  margin: 0 0 10px;
  font-size: 16px;
}
.admin-call-mini-row,
.admin-record-group-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(33,92,51,.08);
  border-radius: 14px;
  background: rgba(250,252,250,.95);
  margin-top: 8px;
}
.admin-record-group-row {
  grid-template-columns: 36px minmax(0, 1.4fr) minmax(130px, .35fr) auto;
}
.admin-call-mini-row .row-icon,
.admin-record-group-row .row-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef7f0;
  color: #187033;
  font-weight: 900;
}
.admin-call-mini-row strong,
.admin-record-group-row strong {
  display: block;
  line-height: 1.25;
}
.admin-call-mini-row small,
.admin-record-group-row small {
  display: block;
  color: var(--muted, #6b7280);
  margin-top: 4px;
  line-height: 1.35;
}
.admin-record-group-date b,
.admin-record-group-date small {
  display: block;
}
.admin-record-group-date small {
  color: var(--muted, #6b7280);
  margin-top: 4px;
}
.admin-record-group-actions,
.admin-call-mini-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.admin-call-empty-note {
  border: 1px dashed rgba(33,92,51,.22);
  border-radius: 14px;
  padding: 14px;
  color: var(--muted, #6b7280);
  background: rgba(248,251,249,.55);
}
.admin-call-section-label {
  margin: 18px 0 10px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.admin-call-section-label h3 { margin: 0; }
.admin-call-records-board .admin-call-group-block-head {
  background: linear-gradient(180deg, rgba(245,250,255,.96), rgba(255,255,255,.93));
}
.admin-call-group-record-list {
  padding: 14px 20px 20px;
}
.admin-record-group-row:first-child { margin-top: 0; }
.admin-call-current-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(34, 124, 55, .10);
  color: #187033;
  font-weight: 800;
  font-size: 12px;
}
.admin-call-flat-warning {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 171, 64, .25);
  background: rgba(255, 248, 232, .85);
  color: #6d4b12;
  font-weight: 700;
}
body[data-theme="dark"] .admin-call-oper-kpis > div,
body[data-theme="dark"] .admin-call-group-block,
body[data-theme="dark"] .admin-call-group-column,
body[data-theme="dark"] .admin-call-mini-row,
body[data-theme="dark"] .admin-record-group-row {
  background: rgba(17, 31, 24, .88);
  border-color: rgba(255,255,255,.10);
}
body[data-theme="dark"] .admin-call-group-block-head {
  background: linear-gradient(180deg, rgba(21,41,30,.95), rgba(15,29,22,.92));
}
@media (max-width: 1100px) {
  .admin-call-oper-kpis,
  .admin-call-group-stats,
  .admin-call-group-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-call-oper-tools { grid-template-columns: 1fr 1fr; }
  .admin-record-group-row { grid-template-columns: 34px minmax(0, 1fr); }
  .admin-record-group-date,
  .admin-record-group-actions { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 720px) {
  .admin-call-oper-head,
  .admin-call-group-block-head { grid-template-columns: 1fr; display: grid; }
  .admin-call-oper-kpis,
  .admin-call-group-stats,
  .admin-call-group-columns,
  .admin-call-oper-tools { grid-template-columns: 1fr; }
  .admin-call-group-actions { justify-content: flex-start; }
}
/* ZEMGURU ADMIN CALLS ORDER HARD FIX CSS END */

/* ZEMGURU RECORD TITLE FINAL REPAIR CSS START */
.record-title-final-field {
  margin: 14px 0 12px;
}
.record-title-final-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
  color: var(--text, #111827);
}
.record-title-final-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border, #d9e0da);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text, #111827);
  background: var(--surface, #fff);
  outline: none;
}
.record-title-final-field input:focus {
  border-color: #2f8d46;
  box-shadow: 0 0 0 3px rgba(47, 141, 70, .12);
}
.record-title-final-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted, #6b7280);
  font-size: 13px;
  line-height: 1.35;
}
body[data-theme="dark"] .record-title-final-field input {
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.94);
  border-color: rgba(255,255,255,.14);
}
body[data-theme="dark"] .record-title-final-hint {
  color: rgba(255,255,255,.58);
}
/* ZEMGURU RECORD TITLE FINAL REPAIR CSS END */

/* ZEMGURU MODAL INPUT STABILITY FIX CSS START */
.zg-draft-stable-badge {
  display: none;
  width: max-content;
  align-items: center;
  margin: 8px 0 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(45, 135, 64, 0.10);
  color: #1e7a3a;
  border: 1px solid rgba(45, 135, 64, 0.16);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.modal input:focus,
.modal textarea:focus,
.modal select:focus,
[role="dialog"] input:focus,
[role="dialog"] textarea:focus,
[role="dialog"] select:focus {
  outline: 2px solid rgba(67, 129, 219, 0.35);
  outline-offset: 1px;
}
/* ZEMGURU MODAL INPUT STABILITY FIX CSS END */

/* ZEMGURU MODAL DRAFT CLEAR FIX START */
.zg-draft-clear-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.zg-draft-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(190, 54, 54, 0.22);
  background: rgba(190, 54, 54, 0.07);
  color: #a33232;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.zg-draft-clear-btn:hover {
  background: rgba(190, 54, 54, 0.12);
  border-color: rgba(190, 54, 54, 0.32);
}

.zg-draft-cleared-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(45, 135, 64, 0.10);
  color: #23723d;
  font-size: 12px;
  font-weight: 800;
}

body[data-theme="dark"] .zg-draft-clear-btn,
.theme-dark .zg-draft-clear-btn {
  background: rgba(255, 112, 112, 0.10);
  border-color: rgba(255, 112, 112, 0.24);
  color: #ffb1b1;
}
/* ZEMGURU MODAL DRAFT CLEAR FIX END */


/* ZEMGURU TOPIC COMPACT PIN CLEAN FIX CSS START */
.zg-topic-compact-pin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: calc(100% - 28px);
  max-width: 980px;
  margin: 10px auto 8px;
  padding: 10px 12px;
  border: 1px solid rgba(45, 135, 64, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,252,248,0.96));
  box-shadow: 0 10px 26px rgba(17, 31, 23, 0.07);
  color: #172033;
  flex: 0 0 auto;
}

.zg-topic-compact-pin.is-hidden {
  display: none !important;
}

.zg-topic-compact-pin-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.zg-topic-compact-pin-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: rgba(45, 135, 64, 0.08);
  color: #23723d;
  flex: 0 0 auto;
}

.zg-topic-compact-pin-body {
  min-width: 0;
  flex: 1 1 auto;
}

.zg-topic-compact-pin-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.zg-topic-compact-pin-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(45, 135, 64, 0.10);
  color: #23723d;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.zg-topic-compact-pin-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
  color: #172033;
}

.zg-topic-compact-pin-preview {
  margin: 4px 0 0;
  max-width: 820px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.35;
}

.zg-topic-compact-pin-full {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(45, 135, 64, 0.06);
  color: #1f2937;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.zg-topic-compact-pin.is-expanded .zg-topic-compact-pin-preview {
  display: none;
}

.zg-topic-compact-pin.is-expanded .zg-topic-compact-pin-full {
  display: block;
}

.zg-topic-compact-pin-meta {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  line-height: 1.3;
}

.zg-topic-compact-pin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.zg-topic-compact-pin-btn {
  appearance: none;
  border: 1px solid rgba(45, 135, 64, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  color: #23723d;
  padding: 8px 11px;
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
  cursor: pointer;
}

.zg-topic-compact-pin-btn:hover {
  background: rgba(45, 135, 64, 0.07);
}

.teacher-dialog-chat-pane.has-compact-topic-pin .community-chat-feed,
.teacher-dialog-chat-pane.has-compact-topic-pin .teacher-private-chat-feed {
  min-height: 0;
}

body[data-theme="dark"] .zg-topic-compact-pin,
.theme-dark .zg-topic-compact-pin {
  background: linear-gradient(180deg, rgba(20, 35, 27, 0.96), rgba(14, 27, 21, 0.96));
  border-color: rgba(119, 207, 139, 0.16);
  box-shadow: 0 12px 30px rgba(0,0,0,0.26);
  color: #f5f7f5;
}

body[data-theme="dark"] .zg-topic-compact-pin-title,
.theme-dark .zg-topic-compact-pin-title { color: #f5f7f5; }

body[data-theme="dark"] .zg-topic-compact-pin-preview,
.theme-dark .zg-topic-compact-pin-preview,
body[data-theme="dark"] .zg-topic-compact-pin-meta,
.theme-dark .zg-topic-compact-pin-meta { color: rgba(238,245,239,0.72); }

body[data-theme="dark"] .zg-topic-compact-pin-full,
.theme-dark .zg-topic-compact-pin-full {
  background: rgba(119,207,139,0.08);
  color: #eef5ef;
}

body[data-theme="dark"] .zg-topic-compact-pin-btn,
.theme-dark .zg-topic-compact-pin-btn {
  background: rgba(255,255,255,0.04);
  border-color: rgba(158,230,170,0.18);
  color: #a7efb2;
}

@media (max-width: 860px) {
  .zg-topic-compact-pin {
    width: calc(100% - 18px);
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 11px;
  }
  .zg-topic-compact-pin-actions {
    width: 100%;
  }
  .zg-topic-compact-pin-btn {
    flex: 1 1 auto;
  }
}
/* ZEMGURU TOPIC COMPACT PIN CLEAN FIX CSS END */
/* ZG SEPARATE NOTIFICATION EMAIL STYLES START */
.zg-notification-email-box {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.25fr);
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--green, #24833f) 28%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--green, #24833f) 7%, transparent);
}
.zg-notification-email-copy { display: grid; gap: 5px; }
.zg-notification-email-copy strong { font-size: 1rem; }
.zg-notification-email-copy span,
.zg-login-email-help { color: var(--muted, #6b7280); line-height: 1.42; }
.zg-notification-email-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.zg-notification-email-controls input {
  width: 100%; min-width: 0; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line, rgba(127,127,127,.28));
  background: var(--surface, transparent); color: inherit; font: inherit;
}
.zg-notification-email-toast {
  position: fixed; z-index: 100000; right: 22px; bottom: 22px; max-width: min(440px, calc(100vw - 32px));
  padding: 13px 16px; border-radius: 12px; background: #176f38; color: #fff;
  font-weight: 700; box-shadow: 0 14px 34px rgba(0,0,0,.22);
}
.zg-notification-email-toast.error { background: #b42318; }
@media (max-width: 780px) {
  .zg-notification-email-box { grid-template-columns: 1fr; }
  .zg-notification-email-controls { grid-template-columns: 1fr; }
  .zg-notification-email-controls .btn { width: 100%; }
}
/* ZG SEPARATE NOTIFICATION EMAIL STYLES END */

/* === ZG MOBILE TOPBAR PROFILE FIX 2026-07-02 START ===
   Keeps the profile avatar inside the top header on phones.
   The previous four-column mobile grid had five visible controls,
   so the profile chip wrapped into a second row above the page content.
*/
@media (max-width: 760px) {
  body .topbar,
  body .topbar.has-page-title {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 42px 42px 42px !important;
    grid-template-rows: 68px !important;
    grid-auto-rows: 0 !important;
    align-items: center !important;
    gap: 6px !important;
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    padding: 0 12px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  body .topbar .topbar-page-title,
  body .topbar .top-search {
    display: none !important;
  }

  body .topbar .hamburger,
  body .topbar .theme-toggle,
  body .topbar .messenger-top-icon,
  body .topbar > .top-icon:not(.messenger-top-icon),
  body .topbar .profile-chip {
    grid-row: 1 !important;
    margin: 0 !important;
    align-self: center !important;
  }

  body .topbar .hamburger {
    grid-column: 1 !important;
    justify-self: start !important;
  }

  body .topbar .theme-toggle {
    grid-column: 2 !important;
    justify-self: center !important;
  }

  body .topbar .messenger-top-icon {
    grid-column: 3 !important;
    justify-self: center !important;
  }

  body .topbar > .top-icon:not(.messenger-top-icon) {
    grid-column: 4 !important;
    justify-self: center !important;
  }

  body .topbar .profile-chip {
    grid-column: 5 !important;
    justify-self: end !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 2px !important;
    border-radius: 999px !important;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
  }

  body .topbar .profile-chip > span:first-child {
    display: none !important;
  }

  body .topbar .profile-chip .avatar {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    flex: 0 0 38px !important;
  }

  body .topbar .profile-menu {
    top: 60px !important;
    right: 10px !important;
  }
}
/* === ZG MOBILE TOPBAR PROFILE FIX 2026-07-02 END === */


/* ZG PROFILE NICKNAME AUTOSAVE START */
.nickname-autosave-status {
  display: block;
  min-height: 1.25em;
  margin-top: 6px;
  color: var(--muted, #737983);
  font-size: 0.82rem;
}
.nickname-autosave-status.saving { color: #4f7db5; }
.nickname-autosave-status.saved { color: #2d8241; }
.nickname-autosave-status.error { color: #c44444; }
/* ZG PROFILE NICKNAME AUTOSAVE END */

/* === ZG EMAIL PANEL SPACING FIX 2026-07-02 START ===
   Separates the email settings blocks and keeps the action buttons aligned.
*/
.email-panel.integration-panel {
  display: grid;
  gap: 18px;
  padding: 26px 28px;
}

.email-panel.integration-panel > .section-title,
.email-panel.integration-panel > .email-connected,
.email-panel.integration-panel > .zg-notification-email-box,
.email-panel.integration-panel > .toggle-row,
.email-panel.integration-panel > .security-note {
  margin: 0;
}

.email-panel.integration-panel > .section-title {
  margin-bottom: 2px;
}

.email-panel.integration-panel .email-connected {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 22px 24px;
}

.email-panel.integration-panel .email-connected > div:first-child {
  gap: 7px;
}

.email-panel.integration-panel .email-connected .btn-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: auto;
}

.email-panel.integration-panel .email-connected .btn-row .btn {
  width: auto;
  min-width: 160px;
  white-space: nowrap;
}

.email-panel.integration-panel .email-connected .btn-row .zg-important-email-test-btn {
  min-width: 205px;
}

.email-panel.integration-panel .zg-notification-email-box {
  grid-template-columns: minmax(300px, .9fr) minmax(430px, 1.1fr);
  gap: 30px;
  padding: 24px 26px;
}

.email-panel.integration-panel .zg-notification-email-copy {
  gap: 8px;
}

.email-panel.integration-panel .zg-notification-email-copy span {
  max-width: 560px;
}

.email-panel.integration-panel .zg-notification-email-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.email-panel.integration-panel .zg-notification-email-controls input,
.email-panel.integration-panel .zg-notification-email-controls .btn {
  min-height: 46px;
}

.email-panel.integration-panel .zg-notification-email-controls .btn {
  min-width: 175px;
  white-space: nowrap;
}

.email-panel.integration-panel .toggle-row.compact {
  padding: 16px 20px;
}

.email-panel.integration-panel .security-note {
  padding: 13px 16px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .email-panel.integration-panel .email-connected {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .email-panel.integration-panel .email-connected .btn-row {
    justify-content: flex-start;
  }

  .email-panel.integration-panel .zg-notification-email-box {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 760px) {
  .email-panel.integration-panel {
    gap: 14px;
    padding: 18px 16px;
  }

  .email-panel.integration-panel .section-title {
    align-items: flex-start;
    gap: 10px;
  }

  .email-panel.integration-panel .email-connected {
    padding: 18px;
  }

  .email-panel.integration-panel .email-connected .btn-row,
  .email-panel.integration-panel .zg-notification-email-controls {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .email-panel.integration-panel .email-connected .btn-row .btn,
  .email-panel.integration-panel .zg-notification-email-controls .btn {
    width: 100%;
    min-width: 0;
  }

  .email-panel.integration-panel .zg-notification-email-box {
    padding: 18px;
  }
}
/* === ZG EMAIL PANEL SPACING FIX 2026-07-02 END === */


/* First-login profile setup: nickname + password */
.first-login-setup-modal {
  width: min(660px, 100%);
}

.first-login-setup-grid {
  margin-top: 18px;
}

.first-login-nickname-field {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid rgba(36, 115, 56, .22);
  border-radius: 14px;
  background: rgba(36, 115, 56, .06);
}

.first-login-nickname-field input {
  font-size: 17px;
  font-weight: 650;
}

.field-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.first-login-setup-actions {
  margin-top: 18px;
}

.first-login-setup-actions .btn {
  min-width: 210px;
}

@media (max-width: 680px) {
  .first-login-setup-modal {
    width: 100%;
    padding: 18px;
  }

  .first-login-setup-grid {
    grid-template-columns: 1fr;
  }

  .first-login-nickname-field {
    grid-column: auto;
  }

  .first-login-setup-actions .btn {
    width: 100%;
  }
}


/* ZG NOTIFICATION FEED CLEANUP 2026-07-02 START */
.notification-time-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  color: var(--ink);
}

.notification-card.read .notification-time-label {
  color: var(--muted);
}

.notice-task small {
  display: grid;
  gap: 3px;
}

.notice-task-time {
  display: block !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.toast::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 0 0 8px 8px;
  background: rgba(255, 255, 255, .48);
  transform-origin: left center;
  animation: zgToastLifetime 6.5s linear forwards;
}

@keyframes zgToastLifetime {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 760px) {
  .notification-meta {
    gap: 7px;
  }
  .notification-time-label {
    width: 100%;
  }
}
/* ZG NOTIFICATION FEED CLEANUP 2026-07-02 END */


/* ZG notification connection truth fix 2026-07-02 */
.notification-settings-summary .setting-row .setting-status {
  white-space: nowrap;
  font-weight: 800;
}
.notification-settings-summary .setting-row .setting-status.on {
  color: var(--green);
}
.notification-settings-summary .setting-row .setting-status.off {
  color: #d66a6a;
}
.notification-settings-summary .setting-row .setting-status.paused {
  color: #d59a2f;
}
.notification-settings-hint {
  margin: 14px 0 12px;
  font-size: 12px;
  line-height: 1.45;
}
.email-panel .toggle-row.is-disabled {
  opacity: .72;
}
.email-panel .toggle-row.is-disabled input {
  cursor: not-allowed;
}
.email-panel [data-send-email-test]:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Step 07: Telegram account connection in profile */
.telegram-panel {
  padding: 22px;
}

.telegram-panel .section-title {
  align-items: flex-start;
}

.telegram-panel h2 {
  margin-bottom: 6px;
}

.telegram-panel p {
  line-height: 1.5;
}

.telegram-connected,
.telegram-connect-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel, #fbfcfb);
}

.telegram-connected > div:first-child,
.telegram-connect-flow > div:first-child {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.telegram-connected span,
.telegram-connect-flow span,
.telegram-connect-flow small {
  color: var(--muted);
  line-height: 1.45;
}

.telegram-connected .btn-row,
.telegram-connect-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.telegram-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.telegram-settings label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel, #fff);
  color: var(--text, #2b333a);
  font-weight: 750;
}

.telegram-settings input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.telegram-panel a.btn {
  text-decoration: none;
}

@media (max-width: 760px) {
  .telegram-connected,
  .telegram-connect-flow {
    display: grid;
  }

  .telegram-connected .btn-row,
  .telegram-connect-actions {
    width: 100%;
    justify-content: stretch;
  }

  .telegram-connected .btn-row .btn,
  .telegram-connect-actions .btn {
    width: 100%;
  }

  .telegram-settings {
    grid-template-columns: 1fr;
  }
}
