.ghost-btn,
.primary-btn,
.add-task {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease, color 0.2s ease;
}

.ghost-btn {
  background: rgba(16, 22, 30, 0.6);
  color: var(--text-2);
}

body[data-theme="light"] .ghost-btn {
  background: rgba(255, 255, 255, 0.7);
  color: rgba(15, 20, 28, 0.7);
}

body[data-theme="light"] .ghost-btn:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-1);
}

.ghost-btn:hover {
  color: var(--text-1);
  border-color: var(--stroke-strong);
}

.primary-btn {
  background: linear-gradient(135deg, rgba(68, 210, 199, 0.9), rgba(44, 115, 255, 0.9));
  color: #071017;
  border: none;
  box-shadow: 0 12px 24px rgba(24, 109, 140, 0.35);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(24, 109, 140, 0.45);
}

.user-add-btn {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(68, 210, 199, 0.9), rgba(44, 115, 255, 0.9));
  color: #071017;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(24, 109, 140, 0.4);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(16, 22, 30, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.2s ease, border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.icon-btn[hidden] {
  display: none !important;
}

.icon-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.icon-btn:hover {
  color: var(--text-1);
  border-color: var(--stroke-strong);
  background: rgba(16, 22, 30, 0.9);
  transform: translateY(-1px);
}

body[data-theme="light"] .icon-btn {
  background: rgba(255, 255, 255, 0.72);
  color: rgba(15, 20, 28, 0.65);
}

body[data-theme="light"] .icon-btn:hover {
  background: rgba(255, 255, 255, 0.92);
}

.notifications-btn,
.spaces-notifications-btn {
  position: relative;
}

.notifications-btn.has-unread::before,
.spaces-notifications-btn.has-unread::before {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid rgba(14, 19, 26, 0.95);
  background: rgba(239, 68, 68, 0.95);
  box-shadow: 0 8px 18px rgba(195, 44, 44, 0.38);
  pointer-events: none;
}

body[data-theme="light"] .notifications-btn.has-unread::before,
body[data-theme="light"] .spaces-notifications-btn.has-unread::before {
  border-color: rgba(255, 255, 255, 0.95);
}

.notifications-panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.notifications-mark-all {
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(54vh, 520px);
  overflow-y: auto;
  padding-right: 4px;
  padding-top: 4px;
  padding-bottom: 4px;
}

@keyframes bell-wiggle {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(-16deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-10deg); }
  80% { transform: rotate(6deg); }
  100% { transform: rotate(0deg); }
}

.notification-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(16, 22, 30, 0.6);
  color: var(--text-1);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.notification-item:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(20, 28, 38, 0.76);
  transform: translateY(-1px);
}

.notification-item:focus-visible {
  outline: 2px solid rgba(68, 210, 199, 0.55);
  outline-offset: 1px;
}

body[data-theme="light"] .notification-item {
  background: rgba(255, 255, 255, 0.74);
}

body[data-theme="light"] .notification-item:hover {
  border-color: rgba(15, 20, 28, 0.18);
  background: rgba(255, 255, 255, 0.9);
}

.notification-item.is-read {
  opacity: 0.78;
}

.notification-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 18px;
}

.notification-icon--deadline {
  background: rgba(248, 113, 113, 0.18);
}

.notification-icon--approved {
  background: rgba(74, 222, 128, 0.18);
}

.notification-icon--pending {
  background: rgba(185, 196, 216, 0.2);
}

.notification-icon--rejected {
  background: rgba(248, 113, 113, 0.18);
}

.notification-icon--invite {
  background: rgba(68, 210, 199, 0.18);
}

.notification-icon--workspace {
  background: rgba(240, 195, 106, 0.2);
}

.notification-icon--generic {
  background: rgba(185, 196, 216, 0.2);
}

.notification-body {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notification-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.notification-action {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(16, 22, 30, 0.55);
  color: var(--text-1);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.notification-action:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(20, 28, 38, 0.76);
  transform: translateY(-1px);
}

.notification-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.notification-action--accept {
  border-color: rgba(74, 222, 128, 0.25);
}

.notification-action--reject {
  border-color: rgba(248, 113, 113, 0.25);
}

body[data-theme="light"] .notification-action {
  background: rgba(255, 255, 255, 0.74);
  color: rgba(15, 20, 28, 0.9);
}

body[data-theme="light"] .notification-action:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 20, 28, 0.18);
}

.app-footer {
  margin-top: auto;
  width: min(860px, 100%);
  margin-inline: auto;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: rgba(16, 22, 30, 0.55);
}

body[data-theme="light"] .app-footer {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 20, 28, 0.14);
}

.app-footer-gh {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stroke);
  background: rgba(12, 18, 26, 0.55);
  color: var(--text-1);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.app-footer-gh:hover,
