/* =====================================================================
   Jira-style Issue Details  (.jira-page)
   ===================================================================== */
.jira-page { padding: 0 0 48px; max-width: 1200px; }

.jira-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #6b7280; margin-bottom: 10px; flex-wrap: wrap;
}
.jira-breadcrumb__back {
  display: inline-flex; align-items: center; gap: 4px;
  color: #6b7280; text-decoration: none; font-weight: 600; transition: color .12s;
}
.jira-breadcrumb__back:hover { color: #1c1c1c; }
.jira-breadcrumb__sep { color: #d1d5db; }
.jira-breadcrumb__item { color: #6b7280; }
.jira-breadcrumb__item--current { color: #1c1c1c; font-weight: 600; }

.jira-actionbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; padding: 8px 0 14px;
  border-bottom: 1px solid #e6e8ec; margin-bottom: 16px;
}
.jira-actionbar__left  { display: flex; gap: 6px; flex-wrap: wrap; }
.jira-actionbar__right { display: flex; gap: 8px; align-items: center; }

.jira-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px; font-size: 12px; font-weight: 600;
  font-family: inherit; border-radius: 4px; border: 1px solid #d1d5db;
  background: #fff; color: #374151; cursor: pointer; text-decoration: none;
  transition: background .1s, border-color .1s; white-space: nowrap;
}
.jira-btn:hover { background: #f3f4f6; border-color: #9ca3af; }
.jira-btn--ghost { background: #f9fafb; }
.jira-btn--primary { background: var(--highlight,#e49e00); border-color: var(--highlight,#e49e00); color: #fff; }
.jira-btn--primary:hover { background: #c98d00; border-color: #c98d00; }
.jira-btn--sm { height: 28px; padding: 0 12px; font-size: 11px; }

.jira-status-wrap { position: relative; }
.jira-status-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; font-size: 12px; font-weight: 700;
  font-family: inherit; border-radius: 4px; border: none; cursor: pointer;
  transition: filter .12s;
}
.jira-status-btn:not(.jira-status-btn--static):hover { filter: brightness(.93); }
.jira-status-btn--static { cursor: default; }
.jira-status-btn--open        { background: #dbeafe; color: #1d4ed8; }
.jira-status-btn--in_progress { background: #fef3c7; color: #92400e; }
.jira-status-btn--waiting     { background: #ede9fe; color: #5b21b6; }
.jira-status-btn--done        { background: #d1fae5; color: #065f46; }

.jira-status-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 180px;
  background: #fff; border: 1px solid #e6e8ec; border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,.12); z-index: 999; overflow: hidden;
}
.jira-status-option {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 14px; font-size: 13px; font-weight: 600;
  font-family: inherit; background: none; border: 0; cursor: pointer;
  text-align: left; transition: background .1s;
}
.jira-status-option:hover { background: #f9fafb; }
.jira-status-option--disabled { opacity: .5; cursor: not-allowed; }
.jso-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.jira-status-option--open .jso-dot        { background: #1d4ed8; }
.jira-status-option--in_progress .jso-dot { background: #92400e; }
.jira-status-option--waiting .jso-dot     { background: #5b21b6; }
.jira-status-option--done .jso-dot        { background: #065f46; }
.jso-lock { margin-left: auto; font-size: 11px; opacity: .6; }

.jira-issue-title {
  margin: 0 0 20px; font-size: 24px; font-weight: 800; color: #111;
  line-height: 1.3; letter-spacing: -.01em;
}

.jira-layout {
  display: grid; grid-template-columns: minmax(0,1fr) 280px;
  gap: 24px; align-items: start;
}
.jira-main { display: flex; flex-direction: column; }
.jira-side  { display: flex; flex-direction: column; gap: 16px; }

.jira-section { border-bottom: 1px solid #f0f2f5; padding: 16px 0; }
.jira-section:last-child { border-bottom: 0; }
.jira-section--boxed {
  background: #fff; border: 1px solid #e6e8ec;
  border-radius: 8px; padding: 14px 16px;
}
.jira-section__label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: #6b7280; margin: 0 0 10px;
  display: flex; align-items: center; gap: 6px;
}
.jira-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: #f3f4f6; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: #6b7280;
}

.jira-details-grid { display: flex; flex-direction: column; }
.jira-detail-row {
  display: grid; grid-template-columns: 120px 1fr;
  align-items: center; padding: 8px 0;
  border-bottom: 1px solid #f3f4f6; font-size: 13px;
}
.jira-detail-row:last-child { border-bottom: 0; }
.jira-detail-row__label { color: #6b7280; font-weight: 500; }
.jira-detail-row__val   { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.jira-detail-row__empty { color: #9ca3af; font-style: italic; }

.jira-type-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; }

.jira-prio-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 10px;
}
.jira-prio-badge--critical {     background: #f4433663;
    color: #F44336; }
.jira-prio-badge--high     { background: #ffc1073d;
    color: #FFC107; }
.jira-prio-badge--medium   {     background: #0052ff4a;
    color: #0052ff; }
.jira-prio-badge--low      {     background: #4ac12d9c;
    color: #21a700; }
    
.jira-labels { flex-wrap: wrap; }
.jira-label {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 3px;
  font-size: 11px; font-weight: 700; border: 1px solid transparent;
}
.jira-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.jira-dept-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; border: 1px solid transparent; }
.jira-description { font-size: 14px; line-height: 1.7; color: #1c1c1c; word-wrap: break-word; }

.jira-files { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 10px; }
.jira-file {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: #f9fafb; border: 1px solid #e6e8ec; border-radius: 6px;
  overflow: hidden; transition: border-color .12s, box-shadow .12s;
}
.jira-file:hover { border-color: #9ca3af; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.jira-file__thumb { width: 100%; height: 100px; object-fit: cover; display: block; }
.jira-file__icon  { height: 100px; display: flex; align-items: center; justify-content: center; color: #9ca3af; }
.jira-file__body  { padding: 8px 10px; }
.jira-file__body strong { display: block; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jira-file__body span   { display: block; font-size: 10px; color: #9ca3af; }

.jira-activity-section { padding-top: 0; border-bottom: 0; }

.jira-tabs { display: flex; border-bottom: 2px solid #e6e8ec; margin-bottom: 14px; }
.jira-tab {
  padding: 10px 14px; font-size: 13px; font-weight: 600; font-family: inherit;
  background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; cursor: pointer; color: #6b7280;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .12s, border-color .12s;
}
.jira-tab:hover { color: #1c1c1c; }
.jira-tab.is-active { color: #0ea5e9; border-bottom-color: #0ea5e9; }
.jira-tab-panel { padding-top: 4px; }

.jira-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  overflow: hidden; background: #f3f4f6; flex-shrink: 0;
}
.jira-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jira-avatar__init {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: #fff; font-size: 11px; font-weight: 700;
}
.jira-avatar--sm { width: 24px; height: 24px; }
.jira-avatar--sm .jira-avatar__init { font-size: 9px; }

.jira-thread { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.jira-comment { display: flex; gap: 10px; }
.jira-comment__body { flex: 1; min-width: 0; }
.jira-comment__meta { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.jira-comment__meta strong { font-size: 13px; font-weight: 700; color: #111; }
.jira-comment__meta time   { font-size: 11px; color: #9ca3af; }
.jira-comment__text { padding: 10px 12px; background: #f9fafb; border-radius: 6px; font-size: 13px; line-height: 1.6; color: #1c1c1c; word-wrap: break-word; }
.jira-comment__atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.jira-att-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  background: #fff; border: 1px solid #e6e8ec; border-radius: 4px;
  font-size: 11px; font-weight: 500; color: #6b7280; text-decoration: none;
}
.jira-att-chip img { width: 14px; height: 14px; border-radius: 2px; object-fit: cover; }
.jira-att-chip:hover { border-color: #9ca3af; color: #1c1c1c; }

.jira-commentform { margin-top: 14px; }
.jira-commentform__input { display: flex; gap: 10px; align-items: flex-start; }
.jira-commentform__right { flex: 1; min-width: 0; }
.jira-commentform__right textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #e6e8ec; border-radius: 6px;
  font-family: inherit; font-size: 13px; line-height: 1.5; color: #1c1c1c;
  resize: vertical; outline: none; box-sizing: border-box;
}
.jira-commentform__right textarea:focus { border-color: var(--highlight,#e49e00); }
.jira-commentform__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.jira-attach-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #9ca3af; cursor: pointer; transition: color .12s; }
.jira-attach-label:hover { color: #374151; }
.jira-attach-label input[type="file"] { display: none; }
.jira-commentform__actions { display: flex; gap: 6px; }

.jira-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.jira-history__row { display: flex; gap: 10px; }
.jira-history__body { flex: 1; min-width: 0; }
.jira-history__meta { font-size: 12px; color: #6b7280; display: flex; gap: 5px; flex-wrap: wrap; align-items: baseline; }
.jira-history__meta strong { color: #1c1c1c; font-weight: 700; }
.jira-history__meta time   { font-size: 11px; }
.jira-history__changes { list-style: none; margin: 5px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.jira-history__changes li { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #374151; }
.jira-history__changes li span { color: #9ca3af; min-width: 70px; }
.jira-history__changes li em  { font-style: normal; background: #f3f4f6; padding: 1px 6px; border-radius: 3px; }

.jira-person-row {
  display: grid; grid-template-columns: 90px 1fr; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px;
}
.jira-person-row:last-child { border-bottom: 0; }
.jira-person-row__label { color: #6b7280; font-size: 12px; font-weight: 500; }
.jira-person-row__val   { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #1c1c1c; }

.jira-date-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #f3f4f6; font-size: 12px; }
.jira-date-row:last-child { border-bottom: 0; }
.jira-date-row span:first-child { color: #6b7280; }
.jira-date-row span:last-child  { color: #1c1c1c; font-weight: 600; }
.jira-date-row--overdue span    { color: #b91c1c !important; }

.jira-empty { margin: 0; padding: 12px; font-size: 13px; color: #9ca3af; background: #f9fafb; border-radius: 5px; text-align: center; }

.jira-startpopup__overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 9000; }
.jira-startpopup {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 9001; width: 360px; max-width: 94vw; background: #fff;
  border-radius: 12px; padding: 28px 24px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18); text-align: center;
  animation: jsp-in .18s ease;
}
@keyframes jsp-in {
  from { opacity: 0; transform: translate(-50%,-46%); }
  to   { opacity: 1; transform: translate(-50%,-50%); }
}
.jira-startpopup__icon { margin-bottom: 12px; }
.jira-startpopup h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; color: #111; }
.jira-startpopup p  { margin: 0 0 20px; font-size: 14px; color: #6b7280; line-height: 1.5; }
.jira-startpopup__btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 1080px) { .jira-layout { grid-template-columns: 1fr; } .jira-side { order: -1; } }
@media (max-width: 680px)  { .jira-issue-title { font-size: 18px; } .jira-detail-row { grid-template-columns: 100px 1fr; } .jira-status-menu { right: auto; left: 0; } }

/* =====================================================================
   Notification Bell
   ===================================================================== */
.notif-bell-wrap { position: relative; }

.notif-bell-badge {
  position: absolute; top: 6px; right: 6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #ef4444; color: #fff;
  font-size: 9px; font-weight: 800;
  border-radius: 999px;
  border: 2px solid var(--cockpit-surface, #fff);
  display: flex; align-items: center; justify-content: center;
  line-height: 1; pointer-events: none;
  animation: nbounce .3s ease;
}
@keyframes nbounce {
  0%  { transform: scale(0); }
  70% { transform: scale(1.15); }
  100%{ transform: scale(1); }
}

.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: -8px;
  width: 340px; max-width: 94vw;
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.06);
  z-index: 9000;
  overflow: hidden;
  animation: ndrop-in .14s ease;
}
@keyframes ndrop-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.notif-dropdown__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px 10px;
  border-bottom: 1px solid #f0f2f5;
  font-size: 13px; font-weight: 700; color: #1c1c1c;
}
.notif-markall-btn {
  background: none; border: none; cursor: pointer;
  font-size: 11px; font-weight: 600; color: #0ea5e9;
  padding: 0; font-family: inherit;
}
.notif-markall-btn:hover { color: #0284c7; }

.notif-list {
  max-height: 400px; overflow-y: auto;
  scrollbar-width: thin;
}
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: #e2e4e8; border-radius: 999px; }

.notif-empty {
  padding: 28px 16px; text-align: center;
  font-size: 13px; color: #9ca3af;
}

.notif-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 16px;
  border-bottom: 1px solid #f3f4f6;
  text-decoration: none; color: inherit;
  transition: background .1s;
  cursor: pointer;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: #f9fafb; }
.notif-item--unread { background: #fef9ec; }
.notif-item--unread:hover { background: #fef3c7; }

.notif-item__icon {
  flex: 0 0 auto; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: #f3f4f6; border-radius: 50%;
  font-size: 15px; margin-top: 1px;
}
.notif-item--unread .notif-item__icon { background: #fef3c7; }

.notif-item__body { flex: 1; min-width: 0; }
.notif-item__title {
  display: block; font-size: 13px; font-weight: 600;
  color: #1c1c1c; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-item__body-text {
  display: block; font-size: 11px; color: #6b7280; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.notif-item__time {
  flex: 0 0 auto; font-size: 10px; color: #9ca3af;
  white-space: nowrap; margin-top: 2px;
}

/* =====================================================================
   Edit Issue page (.jedit-*)
   ===================================================================== */
.jira-edit-page { max-width: 960px; }

.jedit-alert {
  background: #fee2e2; border: 1px solid #fca5a5; border-radius: 8px;
  padding: 12px 16px; margin-bottom: 18px;
  font-size: 13px; font-weight: 600; color: #991b1b;
  display: flex; flex-direction: column; gap: 4px;
}

.jedit-layout {
  display: grid; grid-template-columns: minmax(0,1fr) 260px;
  gap: 24px; align-items: start;
}

.jedit-main  { display: flex; flex-direction: column; gap: 16px; }
.jedit-side  { display: flex; flex-direction: column; gap: 14px;
               background: #fff; border: 1px solid #e6e8ec;
               border-radius: 10px; padding: 18px; }

.jedit-field { display: flex; flex-direction: column; gap: 6px; }
.jedit-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: #6b7280;
}
.jedit-req { color: #ef4444; }

.jedit-input, .jedit-select {
  height: 38px; padding: 0 12px;
  background: #fff; border: 1px solid #d1d5db;
  border-radius: 6px; font-family: inherit;
  font-size: 14px; color: #1c1c1c; outline: none;
  transition: border-color .12s;
}
.jedit-input:focus, .jedit-select:focus { border-color: var(--highlight,#e49e00); }

.jedit-textarea {
  padding: 10px 12px;
  background: #fff; border: 1px solid #d1d5db;
  border-radius: 6px; font-family: inherit;
  font-size: 14px; line-height: 1.6; color: #1c1c1c;
  resize: vertical; outline: none; min-height: 140px;
  transition: border-color .12s;
}
.jedit-textarea:focus { border-color: var(--highlight,#e49e00); }

.jedit-labels-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.jedit-label-chip { display: inline-flex; align-items: center; cursor: pointer; }
.jedit-label-chip input[type="checkbox"] { display: none; }
.jedit-label-chip span {
  display: inline-flex; align-items: center;
  padding: 4px 11px; border-radius: 4px;
  font-size: 12px; font-weight: 700;
  border: 1px solid transparent;
  opacity: .55; transition: opacity .1s;
}
.jedit-label-chip input:checked + span { opacity: 1; }
.jedit-label-chip:hover span { opacity: .85; }

.jedit-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }

@media (max-width: 768px) {
  .jedit-layout { grid-template-columns: 1fr; }
  .jedit-side   { order: -1; }
}
