/* ================================================================
   YÜKSEK UÇUŞ - WORKSPACE.CSS
   Çalışma Alanı: dosya kartları, araç çubuğu, önizleme, notlar
   ================================================================ */

.ws-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==================== TAM EKRAN MODU ==================== */
/* Çalışma Alanı açıkken içerik tüm genişliği kullanır (≥1600px'deki 1400px kilidini açar) */
body.ws-full .main {
  max-width: none;
  margin-right: auto;
}
body.ws-full #workspaceView {
  display: block;
}

/* ==================== ARAÇ ÇUBUĞU ==================== */
.ws-toolbar {
  padding: 12px 14px;
}
.ws-toolbar .ws-filters {
  margin-left: auto;
}
.ws-search {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 200px;
  max-width: 380px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 7px 11px;
  color: var(--text-muted);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.ws-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.ws-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}
.ws-search input::placeholder {
  color: var(--text-muted);
}

.ws-filters {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}
.ws-filter {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.ws-filter:hover {
  color: var(--text-dim);
}
.ws-filter.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

/* ==================== BÖLÜM BAŞLIKLARI ==================== */
.ws-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
}
.ws-section h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-dim);
  margin: 0;
}
.ws-section-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 1px 9px;
  border-radius: var(--radius-full);
  line-height: 1.6;
}

/* ==================== DOSYA/SEKME KARTLARI ==================== */
.ws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.ws-grid > *,
.ws-note-grid > * {
  min-width: 0;
}
.ws-note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.ws-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 10px 8px;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
.ws-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}
.ws-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.ws-ficon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.ws-ficon-xlsx {
  background: linear-gradient(
    135deg,
    var(--success-soft),
    rgba(16, 185, 129, 0.06)
  );
}
.ws-ficon-pdf {
  background: linear-gradient(
    135deg,
    var(--danger-soft),
    rgba(239, 68, 68, 0.06)
  );
}
.ws-ficon-image {
  background: linear-gradient(
    135deg,
    var(--accent-soft),
    rgba(59, 130, 246, 0.06)
  );
}
.ws-ficon-note {
  background: linear-gradient(
    135deg,
    var(--warning-soft),
    rgba(245, 158, 11, 0.06)
  );
}
.ws-ficon-other {
  background: var(--bg-input);
}
.ws-ficon .lucide {
  width: 18px;
  height: 18px;
}
.ws-empty-icon {
  width: 34px;
  height: 34px;
  display: block;
  margin: 0 auto 8px;
}
.ws-big-icon {
  width: 44px;
  height: 44px;
}

.ws-name {
  font-size: 12px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ws-name:hover {
  color: var(--accent-strong);
}
.ws-meta {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 2px;
}
.ws-card-preview {
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  overflow: hidden;
  min-height: 56px;
  min-width: 0;
  max-width: 100%;
}
.ws-card-preview > * {
  display: block;
  width: 100%;
  min-width: 0;
}
.ws-card-tbl-scroll {
  max-width: 100%;
  overflow: hidden;
}
.ws-card-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
  min-height: 56px;
}
.ws-card-img {
  width: 100%;
  height: 56px;
  object-fit: cover;
  display: block;
}
.ws-card-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  min-height: 56px;
}
.ws-card-txt {
  padding: 6px 9px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--text-dim);
  max-height: 56px;
  overflow: hidden;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.ws-card-pdf {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  min-height: 56px;
  justify-content: center;
  background: linear-gradient(180deg, #fff, #fafafa);
}
.ws-card-pdf-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--danger);
  background: var(--danger-soft);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  align-self: flex-start;
}
.ws-card-pdf-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ws-card-pdf-lines i {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.04));
  width: 100%;
}
.ws-card-pdf-lines i:nth-child(2) {
  width: 85%;
}
.ws-card-pdf-lines i:nth-child(3) {
  width: 70%;
}
.ws-card-pdf-lines i:nth-child(4) {
  width: 92%;
}
.ws-card-pdf-lines i:nth-child(5) {
  width: 60%;
}
.ws-card-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5px;
  font-family: ui-monospace, "Consolas", "Courier New", monospace;
  table-layout: fixed;
}
.ws-card-tbl td {
  border: 1px solid var(--border);
  padding: 2px 4px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 96px;
  background: #fff;
  text-align: left;
}
.ws-card-tbl td.ws-h {
  font-weight: 700;
  background: var(--bg-input);
  color: var(--text);
}