.app-footer-gh:focus-visible {
  transform: translateY(-1px);
  border-color: var(--stroke-strong);
  background: rgba(20, 28, 38, 0.72);
  box-shadow: 0 14px 26px rgba(7, 10, 16, 0.35);
}

.app-footer-gh svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

body[data-theme="light"] .app-footer-gh {
  background: rgba(255, 255, 255, 0.86);
  color: rgba(15, 20, 28, 0.85);
}

body[data-theme="light"] .app-footer-gh:hover,
body[data-theme="light"] .app-footer-gh:focus-visible {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 26px rgba(15, 20, 28, 0.12);
}

.app-footer-bar {
  padding: 8px 12px;
  background: rgba(7, 10, 16, 0.72);
  border-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-3);
  font-size: 12px;
}

body[data-theme="light"] .app-footer-bar {
  background: rgba(15, 20, 28, 0.85);
  color: rgba(255, 255, 255, 0.78);
}

.app-footer-bar a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  padding-bottom: 1px;
}

.app-footer-bar .app-footer-gh {
  border-bottom: 0;
  padding-bottom: 0;
}

.app-footer-bar a:hover,
.app-footer-bar a:focus-visible {
  border-bottom-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.notification-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-1);
}

.notification-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.35;
}

.notification-meta {
  font-size: 11px;
  color: var(--text-3);
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-top: 7px;
  background: var(--accent);
  flex: 0 0 auto;
}

.notification-item.is-read .notification-dot {
  opacity: 0;
}

.task-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10;
}

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

.task-modal:not([hidden]) .task-modal-card {
  animation: modal-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.task-modal:not([hidden]) .task-modal-backdrop {
  animation: modal-fade 0.25s ease;
}

.task-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 16, 0.72);
  backdrop-filter: blur(6px);
}

.task-modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  max-height: min(90vh, 760px);
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.task-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-modal-kicker {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
}

.task-modal-title {
  margin: 6px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 600;
}

.task-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
}

.task-field input,
.task-field textarea,
.task-field select {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(12, 18, 26, 0.85);
  color: var(--text-1);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.task-field textarea {
  resize: vertical;
}

.task-field input:focus,
.task-field textarea:focus,
.task-field select:focus {
  border-color: rgba(68, 210, 199, 0.6);
  box-shadow: 0 0 0 1px rgba(68, 210, 199, 0.25);
}

body[data-theme="light"] .task-field input,
body[data-theme="light"] .task-field textarea,
body[data-theme="light"] .task-field select {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 20, 28, 0.16);
}

body[data-theme="light"] .task-field input::placeholder,
body[data-theme="light"] .task-field textarea::placeholder {
  color: rgba(15, 20, 28, 0.45);
}

.task-field-theme {
  position: relative;
}

.task-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.task-field-row > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 640px) {
  .task-field-row {
    grid-template-columns: 1fr;
  }
}

.theme-picker {
  position: relative;
  display: flex;
  align-items: center;
}

.theme-picker input {
  width: 100%;
  padding-right: 44px;
}

.theme-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: rgba(16, 22, 30, 0.75);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.theme-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle:hover {
  color: var(--text-1);
  border-color: var(--stroke-strong);
  background: rgba(16, 22, 30, 0.9);
  transform: translateY(-50%) translateY(-1px);
}

body[data-theme="light"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-1);
}

body[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.72);
  color: rgba(15, 20, 28, 0.65);
}

.theme-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 2;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(16, 22, 30, 0.95);
  box-shadow: 0 16px 30px rgba(7, 10, 16, 0.45);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

body[data-theme="light"] .theme-options {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 34px rgba(15, 20, 28, 0.12);
}

.theme-options[hidden] {
  display: none;
}

.theme-option {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(16, 22, 30, 0.6);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, border 0.2s ease, background 0.2s ease;
}

body[data-theme="light"] .theme-option {
  background: rgba(255, 255, 255, 0.68);
  color: rgba(15, 20, 28, 0.72);
  border-color: rgba(15, 20, 28, 0.12);
}

body[data-theme="light"] .theme-option:hover,
body[data-theme="light"] .theme-option.is-selected {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-1);
}

.theme-option:hover,
.theme-option.is-selected {
  color: var(--text-1);
  border-color: var(--stroke-strong);
  background: rgba(24, 34, 46, 0.8);
}

.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-option {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(16, 22, 30, 0.6);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border 0.2s ease;
}

body[data-theme="light"] .tag-option {
  background: rgba(255, 255, 255, 0.72);
  color: rgba(15, 20, 28, 0.72);
  border-color: rgba(15, 20, 28, 0.12);
}

body[data-theme="light"] .tag-option:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-1);
}

.tag-option:hover {
  color: var(--text-1);
  border-color: var(--stroke-strong);
}

.tag-empty {
  font-size: 12px;
  color: var(--text-3);
}

.tag-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 26px;
}

.tag-preview:empty {
  display: none;
}

.task-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modal-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
