/* ---------------------------------------------------------------
   "My stuff" — saved questions, CVs and job descriptions.
   A calm sub-page of Profile, matching the dark Profile shell.
   --------------------------------------------------------------- */

html:has(body.kouli-mystuff-active) {
  background-color: #07070d;
}

body.kouli-mystuff-active {
  background:
    radial-gradient(circle at 50% 6%, rgba(122, 153, 171, 0.22), transparent 46%),
    radial-gradient(circle at 82% 30%, rgba(74, 93, 110, 0.16), transparent 40%),
    radial-gradient(circle at 14% 72%, rgba(74, 93, 110, 0.12), transparent 44%),
    linear-gradient(180deg, #07070d 0%, #08070f 50%, #050509 100%);
  background-color: #07070d;
  background-attachment: fixed;
  color: #fff;
}

body.kouli-mystuff-active #app-header {
  display: none;
}

body.kouli-mystuff-active #mystuff-page {
  min-height: calc(100vh - 78px);
  padding: max(20px, env(safe-area-inset-top)) 18px 40px;
  color: #fff;
}

body.kouli-mystuff-active #mystuff-page > * {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

@media (prefers-reduced-motion: reduce) {
  body.kouli-mystuff-active #mystuff-page * {
    transition: none !important;
    animation: none !important;
  }
}

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.kouli-mystuff-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.kouli-mystuff-topbar h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.kouli-mystuff-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  min-height: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.kouli-mystuff-back svg {
  display: block;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.kouli-mystuff-back:hover,
.kouli-mystuff-back:focus-visible {
  border-color: rgba(122, 153, 171, 0.5);
  color: #fff;
  outline: none;
}

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.kouli-mystuff-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.kouli-mystuff-tab {
  flex: 1 1 0;
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.84rem;
  font-weight: 750;
  padding: 9px 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.kouli-mystuff-tab.is-active {
  background:
    linear-gradient(135deg, rgba(0, 196, 160, 0.26), rgba(0, 196, 160, 0.12)),
    rgba(255, 255, 255, 0.05);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 196, 160, 0.55);
}

/* ── Panels ─────────────────────────────────────────────────────────────── */
.kouli-mystuff-panel.hidden { display: none; }

.kouli-mystuff-hint {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.85rem;
  line-height: 1.5;
}

.kouli-mystuff-message {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.kouli-mystuff-message.is-error {
  background: rgba(248, 113, 113, 0.12);
  color: rgba(254, 202, 202, 0.95);
}

.kouli-mystuff-message.hidden { display: none; }

/* ── Lists & items ──────────────────────────────────────────────────────── */
.kouli-mystuff-list {
  display: grid;
  gap: 10px;
}

.kouli-mystuff-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.kouli-mystuff-item-text {
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  white-space: pre-wrap;
  word-break: break-word;
}

.kouli-mystuff-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 750;
}

.kouli-mystuff-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border: 1px solid rgba(122, 153, 171, 0.28);
  background: rgba(122, 153, 171, 0.1);
  color: rgba(208, 222, 230, 0.92);
  text-transform: uppercase;
}

.kouli-mystuff-badge.is-active {
  border-color: rgba(0, 196, 160, 0.42);
  background: rgba(0, 196, 160, 0.14);
  color: rgba(178, 240, 226, 0.96);
}

.kouli-mystuff-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kouli-mystuff-action {
  appearance: none;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.76rem;
  font-weight: 750;
  padding: 6px 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.kouli-mystuff-action:hover:not(:disabled),
.kouli-mystuff-action:focus-visible {
  border-color: rgba(122, 153, 171, 0.5);
  color: #fff;
  outline: none;
}

.kouli-mystuff-action.is-danger:hover:not(:disabled),
.kouli-mystuff-action.is-danger:focus-visible {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(248, 113, 113, 0.14);
  color: #fff;
}

.kouli-mystuff-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.kouli-mystuff-empty {
  margin: 0;
  padding: 22px 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.88rem;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
}

/* Inline edit textarea for a saved question */
.kouli-mystuff-edit {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(122, 153, 171, 0.4);
  background: rgba(8, 8, 18, 0.6);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.45;
  padding: 10px 12px;
  resize: vertical;
}

.kouli-mystuff-edit:focus-visible {
  outline: none;
  border-color: rgba(0, 229, 192, 0.7);
}

/* ── Add composer (JDs) ─────────────────────────────────────────────────── */
.kouli-mystuff-add {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.kouli-mystuff-add input,
.kouli-mystuff-add textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 8, 18, 0.6);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.45;
  padding: 10px 12px;
  resize: vertical;
}

.kouli-mystuff-add input:focus-visible,
.kouli-mystuff-add textarea:focus-visible {
  outline: none;
  border-color: rgba(0, 229, 192, 0.6);
}

.kouli-mystuff-add-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.kouli-mystuff-add-note {
  margin: -2px 0 4px;
  font-size: 0.76rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.42);
}

.kouli-mystuff-url-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.kouli-mystuff-url-row input {
  flex: 1 1 auto;
}

.kouli-mystuff-url-row .kouli-mystuff-action {
  flex: 0 0 auto;
  align-self: stretch;
  padding: 0 16px;
}

.kouli-mystuff-primary {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(122, 153, 171, 0.32), rgba(74, 93, 110, 0.4)),
    rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  -webkit-tap-highlight-color: transparent;
}

.kouli-mystuff-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Profile entry button ───────────────────────────────────────────────── */
.kouli-mystuff-entry {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  appearance: none;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    rgba(10, 10, 18, 0.6);
  color: #fff;
  padding: 16px;
  margin-bottom: 22px;
  -webkit-tap-highlight-color: transparent;
}

.kouli-mystuff-entry:hover,
.kouli-mystuff-entry:focus-visible {
  border-color: rgba(122, 153, 171, 0.45);
  outline: none;
}

.kouli-mystuff-entry-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(122, 153, 171, 0.28);
  background: rgba(122, 153, 171, 0.1);
  color: rgba(208, 222, 230, 0.95);
}

.kouli-mystuff-entry-icon svg { width: 22px; height: 22px; }

.kouli-mystuff-entry-text {
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
}

.kouli-mystuff-entry-title {
  font-size: 1rem;
  font-weight: 800;
}

.kouli-mystuff-entry-sub {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.56);
}

.kouli-mystuff-entry-chevron {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.4);
}
