:root {
      --ink: #151722;
      --muted: #8b8f99;
      --line: #ececf4;
      --paper: #f7f7fb;
      --panel: #ffffff;
      --navy: #6757e8;
      --teal: #5f54e9;
      --copper: #ff8b33;
      --plum: #8a6cff;
      --sage: #b9d94f;
      --blue: #49b6ff;
      --danger: #f05578;
      --shadow: 0 24px 60px rgba(94, 93, 135, .14);
      --radius: 22px;
      font-family: "Plus Jakarta Sans", "Manrope", "Inter", "Aptos", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      min-height: 100vh;
      color: var(--ink);
      background:
        radial-gradient(circle at 92% 6%, rgba(103, 87, 232, .18) 0 120px, transparent 121px),
        radial-gradient(circle at 3% 96%, rgba(185, 217, 79, .16) 0 110px, transparent 111px),
        linear-gradient(135deg, #eef1ff 0%, #f8f8fc 44%, #f5f6ef 100%);
      letter-spacing: 0;
      font-weight: 400;
    }

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

    .shell {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 252px minmax(0, 1fr);
      margin: 18px;
      border-radius: 26px;
      overflow: hidden;
      background: rgba(255, 255, 255, .74);
      box-shadow: 0 30px 90px rgba(82, 85, 130, .18);
      backdrop-filter: blur(16px);
    }

    .sidebar {
      background: rgba(255, 255, 255, .92);
      color: var(--ink);
      padding: 24px 18px;
      display: flex;
      flex-direction: column;
      gap: 22px;
      border-right: 1px solid var(--line);
      scrollbar-width: none;
    }

    .sidebar::-webkit-scrollbar { display: none; }

    .brand {
      padding: 0 6px 18px;
      border-bottom: 1px solid var(--line);
    }

    .brand strong {
      display: block;
      font-weight: 750;
      font-size: 28px;
      line-height: 1;
      color: var(--teal);
    }

    .brand span {
      display: block;
      margin-top: 7px;
      color: var(--muted);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .nav {
      display: grid;
      gap: 6px;
    }

    .nav button,
    .nav a {
      min-height: 42px;
      width: 100%;
      display: grid;
      grid-template-columns: 24px 1fr;
      align-items: center;
      gap: 8px;
      padding: 8px 10px;
      color: var(--muted);
      background: transparent;
      border: 1px solid transparent;
      border-radius: 18px;
      text-align: left;
      cursor: pointer;
      font-weight: 550;
      text-decoration: none;
      box-sizing: border-box;
    }

    .nav button.active,
    .nav button:hover,
    .nav a.active,
    .nav a:hover {
      background: rgba(103, 87, 232, .12);
      border-color: rgba(103, 87, 232, .14);
      color: var(--teal);
    }

    .project-nav {
      display: grid;
      gap: 8px;
      padding: 2px 0 0;
    }

    .project-title {
      border: 0;
      background: transparent;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 0 8px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      cursor: pointer;
    }

    .project-nav > .project-title {
      display: none;
    }

    .project-list {
      display: grid;
      gap: 8px;
    }

    .project-nav.collapsed .project-list {
      display: none;
    }

    .project-arrow {
      transition: transform .18s ease;
    }

    .project-nav.collapsed .project-arrow {
      transform: rotate(-90deg);
    }

    .project-channel {
      min-height: 36px;
      width: 100%;
      display: grid;
      grid-template-columns: 20px minmax(0, 1fr) 26px 26px;
      align-items: center;
      gap: 8px;
      padding: 7px 10px;
      border: 1px solid transparent;
      border-radius: 14px;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      text-align: left;
      font-weight: 650;
    }

    .project-group {
      display: grid;
      gap: 4px;
    }

    .project-group-title {
      min-height: 34px;
      width: 100%;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 26px 26px 26px;
      align-items: center;
      gap: 6px;
      padding: 7px 8px;
      border: 1px solid transparent;
      border-radius: 14px;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      text-align: left;
      font-size: 12px;
      font-weight: 780;
      text-transform: uppercase;
    }

    .project-group-title:hover,
    .project-group-title.active {
      background: rgba(103, 87, 232, .08);
      color: var(--ink);
    }

    .project-group-edit,
    .project-group-delete,
    .project-product-edit,
    .project-product-delete {
      width: 24px;
      height: 24px;
      border: 0;
      border-radius: 50%;
      display: inline-grid;
      place-items: center;
      background: rgba(240, 85, 120, .1);
      color: var(--danger);
      cursor: pointer;
      font-weight: 900;
      line-height: 1;
    }

    .project-group-edit,
    .project-product-edit {
      background: rgba(103, 87, 232, .1);
      color: var(--teal);
    }

    .project-group-edit:hover,
    .project-product-edit:hover {
      background: var(--teal);
      color: #fff;
    }

    .project-group-delete:hover,
    .project-product-delete:hover {
      background: var(--danger);
      color: #fff;
    }

    .project-products {
      display: grid;
      gap: 4px;
    }

    .project-group.collapsed .project-products {
      display: none;
    }

    .project-group.collapsed .project-group-title .project-arrow {
      transform: rotate(-90deg);
    }

    .project-channel:hover,
    .project-channel.active {
      background: rgba(103, 87, 232, .1);
      border-color: rgba(103, 87, 232, .16);
      color: var(--ink);
    }

    .project-channel span:first-child {
      color: var(--teal);
      font-weight: 850;
    }

    .project-product-delete {
      opacity: .55;
      pointer-events: auto;
    }

    .project-channel:hover .project-product-delete,
    .project-channel.active .project-product-delete {
      opacity: 1;
      pointer-events: auto;
    }

    .project-add {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 34px;
      gap: 6px;
      padding: 6px 4px 0;
    }

    .project-add input {
      min-width: 0;
      min-height: 34px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fff;
      color: var(--ink);
      padding: 0 9px;
      font-size: 12px;
      outline: none;
    }

    .project-add button {
      min-height: 34px;
      border: 0;
      border-radius: 14px;
      background: var(--teal);
      color: #fff;
      cursor: pointer;
      font-weight: 900;
    }

    .project-nav {
      margin-top: 4px;
      padding: 10px 8px;
      border: 1px solid rgba(103, 87, 232, .12);
      border-radius: 16px;
      background: linear-gradient(180deg, rgba(246, 244, 255, .96), rgba(255, 255, 255, .9));
      color: var(--ink);
      box-shadow: 0 18px 42px rgba(94, 93, 135, .08);
      gap: 6px;
    }

    .project-nav > .project-title,
    .project-nav > .project-add {
      display: none;
    }

    .project-list {
      gap: 3px;
    }

    .project-new-category {
      width: 100%;
      min-height: 30px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 24px;
      align-items: center;
      gap: 8px;
      padding: 5px 6px;
      border: 0;
      border-radius: 7px;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      text-align: left;
      font-size: 12px;
      font-weight: 500;
    }

    .project-new-category:hover {
      background: rgba(103, 87, 232, .1);
      color: var(--ink);
    }

    .project-group {
      gap: 2px;
      padding-top: 3px;
    }

    .project-group-title {
      min-height: 28px;
      grid-template-columns: 14px minmax(0, 1fr) 24px 24px 24px;
      gap: 4px;
      padding: 4px 6px;
      border-radius: 6px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 520;
      letter-spacing: 0;
      text-transform: none;
    }

    .project-group-title:hover,
    .project-group-title.active {
      background: rgba(103, 87, 232, .1);
      border-color: transparent;
      color: var(--ink);
    }

    .project-group-title .project-arrow {
      grid-column: 1;
      color: var(--muted);
      font-size: 12px;
    }

    .project-group-title .project-name {
      grid-column: 2;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: normal;
      line-height: 1.15;
    }

    .project-category-add,
    .project-group-edit,
    .project-group-delete,
    .project-product-edit,
    .project-product-delete {
      width: 22px;
      height: 22px;
      border-radius: 6px;
      background: transparent;
      color: var(--muted);
      font-size: 14px;
      opacity: .82;
    }

    .project-category-add:hover,
    .project-group-edit:hover,
    .project-product-edit:hover {
      background: var(--teal);
      color: #fff;
    }

    .project-group-delete:hover,
    .project-product-delete:hover {
      background: rgba(240, 85, 120, .16);
      color: var(--danger);
    }

    .project-products {
      gap: 1px;
    }

    .project-channel {
      min-height: 30px;
      grid-template-columns: 18px minmax(0, 1fr) 24px 24px;
      gap: 5px;
      padding: 5px 6px 5px 14px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: #747887;
      font-weight: 470;
    }

    .project-channel:hover,
    .project-channel.active {
      background: rgba(103, 87, 232, .12);
      border-color: transparent;
      color: var(--ink);
    }

    .project-channel span:first-child {
      color: var(--teal);
      font-weight: 520;
      font-size: 18px;
      line-height: 1;
    }

    .project-channel span:nth-child(2) {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: normal;
      line-height: 1.15;
    }

    .project-product-edit,
    .project-product-delete,
    .project-group-edit,
    .project-group-delete,
    .project-category-add {
      opacity: 0;
      pointer-events: none;
    }

    .project-channel:hover .project-product-edit,
    .project-channel:hover .project-product-delete,
    .project-channel.active .project-product-edit,
    .project-channel.active .project-product-delete,
    .project-group-title:hover .project-category-add,
    .project-group-title:hover .project-group-edit,
    .project-group-title:hover .project-group-delete,
    .project-group-title.active .project-category-add,
    .project-group-title.active .project-group-edit,
    .project-group-title.active .project-group-delete {
      opacity: 1;
      pointer-events: auto;
    }

    .project-group.collapsed .project-group-title .project-arrow {
      transform: rotate(-90deg);
    }

    .sidebar-note {
      margin-top: auto;
      padding: 18px 6px 0;
      border-top: 1px solid var(--line);
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    main {
      min-width: 0;
      padding: 28px;
      display: grid;
      /* Satırlar üstten paketlensin; aksi halde (align-content: normal=stretch)
         100vh yüksekliğinde auto satırlar gerilip içeriği aşağı iter — özellikle
         stats/liste olmayan kullanicilar.php ve ayarlar.php'de. */
      align-content: start;
      gap: 18px;
      background: rgba(248, 248, 252, .84);
    }

    .topbar {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 16px;
      align-items: start;
    }

    h1 {
      margin: 0;
      font-weight: 750;
      font-size: clamp(28px, 4vw, 42px);
      line-height: 1;
      letter-spacing: 0;
    }

    .lead {
      margin: 9px 0 0;
      color: var(--muted);
      line-height: 1.5;
      max-width: 820px;
    }

    .actions,
    .filters,
    .row-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .icon-btn,
    .primary-btn,
    .ghost-btn {
      min-height: 40px;
      border-radius: var(--radius);
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--ink);
      cursor: pointer;
      box-shadow: 0 12px 28px rgba(94, 93, 135, .1);
      font-weight: 650;
      position: relative;
      overflow: hidden;
      transition: transform .14s ease, box-shadow .2s ease, filter .2s ease, background .2s ease;
    }

    .icon-btn:active,
    .primary-btn:active,
    .ghost-btn:active {
      transform: scale(.96);
      filter: brightness(1.04);
    }

    .icon-btn {
      width: 42px;
      display: inline-grid;
      place-items: center;
      font-size: 17px;
    }

    .primary-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 0 14px;
      background: var(--teal);
      border-color: var(--teal);
      color: #fff;
    }

    .primary-btn.confirming {
      animation: confirmPulse .72s ease;
    }

    .primary-btn.confirming::after {
      content: "";
      position: absolute;
      inset: -40%;
      background: radial-gradient(circle, rgba(255, 255, 255, .75) 0 9%, transparent 10% 100%);
      animation: confirmFlash .72s ease;
      pointer-events: none;
    }

    .ghost-btn {
      padding: 0 12px;
      background: #fff;
    }

    .toast {
      position: fixed;
      right: 24px;
      top: 24px;
      z-index: 50;
      min-height: 46px;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 0 16px;
      border-radius: 18px;
      background: #151722;
      color: #fff;
      box-shadow: 0 18px 42px rgba(21, 23, 34, .22);
      font-weight: 720;
      transform: translateY(-14px) scale(.96);
      opacity: 0;
      pointer-events: none;
      transition: transform .24s ease, opacity .24s ease;
    }

    .toast.show {
      transform: translateY(0) scale(1);
      opacity: 1;
    }

    .toast span {
      width: 24px;
      height: 24px;
      display: inline-grid;
      place-items: center;
      border-radius: 50%;
      background: var(--sage);
      color: #151722;
    }

    @keyframes confirmPulse {
      0% { transform: scale(1); box-shadow: 0 12px 28px rgba(94, 93, 135, .1); }
      35% { transform: scale(.96); box-shadow: 0 8px 18px rgba(94, 93, 135, .08); }
      65% { transform: scale(1.03); box-shadow: 0 0 0 7px rgba(185, 217, 79, .22), 0 18px 34px rgba(103, 87, 232, .22); }
      100% { transform: scale(1); box-shadow: 0 12px 28px rgba(94, 93, 135, .1); }
    }

    @keyframes confirmFlash {
      0% { opacity: 0; transform: scale(.4); }
      35% { opacity: 1; }
      100% { opacity: 0; transform: scale(1.2); }
    }

    .stats {
      display: grid;
      grid-template-columns: repeat(4, minmax(150px, 1fr));
      gap: 12px;
    }

    .stat,
    .panel,
    .detail {
      background: rgba(255, 254, 250, .94);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }

    .stat {
      min-height: 110px;
      padding: 18px;
    }

    .stat span {
      color: var(--muted);
      font-size: 13px;
    }

    .stat strong {
      display: block;
      margin-top: 8px;
      font-size: 28px;
      letter-spacing: 0;
      font-weight: 720;
    }

    .stat small {
      display: block;
      margin-top: 8px;
      color: #7aa025;
      font-weight: 700;
    }

    .workbench {
      display: grid;
      grid-template-columns: minmax(0, 1.55fr) minmax(320px, .9fr);
      gap: 16px;
      align-items: start;
    }

    /* Detay paneli olmayan sayfalarda (kullanicilar.php, ayarlar.php) tek panel
       tam genişlik kaplasın; boş sağ sütun paneli sıkıştırmasın. */
    .workbench:has(> .panel:only-child) {
      grid-template-columns: minmax(0, 1fr);
    }

    .panel-head,
    .detail-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      padding: 16px;
      border-bottom: 1px solid var(--line);
    }

    .panel-title {
      display: grid;
      gap: 10px;
    }

    .panel-tabs {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .tab-btn {
      min-height: 34px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: #fff;
      color: var(--muted);
      padding: 0 12px;
      cursor: pointer;
      font-weight: 650;
      box-shadow: 0 8px 18px rgba(94, 93, 135, .06);
    }

    .tab-btn.active {
      background: var(--teal);
      border-color: var(--teal);
      color: #fff;
    }

    h2 {
      margin: 0;
      font-size: 18px;
      letter-spacing: 0;
      font-weight: 900;
    }

    .field,
    .select {
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fff;
      color: var(--ink);
      padding: 0 10px;
      box-shadow: 0 8px 22px rgba(94, 93, 135, .06);
    }

    .product-filter {
      width: 150px;
      border-color: rgba(103, 87, 232, .22);
      background: #fff;
    }

    .product-picker {
      position: relative;
      width: 150px;
    }

    .product-picker .product-filter {
      width: 100%;
      padding-right: 30px;
    }

    .product-picker::after {
      content: "⌄";
      position: absolute;
      right: 10px;
      top: 8px;
      color: var(--muted);
      pointer-events: none;
      font-size: 15px;
    }

    .product-menu {
      position: absolute;
      z-index: 20;
      top: calc(100% + 6px);
      left: 0;
      width: min(280px, 78vw);
      max-height: 240px;
      overflow-y: auto;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: #fff;
      box-shadow: 0 18px 42px rgba(94, 93, 135, .18);
      padding: 6px;
      display: none;
    }

    .form-grid .product-picker {
      width: 100%;
    }

    .form-grid .product-picker::after {
      top: 34px;
    }

    .product-menu.open {
      display: grid;
      gap: 4px;
    }

    .product-option {
      min-height: 36px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: var(--ink);
      text-align: left;
      padding: 8px 10px;
      cursor: pointer;
      box-shadow: none;
    }

    .product-option:hover,
    .product-option.active {
      background: rgba(35, 99, 93, .09);
      color: var(--teal);
    }

    .product-option.muted {
      color: var(--muted);
      cursor: default;
    }

    .product-option.muted:hover {
      background: transparent;
      color: var(--muted);
    }

    .supplier-list {
      display: grid;
      gap: 10px;
      padding: 16px;
    }

    .notebook {
      display: none;
      gap: 14px;
      padding: 16px;
    }

    .notebook.active {
      display: grid;
    }

    .settings-panel {
      display: none;
      gap: 12px;
      padding: 16px;
    }

    .settings-panel.active {
      display: grid;
    }

    /* ---------- Kullanıcı yönetimi (Admin, T2) ---------- */
    .users-panel {
      display: none;
      gap: 14px;
      padding: 16px;
    }

    .users-panel.active {
      display: grid;
    }

    .users-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }

    .users-head h2 {
      margin: 0;
    }

    .users-lead {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
    }

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

    .user-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: #fff;
      padding: 14px 16px;
      box-shadow: 0 12px 26px rgba(94, 93, 135, .08);
    }

    .user-main {
      display: grid;
      gap: 4px;
      min-width: 0;
    }

    .user-name {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      font-weight: 700;
      color: var(--ink);
    }

    .user-role {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .04em;
      color: var(--teal);
      background: rgba(103, 87, 232, .1);
      border-radius: 999px;
      padding: 2px 8px;
    }

    .user-meta {
      color: var(--muted);
      font-size: 13px;
      overflow-wrap: anywhere;
    }

    .user-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .user-self-note {
      color: var(--muted);
      font-size: 12px;
      font-style: italic;
    }

    .status-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      font-weight: 700;
      border-radius: 999px;
      padding: 4px 10px;
      white-space: nowrap;
    }

    .status-badge::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: currentColor;
    }

    .status-badge.warn {
      color: #b9821a;
      background: rgba(255, 176, 32, .16);
    }

    .status-badge.ok {
      color: #2f9e63;
      background: rgba(47, 158, 99, .14);
    }

    .status-badge.muted {
      color: var(--danger);
      background: rgba(240, 85, 120, .12);
    }

    .user-action-btn {
      min-height: 36px;
      padding: 0 14px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: #fff;
      color: var(--ink);
      font-weight: 650;
      cursor: pointer;
      transition: transform .14s ease, filter .2s ease;
    }

    .user-action-btn:active { transform: scale(.96); }
    .user-action-btn:disabled { opacity: .55; cursor: default; }

    .user-action-btn.primary {
      background: var(--teal);
      border-color: var(--teal);
      color: #fff;
    }

    .user-action-btn.danger {
      background: rgba(240, 85, 120, .1);
      border-color: rgba(240, 85, 120, .3);
      color: var(--danger);
    }

    .users-state {
      color: var(--muted);
      border: 1px dashed #d4d8d6;
      border-radius: var(--radius);
      padding: 18px;
      background: rgba(255, 255, 255, .64);
      text-align: center;
    }

    .users-state.error {
      color: var(--danger);
      border-color: rgba(240, 85, 120, .4);
      background: rgba(240, 85, 120, .08);
    }

    /* ---------- Mobil menü (hamburger) — masaüstünde gizli ---------- */
    .menu-toggle,
    .menu-backdrop,
    .detail-close {
      display: none;
    }

    .detail-close {
      place-items: center;
      width: 40px;
      height: 40px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: #fff;
      color: var(--ink);
      font-size: 18px;
      cursor: pointer;
    }

    @media (max-width: 720px) {
      .user-row { grid-template-columns: 1fr; }
      .user-actions { justify-content: flex-start; }
    }

    /* ---------- Kullanıcılar tablosu (redesign, çok-sayfa) ---------- */
    .users-page {
      display: grid;
      gap: 14px;
      padding: 16px;
    }

    .users-table-wrap {
      overflow-x: auto;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: #fff;
      box-shadow: 0 12px 26px rgba(94, 93, 135, .08);
    }

    .user-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 14px;
      min-width: 640px;
    }

    .user-table thead th {
      text-align: left;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .04em;
      color: var(--muted);
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
      white-space: nowrap;
    }

    .user-table tbody td {
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
      vertical-align: middle;
    }

    .user-table tbody tr:last-child td {
      border-bottom: none;
    }

    .user-table tbody tr:hover {
      background: rgba(103, 87, 232, .04);
    }

    .user-table .col-name {
      font-weight: 700;
      color: var(--ink);
    }

    .user-table .col-email {
      color: var(--muted);
      overflow-wrap: anywhere;
    }

    .user-table .col-date {
      color: var(--muted);
      white-space: nowrap;
    }

    .user-table .col-action {
      text-align: right;
      white-space: nowrap;
    }

    .role-tag {
      display: inline-block;
      font-size: 12px;
      font-weight: 650;
      color: var(--muted);
      background: rgba(139, 143, 153, .12);
      border-radius: 999px;
      padding: 3px 10px;
    }

    .role-tag.admin {
      color: var(--teal);
      background: rgba(103, 87, 232, .12);
    }

    .note-composer,
    .saved-note,
    .settings-card {
      display: grid;
      gap: 10px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: #fff;
      padding: 14px;
      box-shadow: 0 12px 26px rgba(94, 93, 135, .08);
    }

    .settings-card p {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
      font-size: 14px;
    }

    .note-composer textarea {
      width: 100%;
      min-height: 130px;
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 12px;
      resize: vertical;
      outline: none;
      color: var(--ink);
      background: #fbfbff;
    }

    .note-composer textarea:focus {
      border-color: rgba(103, 87, 232, .38);
      box-shadow: 0 0 0 4px rgba(103, 87, 232, .08);
    }

    .note-actions {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
      justify-content: space-between;
    }

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

    .saved-note-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .saved-note time {
      color: var(--muted);
      font-size: 12px;
      font-weight: 650;
    }

    .note-read {
      display: block;
      min-height: 150px;
      margin: 0;
      color: var(--ink);
      line-height: 1.5;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }

    .note-read a {
      color: #2f63d8;
      font-weight: 750;
      text-decoration: underline;
      text-underline-offset: 3px;
      overflow-wrap: anywhere;
    }

    .note-read a:hover {
      color: var(--teal);
    }

    .saved-note-body {
      display: grid;
      gap: 8px;
    }

    .note-edit-text {
      width: 100%;
      min-height: 150px;
      display: none;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fbfbff;
      color: var(--ink);
      padding: 10px;
      resize: vertical;
      outline: none;
      line-height: 1.5;
    }

    .saved-note.editing .note-read {
      display: none;
    }

    .saved-note.editing .note-edit-text {
      display: block;
    }

    .note-images {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .note-images img {
      width: 100%;
      aspect-ratio: 1 / 1;
      object-fit: cover;
      border-radius: 14px;
      border: 1px solid var(--line);
      background: #f8f8ff;
      cursor: zoom-in;
      transition: transform .14s ease, box-shadow .18s ease;
    }

    .note-images img:hover,
    .note-images img:focus {
      transform: translateY(-1px);
      box-shadow: 0 12px 26px rgba(94, 93, 135, .16);
      outline: none;
    }

    .supplier-card {
      display: grid;
      grid-template-columns: 58px minmax(0, 1fr) auto 32px;
      gap: 12px;
      align-items: center;
      padding: 12px;
      border: 1px solid #e7e9e6;
      border-radius: 18px;
      background: #fff;
      cursor: pointer;
      transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
    }

    .supplier-card:hover,
    .supplier-card.active {
      transform: translateY(-1px);
      border-color: rgba(103, 87, 232, .38);
      box-shadow: 0 16px 32px rgba(103, 87, 232, .14);
    }

    .supplier-card.active {
      background: linear-gradient(90deg, rgba(103, 87, 232, .16), rgba(255, 255, 255, .96) 46%);
      border-color: #6757e8;
      box-shadow: 0 18px 42px rgba(103, 87, 232, .22);
      position: relative;
    }

    .supplier-card.active::before {
      content: "";
      position: absolute;
      left: 0;
      top: 14px;
      bottom: 14px;
      width: 5px;
      border-radius: 0 999px 999px 0;
      background: #6757e8;
    }

    .logo {
      width: 54px;
      height: 54px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      color: #fff;
      font-weight: 650;
      background: linear-gradient(135deg, #6757e8, #49b6ff);
      overflow: hidden;
      box-shadow: 0 12px 24px rgba(103, 87, 232, .2);
    }

    .logo img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .supplier-main {
      min-width: 0;
    }

    .supplier-main strong {
      display: block;
      font-size: 15px;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .supplier-main span {
      display: block;
      margin-top: 3px;
      color: var(--muted);
      font-size: 13px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .pill {
      min-height: 27px;
      display: inline-flex;
      align-items: center;
      padding: 0 9px;
      border-radius: 999px;
      font-size: 12px;
      white-space: nowrap;
      font-weight: 800;
    }

    .status-select {
      max-width: 150px;
      border: 0;
      outline: none;
      cursor: pointer;
      appearance: none;
      padding-right: 22px;
      background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
      background-position: calc(100% - 12px) 11px, calc(100% - 8px) 11px;
      background-size: 5px 5px, 5px 5px;
      background-repeat: no-repeat;
    }

    .status-select:hover {
      filter: brightness(.98);
      box-shadow: 0 0 0 4px rgba(103, 87, 232, .09);
    }

    .supplier-delete {
      width: 30px;
      height: 30px;
      border: 0;
      border-radius: 50%;
      background: rgba(240, 85, 120, .1);
      color: var(--danger);
      cursor: pointer;
      font-weight: 900;
      display: grid;
      place-items: center;
    }

    .supplier-delete:hover {
      background: var(--danger);
      color: #fff;
    }

    .supplier-card[draggable="true"] {
      cursor: grab;
    }

    .supplier-card.dragging {
      opacity: .58;
      transform: scale(.985);
      border-style: dashed;
      box-shadow: 0 18px 40px rgba(103, 87, 232, .18);
    }

    .supplier-card.drop-before {
      box-shadow: inset 0 4px 0 rgba(103, 87, 232, .75), 0 18px 44px rgba(103, 87, 232, .12);
    }

    .supplier-card.drop-after {
      box-shadow: inset 0 -4px 0 rgba(103, 87, 232, .75), 0 18px 44px rgba(103, 87, 232, .12);
    }

    .Gorusuldu { background: #eef0ff; color: #5449d8; }
    .Aktif { background: #ecf9dc; color: #668d12; }
    .Numune { background: #fff2d8; color: #b56518; }
    .NumuneSiparis { background: #e8f7dc; color: #4f8a10; }
    .Fiyat { background: #f1edff; color: #7353d6; }
    .Anlasildi { background: #eef8d3; color: #6f9620; }
    .Olumlu { background: #e9f9ef; color: #15945b; }
    .Beklemede { background: #ffe9ef; color: #c44564; }
    .AradikAcmadi { background: #fff3d8; color: #a65f10; }
    .FiyatBekleniyor { background: #fff7cf; color: #9c6a00; }
    .MesajSureci { background: #eef4ff; color: #2f63d8; }
    .Iptal { background: #fff0f0; color: #d13d3d; }

    .detail {
      overflow: hidden;
    }

    .detail-body {
      display: grid;
      gap: 16px;
      padding: 16px;
    }

    .identity {
      display: grid;
      grid-template-columns: 70px minmax(0, 1fr);
      gap: 12px;
      align-items: center;
    }

    .identity .logo {
      width: 68px;
      height: 68px;
      border-radius: var(--radius);
    }

    .identity strong {
      display: block;
      font-size: 20px;
    }

    .identity span {
      display: block;
      margin-top: 4px;
      color: var(--muted);
    }

    .info-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .info {
      min-height: 74px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #fff;
      padding: 11px;
      box-shadow: 0 10px 24px rgba(94, 93, 135, .06);
    }

    .info span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0;
      font-weight: 800;
    }

    .info strong,
    .info a {
      display: block;
      margin-top: 7px;
      color: var(--ink);
      text-decoration: none;
      overflow-wrap: anywhere;
    }

    .inline-edit {
      width: 100%;
      margin-top: 7px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: var(--ink);
      font-weight: 560;
      padding: 4px 0;
      outline: none;
    }

    .inline-edit:hover,
    .inline-edit:focus {
      background: rgba(103, 87, 232, .08);
      box-shadow: inset 0 -1px 0 rgba(103, 87, 232, .35);
      padding-left: 6px;
      padding-right: 6px;
    }

    .phone-edit-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
    }

    #editPhone,
    #statusNote {
      pointer-events: auto;
      user-select: text;
      -webkit-user-select: text;
    }

    .copy-phone-btn {
      min-height: 32px;
      border: 1px solid rgba(103, 87, 232, .24);
      border-radius: 8px;
      background: rgba(103, 87, 232, .08);
      color: #5546c7;
      padding: 0 10px;
      font-size: 12px;
      font-weight: 750;
      cursor: pointer;
    }

    .copy-phone-btn:hover {
      background: rgba(103, 87, 232, .15);
    }

    .identity-edit {
      width: 100%;
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: var(--ink);
      font-weight: 680;
      font-size: 20px;
      padding: 3px 0;
      outline: none;
    }

    .identity-edit:hover,
    .identity-edit:focus {
      background: rgba(103, 87, 232, .08);
      padding-left: 6px;
      padding-right: 6px;
    }

    .note-edit {
      width: 100%;
      min-height: 76px;
      margin-top: 7px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: var(--ink);
      font-weight: 560;
      resize: vertical;
      padding: 4px 0;
      outline: none;
    }

    .note-edit:hover,
    .note-edit:focus {
      background: rgba(103, 87, 232, .08);
      padding-left: 6px;
      padding-right: 6px;
    }

    .status-tools,
    .upload-box {
      display: grid;
      gap: 10px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #fff;
      box-shadow: 0 10px 24px rgba(94, 93, 135, .06);
    }

    .upload-box.drag-over {
      border-color: rgba(103, 87, 232, .76);
      background: linear-gradient(135deg, rgba(103, 87, 232, .1), rgba(185, 217, 79, .12)), #fff;
      box-shadow: 0 0 0 5px rgba(103, 87, 232, .12), 0 16px 34px rgba(94, 93, 135, .12);
    }

    .drop-hint {
      min-height: 42px;
      display: grid;
      place-items: center;
      border: 1px dashed rgba(103, 87, 232, .38);
      border-radius: 18px;
      color: var(--muted);
      background: rgba(103, 87, 232, .05);
      font-size: 13px;
      font-weight: 700;
      text-align: center;
      padding: 8px 10px;
    }

    .status-tools .line {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
    }

    .conversation-note-action {
      display: flex;
      justify-content: flex-end;
      margin-top: 8px;
    }

    .gallery {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .photo {
      aspect-ratio: 1 / 1;
      border: 1px solid #e7e9e6;
      border-radius: var(--radius);
      background:
        linear-gradient(135deg, rgba(103, 87, 232, .12), rgba(185, 217, 79, .18)),
        #fff;
      overflow: hidden;
      display: grid;
      place-items: center;
      color: var(--muted);
      font-size: 12px;
      text-align: center;
      padding: 8px;
      position: relative;
    }

    .photo.has-image {
      cursor: zoom-in;
      padding: 0;
    }

    .video-preview {
      width: 100%;
      height: 100%;
      display: grid;
      place-items: center;
      gap: 8px;
      background:
        radial-gradient(circle at 74% 18%, rgba(103, 87, 232, .18), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(238, 245, 223, .78));
      color: var(--ink);
      font-size: 12px;
      font-weight: 750;
      text-align: center;
    }

    .video-preview strong {
      width: 44px;
      height: 44px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      background: var(--teal);
      color: #fff;
      box-shadow: 0 12px 28px rgba(103, 87, 232, .22);
    }

    .media-missing {
      width: 100%;
      height: 100%;
      display: grid;
      place-items: center;
      padding: 12px;
      background:
        radial-gradient(circle at 78% 18%, rgba(240, 85, 120, .12), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(238, 245, 223, .72));
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
      line-height: 1.25;
      text-align: center;
    }

    .photo img,
    .photo video {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .photo-caption {
      position: absolute;
      left: 8px;
      right: 42px;
      top: 8px;
      min-height: 26px;
      border: 1px solid rgba(255, 255, 255, .52);
      border-radius: 999px;
      padding: 4px 10px;
      background: rgba(255, 255, 255, .82);
      color: #151722;
      font-size: 11px;
      font-weight: 750;
      outline: none;
      box-shadow: 0 8px 20px rgba(21, 23, 34, .12);
      backdrop-filter: blur(8px);
    }

    .photo-caption::placeholder {
      color: rgba(21, 23, 34, .48);
    }

    .photo-caption:focus {
      border-color: rgba(103, 87, 232, .74);
      background: #fff;
      box-shadow: 0 0 0 4px rgba(103, 87, 232, .14);
    }

    .photo-delete {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 28px;
      height: 28px;
      border: 0;
      border-radius: 50%;
      background: rgba(21, 23, 34, .72);
      color: #fff;
      cursor: pointer;
      font-weight: 700;
      display: grid;
      place-items: center;
      box-shadow: 0 8px 18px rgba(21, 23, 34, .18);
    }

    .photo-delete:hover {
      background: var(--danger);
    }

    .image-viewer {
      width: min(96vw, 1180px);
      height: min(92vh, 860px);
      padding: 0;
      border: 0;
      border-radius: 24px;
      overflow: hidden;
      background: #10121c;
      box-shadow: 0 28px 90px rgba(21, 23, 34, .36);
    }

    .image-viewer::backdrop {
      background: rgba(21, 23, 34, .72);
      backdrop-filter: blur(10px);
    }

    .viewer-frame {
      height: 100%;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      color: #fff;
    }

    .viewer-head {
      min-height: 56px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 12px 10px 18px;
      background: rgba(255, 255, 255, .06);
      border-bottom: 1px solid rgba(255, 255, 255, .12);
    }

    .viewer-head strong {
      font-size: 14px;
      font-weight: 800;
    }

    .viewer-stage {
      min-height: 0;
      display: grid;
      grid-template-columns: 54px minmax(0, 1fr) 54px;
      align-items: center;
      gap: 8px;
      padding: 12px;
    }

    .viewer-media {
      min-width: 0;
      min-height: 0;
      height: 100%;
      display: grid;
      place-items: center;
    }

    .viewer-stage img,
    .viewer-stage video {
      width: 100%;
      height: 100%;
      max-height: calc(92vh - 92px);
      object-fit: contain;
      border-radius: 18px;
      background: rgba(255, 255, 255, .04);
    }

    .viewer-stage video {
      display: none;
    }

    .media-type {
      position: absolute;
      left: 8px;
      bottom: 8px;
      border-radius: 999px;
      padding: 4px 8px;
      background: rgba(21, 23, 34, .72);
      color: #fff;
      font-size: 11px;
      font-weight: 800;
      pointer-events: none;
    }

    .viewer-btn,
    .viewer-close {
      border: 0;
      border-radius: 999px;
      background: rgba(255, 255, 255, .12);
      color: #fff;
      cursor: pointer;
      font-weight: 900;
      display: grid;
      place-items: center;
    }

    .viewer-btn {
      width: 46px;
      height: 46px;
      font-size: 26px;
    }

    .viewer-close {
      width: 38px;
      height: 38px;
      font-size: 20px;
    }

    .viewer-btn:hover,
    .viewer-close:hover {
      background: rgba(255, 255, 255, .22);
    }

    .timeline {
      display: grid;
      gap: 10px;
    }

    .quick-notes {
      display: grid;
      gap: 8px;
      margin-top: 2px;
    }

    .quick-note {
      border-radius: 14px;
      background: #f8f8ff;
      border: 1px solid var(--line);
      padding: 10px 12px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 30px;
      gap: 8px;
      align-items: start;
    }

    .quick-note strong {
      display: block;
      font-size: 13px;
    }

    .quick-note span {
      display: block;
      margin-top: 3px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.4;
    }

    .note-delete {
      width: 28px;
      height: 28px;
      border: 0;
      border-radius: 50%;
      background: rgba(240, 85, 120, .1);
      color: var(--danger);
      cursor: pointer;
      font-weight: 700;
      line-height: 1;
    }

    .note-delete:hover {
      background: var(--danger);
      color: #fff;
    }

    .event {
      display: grid;
      grid-template-columns: 12px minmax(0, 1fr);
      gap: 10px;
      align-items: start;
    }

    .event::before {
      content: "";
      width: 10px;
      height: 10px;
      margin-top: 5px;
      border-radius: 50%;
      background: var(--copper);
    }

    .event strong {
      display: block;
      font-size: 14px;
    }

    .event span {
      display: block;
      color: var(--muted);
      font-size: 13px;
      margin-top: 2px;
    }

    dialog {
      width: min(650px, calc(100vw - 28px));
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: 0 24px 80px rgba(94, 93, 135, .28);
      padding: 0;
      background: var(--panel);
      color: var(--ink);
    }

    dialog::backdrop { background: rgba(21, 23, 34, .32); }

    .name-modal {
      width: min(420px, calc(100vw - 28px));
      border-radius: 20px;
    }

    .name-modal .form-grid {
      grid-template-columns: 1fr;
    }

    .name-modal input {
      font-size: 15px;
      font-weight: 450;
    }

    .modal-head,
    .modal-actions {
      padding: 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      border-bottom: 1px solid var(--line);
    }

    .modal-actions {
      justify-content: flex-end;
      border-top: 1px solid var(--line);
      border-bottom: 0;
    }

    .form-grid {
      padding: 16px;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .form-grid label {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 13px;
    }

    .form-grid .wide { grid-column: 1 / -1; }

    .form-grid input,
    .form-grid select,
    .form-grid textarea {
      width: 100%;
      min-height: 40px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 8px 10px;
      background: #fff;
      color: var(--ink);
    }

    .form-grid textarea {
      min-height: 82px;
      resize: vertical;
    }

    .empty {
      color: var(--muted);
      border: 1px dashed #d4d8d6;
      border-radius: var(--radius);
      padding: 14px;
      background: rgba(255, 255, 255, .64);
      text-align: center;
    }

    @media (max-width: 1100px) {
      .shell { grid-template-columns: 1fr; }
      .sidebar {
        position: sticky;
        top: 0;
        z-index: 5;
        padding: 14px;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
      }
      .brand {
        min-width: 190px;
        padding-bottom: 0;
        border-bottom: 0;
      }
      .nav {
        display: flex;
        min-width: max-content;
      }
      .nav button, .nav a { width: auto; }
      .project-nav {
        min-width: 260px;
      }
      .sidebar-note { display: none; }
      .workbench { grid-template-columns: 1fr; }
    }

    @media (max-width: 760px) {
      main { padding: 16px; padding-top: 64px; }
      /* Off-canvas drawer için: fixed öğelerin viewport'a göre konumlanması adına
         .shell'in backdrop-filter/overflow "containing block" etkisi kaldırılır. */
      .shell {
        display: block;
        margin: 0;
        border-radius: 0;
        overflow: visible;
        backdrop-filter: none;
        box-shadow: none;
      }

      /* Hamburger butonu */
      .menu-toggle {
        display: inline-grid;
        place-items: center;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 65;
        width: 44px;
        height: 44px;
        border-radius: 14px;
        border: 1px solid var(--line);
        background: #fff;
        color: var(--ink);
        font-size: 20px;
        cursor: pointer;
        box-shadow: 0 8px 20px rgba(94, 93, 135, .16);
      }

      /* Sol menü → soldan açılan çekmece */
      .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(82vw, 300px);
        flex-direction: column;
        align-items: stretch;
        overflow-y: auto;
        border-right: 1px solid var(--line);
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 60;
        box-shadow: 0 20px 60px rgba(20, 22, 34, .28);
      }
      body.menu-open .sidebar { transform: translateX(0); }
      .sidebar-note { display: block; }

      .menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(20, 22, 34, .45);
        z-index: 55;
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
      }
      body.menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }

      /* Mobil tedarikçi detayı: app.js body.detail-modal bayrağını eklediğinde
         detay paneli alttan açılan modal olur. Bayrak yoksa kurallar İNERT'tir
         (detay eskisi gibi akışta kalır) — Parça 1 tek başına deploy'u bozmaz. */
      body.detail-modal .detail {
        position: fixed;
        inset: 0;
        margin: 0;
        border-radius: 0;
        z-index: 70;
        overflow-y: auto;
        transform: translateY(100%);
        transition: transform .28s ease;
        background: var(--panel);
      }
      body.detail-modal.detail-open .detail { transform: translateY(0); }
      body.detail-modal .detail-close { display: inline-grid; }

      .topbar,
      .panel-head,
      .detail-head {
        grid-template-columns: 1fr;
      }
      .actions,
      .filters,
      .row-actions {
        justify-content: flex-start;
      }
      .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .supplier-card {
        grid-template-columns: 48px minmax(0, 1fr) 32px;
      }
      .supplier-card .pill {
        grid-column: 1 / 3;
        width: max-content;
      }
      .info-grid { grid-template-columns: 1fr; }
      .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .form-grid { grid-template-columns: 1fr; }
    }

    @media (max-width: 480px) {
      .stats { grid-template-columns: 1fr; }
      .product-picker,
      .field, .select, .primary-btn, .ghost-btn { width: 100%; }
      .status-tools .line { grid-template-columns: 1fr; }
    }

    /* ---------- Üye girişi / kayıt (Auth) ---------- */
    /* Oturum durumuna göre görünürlük: checking / guest / authed */
    body[data-auth="checking"] .shell,
    body[data-auth="guest"] .shell { display: none; }
    body[data-auth="checking"] .auth-screen,
    body[data-auth="authed"] .auth-screen { display: none; }
    body[data-auth="guest"] .auth-loading,
    body[data-auth="authed"] .auth-loading { display: none; }
    /* Panel açılana kadar Çıkış butonu gizli kalsın */
    body:not([data-auth="authed"]) #logoutBtn { display: none; }

    .auth-loading {
      position: fixed;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 14px;
      color: var(--muted);
      font-weight: 600;
    }

    .auth-spinner {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: 3px solid rgba(103, 87, 232, .2);
      border-top-color: var(--teal);
      animation: authSpin .8s linear infinite;
    }

    @keyframes authSpin { to { transform: rotate(360deg); } }

    .auth-screen {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
    }

    .auth-card {
      width: min(420px, 100%);
      background: rgba(255, 255, 255, .92);
      border: 1px solid var(--line);
      border-radius: 26px;
      box-shadow: var(--shadow);
      padding: 28px 26px;
      display: grid;
      gap: 20px;
    }

    .auth-brand {
      display: grid;
      gap: 2px;
      text-align: center;
    }

    .auth-brand strong {
      font-size: 22px;
      color: var(--teal);
      font-weight: 750;
    }

    .auth-brand span {
      color: var(--muted);
      font-size: 13px;
    }

    .auth-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      padding: 5px;
      background: rgba(103, 87, 232, .08);
      border-radius: 16px;
    }

    .auth-tab {
      min-height: 40px;
      border: none;
      border-radius: 12px;
      background: transparent;
      color: var(--muted);
      font-weight: 650;
      cursor: pointer;
      transition: background .2s ease, color .2s ease;
    }

    .auth-tab.active {
      background: #fff;
      color: var(--teal);
      box-shadow: 0 8px 20px rgba(94, 93, 135, .12);
    }

    .auth-form {
      display: grid;
      gap: 14px;
    }

    .auth-form[hidden] { display: none; }

    .auth-form label {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 13px;
    }

    .auth-form input {
      width: 100%;
      min-height: 44px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 8px 12px;
      background: #fff;
      color: var(--ink);
    }

    .auth-form input:focus {
      outline: none;
      border-color: var(--teal);
      box-shadow: 0 0 0 3px rgba(103, 87, 232, .16);
    }

    .auth-submit {
      justify-content: center;
      min-height: 46px;
      margin-top: 4px;
    }

    .auth-hint {
      color: var(--muted);
      font-size: 12px;
      text-align: center;
    }

    .auth-message {
      margin: 0;
      min-height: 0;
      font-size: 13px;
      font-weight: 600;
      line-height: 1.4;
    }

    .auth-message:empty { display: none; }

    .auth-message.error {
      color: var(--danger);
      background: rgba(240, 85, 120, .1);
      border-radius: 12px;
      padding: 10px 12px;
    }

    .auth-message.success {
      color: #2f9e63;
      background: rgba(47, 158, 99, .1);
      border-radius: 12px;
      padding: 10px 12px;
    }