.ws-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-top: 1px solid var(--border);
  padding-top: 7px;
  margin-top: auto;
}
.ws-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  position: relative;
}
.ws-act {
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 9px;
  min-height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.15;
  touch-action: manipulation;
  user-select: none;
}
.ws-act:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}
.ws-act.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.ws-act.primary:hover {
  background: var(--accent-strong);
}
.ws-act.danger {
  color: var(--danger);
  border-color: var(--danger-soft);
}
.ws-act.danger:hover {
  background: var(--danger-soft);
}
.ws-act.icon {
  width: 30px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  line-height: 1;
}
.ws-act.icon.danger {
  color: var(--danger);
}
.ws-act.icon.danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}

/* ==================== ÜÇ NOKTA (⋯) MENÜSÜ ==================== */
.ws-kebab {
  font-weight: 800;
  font-size: 16px;
  color: var(--text-muted);
}
.ws-kebab:hover {
  color: var(--accent-strong);
}
.ws-menu {
  position: absolute;
  right: 4px;
  bottom: calc(100% + 6px);
  z-index: 40;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition:
    opacity 0.12s ease,
    transform 0.12s ease,
    visibility 0.12s ease;
}
.ws-menu.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.ws-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 550;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
.ws-menu-item:hover {
  background: var(--bg-input);
  color: var(--accent-strong);
}
.ws-menu-item.danger,
.ws-menu-item.danger:hover {
  color: var(--danger);
}
.ws-menu-item.danger:hover {
  background: var(--danger-soft);
}

.ws-note-preview {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.55;
  max-height: 58px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
/* Önizlemedeki markdown vurguları: kart içinde de kalın/eğik/kod görünmeli. */
.ws-note-preview strong {
  color: var(--text);
  font-weight: 600;
}
.ws-note-preview em {
  font-style: italic;
}
.ws-note-preview code {
  font-family: var(--font-mono);
  font-size: 0.94em;
  background: var(--bg-input);
  border-radius: var(--radius-xs);
  padding: 0 3px;
}

/* ==================== BOŞ DURUM ==================== */
.ws-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 26px 16px;
  font-size: 13px;
}
.ws-empty svg {
  margin: 0 auto 10px;
  display: block;
  opacity: 0.4;
}

/* ==================== MODAL UZANTILARI ==================== */
.ws-modal-lg .modal {
  max-width: 880px;
  width: 94%;
}
.ws-sheet-mount {
  height: min(70dvh, 720px);
  min-height: 430px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}
.ws-sheet-mount > .univer-container,
.ws-sheet-mount > .univer-app,
.ws-sheet-mount > div {
  width: 100%;
  height: 100%;
}
.ws-preview-frame {
  width: 100%;
  height: 72dvh;
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}
.ws-img-preview {
  max-width: 100%;
  max-height: 480px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}

/* ==================== TAM EKRAN MODAL (PDF / EXCEL) ==================== */
.ws-viewer-modal .modal {
  max-width: 96vw;
  width: 96vw;
}
.ws-viewer-box {
  max-width: 100% !important;
}
.ws-viewer-modal .ws-preview-frame {
  height: 72dvh;
  min-height: 360px;
}
.modal-overlay.ws-fs .modal {
  max-width: 100vw !important;
  width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  border-radius: 0;
  border: none;
  display: flex;
  flex-direction: column;
}
.modal-overlay.ws-fs .modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.modal-overlay.ws-fs .ws-preview-frame,
.modal-overlay.ws-fs .ws-sheet-mount {
  flex: 1;
  min-height: 0;
  height: 100%;
  border-radius: 0;
  border: none;
}
.modal-overlay.ws-fs .ws-sheet-mount {
  width: 100%;
}
.modal-overlay.ws-fs .ws-sheet-mount > div {
  width: 100% !important;
  height: 100% !important;
}

