/* ==========================================================================
   SAIL STICKER - Arayüz stilleri
   Açık tema · beyaz-gri zemin · lacivert & mavi vurgular
   ========================================================================== */

:root {
  --navy-900: #0b1f45;
  --navy-800: #0f2a5e;
  --navy-700: #16366f;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  --bg:       #f3f5f9;
  --surface:  #ffffff;
  --surface-2:#f8fafc;
  --border:   #e2e8f0;
  --border-2: #cbd5e1;

  --text:     #0f172a;
  --text-2:   #475569;
  --muted:    #94a3b8;

  --green:    #16a34a;
  --amber:    #d97706;
  --red:      #dc2626;
  --purple:   #7c3aed;

  --radius:   12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow:    0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, .18);
  --topbar-h: 62px;
  --dock-h:   58px;
  font-synthesis-weight: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Inter, Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .35em; font-weight: 650; letter-spacing: -.01em; color: var(--navy-900); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.02rem; }
p  { margin: 0 0 .6em; }
a  { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--text-2); font-size: .86rem; }
.hidden { display: none !important; }
.right { text-align: right; }

/* ------------------------------------------------------------ Butonlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .58rem 1.05rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer;
  transition: background .15s, box-shadow .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: 0 1px 2px rgba(37,99,235,.35); }
.btn-primary:hover { background: #1d4ed8; text-decoration: none; }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-ghost { background: var(--surface); color: var(--text-2); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.btn-danger { background: #fff; color: var(--red); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-block { width: 100%; }
.btn-sm { padding: .34rem .7rem; font-size: .82rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--blue-600); cursor: pointer; font: inherit; font-size: .82rem; padding: 0; }

/* ------------------------------------------------------------- Formlar */
.field { display: block; margin-bottom: .85rem; }
.field > span { display: block; font-size: .8rem; font-weight: 600; color: var(--text-2); margin-bottom: .3rem; }
input[type=text], input[type=password], input[type=number], input[type=search],
input[type=email], input[type=tel], select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); background: #fff; color: var(--text);
  font: inherit; font-size: .9rem; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-100);
}
textarea { resize: vertical; min-height: 70px; }
input[type=file] { width: 100%; font-size: .82rem; padding: .4rem; border: 1px dashed var(--border-2); border-radius: var(--radius-sm); background: var(--surface-2); }

.radio-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.radio-pill { position: relative; flex: 1 1 160px; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span {
  display: block; text-align: center; padding: .5rem .6rem; border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); font-size: .84rem; font-weight: 600; color: var(--text-2);
  cursor: pointer; background: #fff;
}
.radio-pill input:checked + span { border-color: var(--blue-600); background: var(--blue-50); color: var(--blue-600); }
.radio-pill input:focus-visible + span { box-shadow: 0 0 0 3px var(--blue-100); }