/* ==================== GÖRSEL LIGHTBOX ==================== */
.ws-lb {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: wsLbIn 0.18s ease-out;
}
@keyframes wsLbIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.ws-lb-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ws-lb-stage:active {
  cursor: grabbing;
}
.ws-lb-img {
  max-width: 100vw;
  max-height: 100dvh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
  border-radius: 4px;
}
.ws-lb-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: calc(10px + env(safe-area-inset-top)) 12px calc(10px) 12px;
  background: linear-gradient(rgba(0, 0, 0, 0.55), transparent);
  color: #fff;
  font-size: 13px;
  z-index: 2;
}
.ws-lb-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 38vw;
  min-width: 0;
}
.ws-lb-count {
  color: rgba(255, 255, 255, 0.6);
}
.ws-lb-spacer {
  flex: 1;
}
.ws-lb-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ws-lb-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}
.ws-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 64px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
}
.ws-lb-nav.prev {
  left: 10px;
}
.ws-lb-nav.next {
  right: 10px;
}
.ws-lb-nav:hover {
  background: rgba(255, 255, 255, 0.26);
}
.ws-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ws-dropzone:hover,
.ws-dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.ws-share-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.ws-share-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-input);
}
.ws-share-opt.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.ws-teacher-list {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
/* Sınıf → öğretmen ağacı (akordeon) */
.ws-tree-class {
  display: flex;
  flex-direction: column;
}
.ws-class-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-input);
  color: var(--text);
  transition: all 0.15s ease;
  user-select: none;
  margin-bottom: 4px;
}
.ws-class-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.ws-tree-arrow {
  font-size: 11px;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.7;
}
.ws-tree-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-tree-count {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 1px 8px;
}
.ws-teacher-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 6px 18px;
}
.ws-teacher-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 550;
  color: var(--text-dim);
  cursor: pointer;
  background: transparent;
  transition: all 0.13s ease;
  user-select: none;
}
.ws-teacher-chip:hover {
  background: var(--bg-input);
  color: var(--text);
}
.ws-teacher-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--border-strong);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  transition: all 0.13s ease;
}
.ws-teacher-chip.active {
  color: var(--accent-strong);
  background: var(--bg-input);
}
.ws-teacher-chip.active .ws-teacher-check {
  background: var(--accent);
  border-color: var(--accent);
}
.ws-teacher-none {
  padding: 2px 10px 6px;
}
.ws-share-hint {
  margin-top: 10px;
  font-size: 11px;
}

/* ==================== NOT GÖRÜNÜM / MARKDOWN ==================== */
.ws-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.ws-md-view {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text);
}
.ws-md-view h4 {
  font-size: 16px;
  margin: 12px 0 6px;
}
.ws-md-view h5 {
  font-size: 14px;
  margin: 10px 0 4px;
}
.ws-md-view h6 {
  font-size: 12.5px;
  margin: 8px 0 4px;
  color: var(--text-dim);
}
.ws-md-view ul {
  margin: 6px 0 10px;
  padding-left: 20px;
}
.ws-md-view li {
  margin: 2px 0;
}
.ws-md-view code {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 12px;
}
.ws-md-view pre {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  overflow-x: auto;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.ws-note-edit {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ws-note-edit textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 13px;
  padding: 11px 12px;
  font-family: inherit;
  line-height: 1.6;
}
.ws-note-edit .input {
  background: var(--bg-input);
}
.ws-note-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}
.ws-note-tab {
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  cursor: pointer;
}
.ws-note-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ==================== YÜKLEME İLERLEME ==================== */
.ws-progress {
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 10px;
}
.ws-progress > div {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width 0.25s ease;
  width: 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 700px) {
  .ws-search {
    max-width: none;
  }
  .ws-toolbar .ws-filters {
    margin-left: 0;
  }
  .ws-grid,
  .ws-note-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .ws-grid,
  .ws-note-grid {
    grid-template-columns: 1fr;
  }
  .ws-preview-frame,
  .ws-viewer-modal .ws-preview-frame {
    height: 58dvh;
    min-height: 280px;
  }
  .ws-sheet-mount {
    height: 58dvh;
    min-height: 320px;
  }
  .ws-lb-title {
    max-width: 24vw;
  }
  .ws-lb-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
  }
  .ws-lb-nav {
    width: 38px;
    height: 52px;
  }
}

/* ==================== ÇALIŞMA ALANI: LİSTE GÖRÜNÜMÜ ====================
   OneDrive/Excel Web desenleri: sabit başlıklı tablo, sıralanabilir sütunlar,
   satır seçimi, toplu işlem çubuğu, iskelet (skeleton) ve boş durum. */

.ws-topbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.ws-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Görünüm anahtarı (ızgara / liste) */
.ws-viewtoggle {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.ws-view-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.ws-view-btn:hover {
  color: var(--text);
  background: var(--bg-card-hover);
}

.ws-view-btn.active {
  background: var(--accent);
  color: #fff;
}

.ws-view-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ws-view-btn svg {
  width: 15px;
  height: 15px;
}

/* Toplu işlem çubuğu */
.ws-bulk {
  margin-top: 10px;
}

.ws-bulkbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
}

.ws-bulk-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.ws-bulk-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.ws-card-head {
  min-width: 0;
}

/* Tablo */
.ws-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  margin-bottom: 20px;
}

.ws-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.ws-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border-strong);
  text-align: left;
  padding: 9px 12px;
  white-space: nowrap;
}

.ws-table thead th:first-child {
  border-top-left-radius: var(--radius-lg);
}

.ws-table thead th:last-child {
  border-top-right-radius: var(--radius-lg);
}

.ws-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-dim);
}

.ws-table tbody tr:last-child td {
  border-bottom: 0;
}

.ws-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-lg);
}

.ws-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-lg);
}

.ws-table .ws-th-check {
  width: 40px;
  padding-left: 14px;
  padding-right: 4px;
}

.ws-table input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

.ws-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
}

.ws-sort:hover {
  color: var(--text);
}

.ws-sort.active {
  color: var(--accent-strong);
}

.ws-sort svg {
  width: 12px;
  height: 12px;
}

.ws-th-num {
  text-align: right;
}

.ws-th-num .ws-sort {
  justify-content: flex-end;
  width: 100%;
}

.ws-td-size,
.ws-td-date {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ws-td-size {
  text-align: right;
}

.ws-td-actions {
  width: 52px;
  text-align: right;
  padding-top: 4px;
  padding-bottom: 4px;
}

.ws-td-actions .ws-menu {
  bottom: auto;
  top: calc(100% + 4px);
}

.ws-cell-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ws-cell-name .ws-ficon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
}

.ws-cell-name .ws-ficon .lucide {
  width: 15px;
  height: 15px;
}

.ws-cell-name .ws-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  -webkit-line-clamp: none;
}

.ws-row {
  cursor: pointer;
  transition: background var(--transition-fast);
}

.ws-row:hover td {
  background: var(--bg-card-hover);
}

.ws-row.selected td {
  background: var(--accent-soft);
}

.ws-row.selected:hover td {
  background: var(--accent-hover);
}

.ws-row:focus-visible {
  outline: none;
}

.ws-row:focus-visible td {
  background: var(--bg-card-hover);
}

.ws-row:focus-visible td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.ws-section-top {
  margin-top: 18px;
}

/* Yükleniyor iskeleti */
.ws-skel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-skel-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.ws-skel-row span {
  height: 12px;
  border-radius: 6px;
}

.ws-skel-row .w20 {
  width: 20%;
}

.ws-skel-row .w30 {
  width: 30%;
}

.ws-skel-row .w12 {
  width: 12%;
  margin-left: auto;
}

.ws-skel-row .w16 {
  width: 16%;
}

.ws-skel-card {
  gap: 10px;
}

.ws-skel-line {
  height: 12px;
  border-radius: 6px;
}

.ws-skel-line.w60 {
  width: 60%;
}

.ws-skel-line.w40 {
  width: 40%;
}

.ws-skel-block {
  height: 56px;
  border-radius: var(--radius-sm);
}

.ws-skel-row span,
.ws-skel-line,
.ws-skel-block {
  background: linear-gradient(
    90deg,
    var(--bg-input) 25%,
    var(--bg-card-hover) 37%,
    var(--bg-input) 63%
  );
  background-size: 200% 100%;
  animation: wsShimmer 1.4s ease-in-out infinite;
}

@keyframes wsShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Boş ilk kullanım */
.ws-empty-hero {
  text-align: center;
  padding: 44px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
}

.ws-empty-hero svg {
  margin-bottom: 12px;
  color: var(--text-muted);
  opacity: 0.75;
}

.ws-empty-hero h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.ws-empty-hero p {
  max-width: 46ch;
  margin: 0 auto 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}

.ws-empty-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.ws-empty-icon {
  width: 34px;
  height: 34px;
}

/* Hata şeridi */
.ws-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
}

.ws-banner-error {
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  color: var(--text);
}

.ws-banner-error svg {
  width: 16px;
  height: 16px;
  color: var(--danger);
  flex: 0 0 auto;
}

.ws-banner .btn {
  margin-left: auto;
}

@media (max-width: 700px) {
  .ws-col-type,
  .ws-col-size,
  .ws-col-owner {
    display: none;
  }

  .ws-viewtoggle {
    margin-left: auto;
  }
}

@media (max-width: 480px) {
  .ws-col-access,
  .ws-col-date {
    display: none;
  }

  .ws-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .ws-bulk-actions {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ws-skel-row span,
  .ws-skel-line,
  .ws-skel-block {
    animation: none;
  }

  .ws-row {
    transition: none;
  }
}

/* ==================== EXCEL DUZENLEME SINIRI (FAZ 2) ==================== */

/* Kirpilarak yuklenen dosyada kalici uyari seridi. */
.ws-sheet-warn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--warning-rgb), 0.38);
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
}

.ws-sheet-warn svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
  color: var(--warning);
}

.ws-sheet-warn strong {
  font-weight: 600;
}

/* Kirpma karari modali. */
.ws-sheet-limit p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}

.ws-sheet-limit p:last-child {
  margin-bottom: 0;
}

.ws-sheet-limit-files {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.ws-sheet-limit-note {
  color: var(--text-muted);
  font-size: 12px;
}