.alert { padding: .65rem .85rem; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: .9rem; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-ok { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-info { background: var(--blue-50); color: #1e40af; border: 1px solid var(--blue-100); }

/* --------------------------------------------------------- Giriş ekranı */
.auth-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0b1f45, #16366f 55%, #2563eb); padding: 1.2rem; }
.auth-wrap { width: min(980px, 100%); display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); }
.auth-side { background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: #e2e8f0; padding: 2.4rem 2.2rem; display: flex; flex-direction: column; }
.auth-side h1 { color: #fff; font-size: 1.5rem; margin-top: 1.6rem; }
.auth-side p { color: #c7d2e5; font-size: .92rem; }
.auth-logo { display: flex; align-items: baseline; gap: .4rem; }
.auth-points { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.auth-points li { padding: .42rem 0 .42rem 1.5rem; position: relative; font-size: .9rem; color: #dbe4f3; }
.auth-points li::before { content: "✓"; position: absolute; left: 0; color: #60a5fa; font-weight: 700; }
.auth-brand-foot { margin-top: auto; padding-top: 1.6rem; font-size: .78rem; letter-spacing: .14em; color: #8ea4c8; text-transform: uppercase; }
.auth-form-side { display: grid; place-items: center; padding: 2.4rem 2rem; }
.auth-card { width: min(360px, 100%); }
.auth-help { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 1rem; }

.brand-mark { font-weight: 800; letter-spacing: .06em; color: #fff; background: var(--blue-600); padding: .16rem .45rem; border-radius: 6px; font-size: .92rem; }
.brand-text { font-weight: 700; letter-spacing: .22em; font-size: .82rem; color: inherit; }

/* -------------------------------------------------------------- Topbar */
.app-body { min-height: 100vh; display: flex; flex-direction: column; padding-bottom: var(--dock-h); }
.topbar { position: sticky; top: 0; z-index: 60; background: var(--navy-900); color: #e2e8f0; box-shadow: 0 1px 0 rgba(255,255,255,.06), var(--shadow); }
.topbar-inner { max-width: 1680px; margin: 0 auto; height: var(--topbar-h); padding: 0 1rem; display: flex; align-items: center; gap: 1.1rem; }
.brand { display: flex; align-items: baseline; gap: .4rem; color: #fff; }
.brand:hover { text-decoration: none; }
.topnav { display: flex; gap: .25rem; margin-left: .8rem; flex: 1; }
.topnav a { color: #c3d0e6; padding: .45rem .8rem; border-radius: 8px; font-size: .88rem; font-weight: 600; position: relative; }
.topnav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.topnav a.active { background: var(--blue-600); color: #fff; }
.topnav .dot { width: 7px; height: 7px; background: #38bdf8; border-radius: 50%; display: inline-block; margin-left: .25rem; vertical-align: middle; }
.topbar-right { display: flex; align-items: center; gap: .55rem; position: relative; }
.icon-btn { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 0; background: rgba(255,255,255,.08); color: #dbe4f3; cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.16); color: #fff; text-decoration: none; }
.icon-btn .badge { position: absolute; top: -4px; right: -4px; background: #ef4444; color: #fff; font-size: .68rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.user-chip { display: flex; align-items: center; gap: .5rem; padding-left: .5rem; border-left: 1px solid rgba(255,255,255,.14); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue-600); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta strong { font-size: .84rem; color: #fff; }
.user-meta small { font-size: .7rem; color: #9db0cf; }

.ws-status { position: absolute; right: 12px; bottom: -26px; display: flex; align-items: center; gap: .35rem; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: .14rem .6rem; font-size: .7rem; color: var(--text-2); box-shadow: var(--shadow-sm); z-index: 5; }
.ws-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.ws-status.online .ws-dot { background: var(--green); }
.ws-status.offline .ws-dot { background: var(--red); }

/* --------------------------------------------------------- Bildirimler */
.notif-panel { position: absolute; top: 46px; right: 0; width: min(360px, 92vw); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 80; overflow: hidden; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--border); color: var(--text); }
.notif-perm { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .55rem .9rem; background: var(--blue-50); border-bottom: 1px solid var(--border); }
.notif-perm .np-text { flex: 1; min-width: 140px; font-size: .76rem; color: var(--text-2); line-height: 1.35; }
.notif-perm .np-text.np-on { color: var(--green); font-weight: 650; }
.notif-perm .btn-sm { padding: .24rem .6rem; font-size: .76rem; }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-item { display: block; padding: .7rem .9rem; border-bottom: 1px solid var(--surface-2); color: var(--text); }
.notif-item:hover { background: var(--surface-2); text-decoration: none; }
.notif-item.unread { background: var(--blue-50); }
.notif-item strong { display: block; font-size: .86rem; }
.notif-item span { display: block; font-size: .78rem; color: var(--text-2); }
.notif-item time { font-size: .7rem; color: var(--muted); }

.flash { max-width: 1680px; margin: .8rem auto 0; padding: .7rem 1rem; border-radius: var(--radius-sm); font-size: .88rem; }
.flash-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.flash-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.flash-info { background: var(--blue-50); color: #1e40af; border: 1px solid var(--blue-100); }

.app-main { flex: 1; width: 100%; max-width: 1680px; margin: 0 auto; padding: 1rem; }
.app-footer { max-width: 1680px; margin: 0 auto; width: 100%; padding: 1rem; display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); }

/* ----------------------------------------------------------- Çalışma alanı */
.workspace { display: grid; grid-template-columns: 250px minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-left, .panel-right { position: sticky; top: calc(var(--topbar-h) + 1rem); max-height: calc(100vh - var(--topbar-h) - var(--dock-h) - 2rem); display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem .6rem; }
.count-pill { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); border-radius: 20px; font-size: .72rem; padding: .1rem .5rem; font-weight: 600; }
.folder-search { padding: 0 1rem .6rem; }
.folder-list { overflow-y: auto; padding: 0 .55rem .7rem; }
.folder { display: flex; align-items: center; gap: .55rem; padding: .5rem .55rem; border-radius: var(--radius-sm); color: var(--text-2); font-size: .88rem; font-weight: 550; }
.folder:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.folder.active { background: var(--blue-50); color: var(--blue-600); font-weight: 650; }
.folder-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--surface-2); color: var(--navy-800); flex: none; }
.folder.active .folder-icon { background: var(--blue-100); color: var(--blue-600); }
.folder-icon.all { font-size: .8rem; }
.folder-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-count { font-size: .72rem; color: var(--muted); }

.panel-center { padding: 1rem; min-height: 60vh; }
.center-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; margin-bottom: .9rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.filters select { width: auto; min-width: 150px; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-left: 2.1rem; min-width: 230px; }

/* ------------------------------------------------------------ Sticker kartları */
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .85rem; }
.sticker-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; position: relative; transition: box-shadow .15s, border-color .15s, transform .15s; }
.sticker-card:hover { box-shadow: var(--shadow); border-color: var(--blue-500); transform: translateY(-2px); }
.sticker-thumb { position: relative; aspect-ratio: 4 / 3; background: repeating-conic-gradient(#f8fafc 0% 25%, #eef2f7 0% 50%) 50% / 18px 18px; display: grid; place-items: center; overflow: hidden; cursor: zoom-in; }
.sticker-thumb img { width: 100%; height: 100%; object-fit: contain; padding: .4rem; }
.sticker-actions { position: absolute; inset: auto 0 0 0; display: flex; gap: .35rem; padding: .45rem; background: linear-gradient(to top, rgba(11,31,69,.92), rgba(11,31,69,0)); opacity: 0; transition: opacity .15s; }
.sticker-card:hover .sticker-actions, .sticker-card:focus-within .sticker-actions { opacity: 1; }
.sticker-actions .btn { flex: 1; padding: .34rem .4rem; font-size: .76rem; }
.sticker-info { padding: .55rem .65rem .7rem; }
.sticker-info strong { display: block; font-size: .86rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticker-info .meta { display: flex; justify-content: space-between; gap: .4rem; font-size: .72rem; color: var(--muted); margin-top: .2rem; }
.tag { display: inline-block; background: var(--blue-50); color: var(--blue-600); border-radius: 20px; padding: .05rem .45rem; font-size: .68rem; font-weight: 650; }
.grid-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; gap: 1rem; }
.loading, .empty, .empty-sm { color: var(--muted); font-size: .88rem; }
.loading, .empty { grid-column: 1 / -1; padding: 2.2rem; text-align: center; background: var(--surface-2); border-radius: var(--radius); border: 1px dashed var(--border-2); }
.empty-sm { padding: .9rem; text-align: center; }

/* ------------------------------------------------------- Özel talep paneli */
.panel-right { overflow-y: auto; }
.custom-head { background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: #fff; padding: 1rem; border-radius: var(--radius) var(--radius) 0 0; }
.custom-head h3 { color: #fff; font-size: .95rem; letter-spacing: .02em; }
.custom-head p { color: #c3d0e6; font-size: .82rem; margin: 0; }
.custom-form { padding: 1rem; }
.color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; }
.color-chip { position: relative; display: flex; align-items: center; gap: .4rem; padding: .3rem .4rem; border: 1px solid var(--border); border-radius: 20px; cursor: pointer; font-size: .74rem; color: var(--text-2); }
.color-chip input { position: absolute; opacity: 0; }
.color-chip .swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--sw); border: 1px solid rgba(15,23,42,.18); flex: none; }
.color-chip input:checked ~ .color-name { color: var(--blue-600); font-weight: 650; }
.color-chip:has(input:checked) { border-color: var(--blue-600); background: var(--blue-50); }
.color-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--sw); border: 1px solid rgba(15,23,42,.18); margin-right: .25rem; }

/* ---------------------------------------------------- Seçili stickerlar (alt) */
.cart-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -8px 28px rgba(15,23,42,.1); }
.cart-toggle { width: 100%; max-width: 1680px; margin: 0 auto; display: flex; align-items: center; gap: .8rem; height: var(--dock-h); padding: 0 1rem; background: none; border: 0; cursor: pointer; font: inherit; }
.cart-title { font-weight: 700; color: var(--navy-900); display: flex; align-items: center; gap: .45rem; }
.cart-count { background: var(--blue-600); color: #fff; border-radius: 20px; min-width: 22px; padding: 0 .4rem; font-size: .76rem; display: inline-grid; place-items: center; height: 20px; }
.cart-sum { color: var(--text-2); font-size: .84rem; margin-left: auto; }
.cart-toggle .chev { color: var(--muted); transition: transform .2s; }
.cart-dock.open .chev { transform: rotate(180deg); }
.cart-body { display: none; max-width: 1680px; margin: 0 auto; padding: 0 1rem 1rem; max-height: min(52vh, 520px); overflow-y: auto; }
.cart-dock.open .cart-body { display: block; }
.cart-items { display: grid; gap: .5rem; margin-bottom: .9rem; }
.cart-row { display: grid; grid-template-columns: 56px minmax(0,1fr) auto; gap: .7rem; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .5rem; background: var(--surface-2); }
.cart-row img { width: 56px; height: 44px; object-fit: contain; background: #fff; border-radius: 6px; border: 1px solid var(--border); }
.cart-row .ci-name { font-weight: 650; font-size: .86rem; }
.cart-row .ci-meta { font-size: .76rem; color: var(--text-2); display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.cart-row .ci-note { font-size: .76rem; color: var(--amber); margin-top: .15rem; }
.cart-row .ci-actions { display: flex; gap: .35rem; }
.badge-rev { background: #fffbeb; color: var(--amber); border: 1px solid #fde68a; border-radius: 20px; padding: .02rem .4rem; font-size: .68rem; font-weight: 650; }
.cart-actions { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.order-note { flex: 1 1 320px; margin: 0; }
.cart-buttons { display: flex; gap: .5rem; margin-left: auto; }

/* ---------------------------------------------------------------- Modal */
.modal { position: fixed; inset: 0; background: rgba(11,31,69,.55); display: grid; place-items: center; z-index: 120; padding: 1rem; backdrop-filter: blur(2px); }
.modal-card { position: relative; background: #fff; border-radius: 14px; width: min(520px, 100%); max-height: 92vh; overflow-y: auto; padding: 1.4rem; box-shadow: var(--shadow-lg); }
.modal-lg { width: min(900px, 100%); }
.modal-close { position: absolute; top: .55rem; right: .7rem; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-head { display: flex; gap: .9rem; align-items: center; margin-bottom: 1rem; }
.modal-head img { width: 84px; height: 66px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.1rem; }

.lightbox { position: fixed; inset: 0; background: rgba(8,15,32,.92); display: grid; place-items: center; z-index: 200; padding: 2rem; }
.lightbox img { max-width: 94vw; max-height: 82vh; object-fit: contain; background: #fff; border-radius: 10px; padding: .6rem; }
.lightbox-caption { color: #e2e8f0; margin-top: .9rem; font-size: .9rem; }
.lightbox-close { position: absolute; top: 1rem; right: 1.4rem; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }

/* ------------------------------------------------- Kayan bildirimler */
.toast-wrap { position: fixed; right: 1rem; bottom: calc(var(--dock-h) + 1rem); z-index: 300; display: flex; flex-direction: column; gap: .55rem; max-width: min(380px, 92vw); }
.toast {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) 20px; gap: .55rem; align-items: start;
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--blue-600);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: .75rem .85rem; font-size: .86rem;
  animation: slideIn .28s cubic-bezier(.22, 1, .36, 1);
}
.toast.leaving { animation: slideOut .26s ease forwards; }
.toast.clickable { cursor: pointer; }
.toast.clickable:hover { border-left-width: 6px; transform: translateX(-2px); transition: transform .12s; }
.toast-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--blue-50); color: var(--blue-600); }
.toast-body { min-width: 0; }
.toast strong { display: block; font-size: .88rem; color: var(--navy-900); }
.toast .toast-text { display: block; color: var(--text-2); font-size: .8rem; word-break: break-word; }
.toast-close { background: none; border: 0; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0; }
.toast.ok { border-left-color: var(--green); }
.toast.ok .toast-icon { background: #f0fdf4; color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.err .toast-icon { background: #fef2f2; color: var(--red); }
.toast.order, .toast.order_status { border-left-color: var(--blue-600); }
.toast.message { border-left-color: var(--purple); }
.toast.message .toast-icon { background: #f5f3ff; color: var(--purple); }
.toast.revision { border-left-color: var(--amber); }
.toast.revision .toast-icon { background: #fffbeb; color: var(--amber); }
.toast.custom, .toast.approval { border-left-color: #0e7490; }
.toast.custom .toast-icon, .toast.approval .toast-icon { background: #ecfeff; color: #0e7490; }
@keyframes slideIn { from { opacity: 0; transform: translateX(110%); } to { opacity: 1; transform: none; } }
@keyframes slideOut { to { opacity: 0; transform: translateX(110%); } }

/* ------------------------------------------------------- Mesajlaşma */
.chat { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: .8rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.chat-msg { max-width: 78%; padding: .5rem .7rem; border-radius: 12px; background: #fff; border: 1px solid var(--border); }
.chat-msg.me { align-self: flex-end; background: var(--blue-50); border-color: var(--blue-100); }
.chat-msg.them { align-self: flex-start; }
.chat-meta { display: flex; gap: .5rem; align-items: baseline; justify-content: space-between; margin-bottom: .15rem; }
.chat-meta strong { font-size: .78rem; color: var(--navy-900); }
.chat-meta time { font-size: .7rem; color: var(--muted); }
.chat-text { font-size: .86rem; color: var(--text); word-break: break-word; }
.chat-form { display: flex; gap: .5rem; align-items: flex-end; margin-top: .6rem; }
.chat-form textarea { flex: 1; min-height: 46px; }

/* ------------------------------------------- Çoklu renk gösterimi */
.color-list { display: inline-flex; align-items: center; gap: .15rem; }
.color-names { margin-left: .25rem; color: var(--muted); font-size: .72rem; }
.badge-bulk { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; border-radius: 20px; padding: .02rem .4rem; font-size: .68rem; font-weight: 650; }
.ci-sub { font-size: .76rem; color: var(--text-2); margin-top: .15rem; }
.dot-badge { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); vertical-align: middle; }

/* ------------------------------------- Özel talep: Set ve tasarımlar */
.set-area { border: 1px dashed var(--blue-500); background: var(--blue-50); border-radius: var(--radius); padding: .8rem; margin-bottom: .9rem; }
.set-head { display: flex; flex-direction: column; margin-bottom: .5rem; }
.set-head strong { font-size: .88rem; color: var(--navy-900); }
.box-pick { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
.pick-chip { position: relative; }
.pick-chip input { position: absolute; opacity: 0; }
.pick-chip span { display: inline-block; padding: .3rem .6rem; border: 1px solid var(--border-2); background: #fff; border-radius: 20px; font-size: .78rem; cursor: pointer; color: var(--text-2); }
.pick-chip input:checked + span { background: var(--blue-600); border-color: var(--blue-600); color: #fff; font-weight: 600; }
.set-configs { display: grid; gap: .6rem; }
.box-config { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem; }
.box-config-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.box-config-head strong { color: var(--blue-600); }

.proposal { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: .7rem; border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem; margin-bottom: .6rem; background: #fff; }
.proposal.active { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-100); }
.proposal-img { width: 110px; height: 86px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; cursor: zoom-in; }
.proposal-body strong { display: block; font-size: .9rem; }
.approve-bar { display: flex; gap: .5rem; margin-top: 1rem; }
.approve-bar .btn { flex: 1; }

@media (max-width: 600px) {
  .proposal { grid-template-columns: 1fr; }
  .proposal-img { width: 100%; height: 150px; }
  .chat-msg { max-width: 92%; }
}

/* --------------------------------------------------------------- Tablolar */
.page-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-sm); }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: .6rem .9rem; font: inherit; font-weight: 600; font-size: .88rem; color: var(--text-2); cursor: pointer; }
.tab.active { color: var(--blue-600); border-bottom-color: var(--blue-600); }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.data-table th { text-align: left; padding: .6rem .7rem; background: var(--surface-2); color: var(--text-2); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: .62rem .7rem; border-bottom: 1px solid var(--surface-2); vertical-align: middle; }
.data-table tr:hover td { background: #fbfdff; }
.data-table img.thumb { width: 46px; height: 36px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; }

.status { display: inline-block; padding: .14rem .55rem; border-radius: 20px; font-size: .74rem; font-weight: 650; border: 1px solid; }
.st-new { background: var(--blue-50); color: #1d4ed8; border-color: var(--blue-100); }
.st-reviewing { background: #f5f3ff; color: var(--purple); border-color: #ddd6fe; }
.st-awaiting-revision, .st-awaiting_revision { background: #fffbeb; color: var(--amber); border-color: #fde68a; }
.st-preparing { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.st-completed { background: #f0fdf4; color: var(--green); border-color: #bbf7d0; }
.st-cancelled { background: #fef2f2; color: var(--red); border-color: #fecaca; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.detail-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .75rem; }
.detail-box small { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.detail-box strong { font-size: .95rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: .4rem 0 .4rem 1.1rem; border-left: 2px solid var(--border); position: relative; font-size: .84rem; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: .72rem; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-600); }

/* ---------------------------------------------------------- Duyarlılık */
@media (max-width: 1200px) {
  .workspace { grid-template-columns: 220px minmax(0, 1fr); }
  .panel-right { grid-column: 1 / -1; position: static; max-height: none; }
}
@media (max-width: 860px) {
  .workspace { grid-template-columns: 1fr; }
  .panel-left { position: static; max-height: none; }
  .folder-list { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .7rem; }
  .folder { flex: none; }
  .folder-count { display: none; }
  .topnav { display: none; }
  .user-meta { display: none; }
  .center-head { flex-direction: column; }
  .filters { width: 100%; }
  .filters select, .search-box, .search-box input { width: 100%; min-width: 0; }
  .sticker-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .sticker-actions { opacity: 1; }
  .cart-row { grid-template-columns: 46px minmax(0,1fr); }
  .cart-row .ci-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .cart-buttons { width: 100%; }
  .cart-buttons .btn { flex: 1; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .ws-status { display: none; }
}
@media (max-width: 480px) {
  .app-main { padding: .7rem; }
  .sticker-grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); }
  .color-grid { grid-template-columns: 1fr 1fr; }
}
