* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0d0d0d;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --bg-input: #1e1e1e;
  --bg-surface: #111;
  --red: #E63946;
  --red-hover: #ff4d5a;
  --red-dim: #8b1a22;
  --red-glow: rgba(230, 57, 70, 0.08);
  --white: #f0f0f0;
  --gray: #777;
  --gray-light: #aaa;
  --gray-dark: #2a2a2a;
  --border: #222;
  --success: #2ecc71;
  --warning: #f39c12;
  --radius: 10px;
  --radius-sm: 6px;
  --header-height: 56px;
  --max-width: 1400px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }

/* ── Login ──────────────────────────────────────────────────────────────── */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 30%, rgba(230,57,70,0.06) 0%, transparent 60%), var(--bg);
}

.login-container {
  max-width: 380px;
  width: 100%;
  padding: 0 20px;
  text-align: center;
}

.logo-img {
  max-width: 260px;
  height: auto;
  margin-bottom: 6px;
}

.logo-header {
  height: 32px;
  width: auto;
}

.red { color: var(--red); }

.subtitle {
  color: var(--gray);
  margin-bottom: 2.5rem;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

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

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--red);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
  color: var(--white);
  background: var(--gray-dark);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.btn:hover { background: #333; }

.btn-primary {
  background: var(--red);
}

.btn-primary:hover {
  background: var(--red-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: #444;
  background: rgba(255,255,255,0.03);
}

.btn-small {
  padding: 5px 12px;
  font-size: 0.78rem;
}

.btn-danger {
  background: transparent;
  border: 1px solid var(--red-dim);
  color: var(--red);
}

.btn-danger:hover {
  background: var(--red-dim);
  color: var(--white);
}

.error {
  color: var(--red);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 4px;
  margin-right: 8px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

nav {
  display: flex;
  gap: 2px;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s;
  letter-spacing: 0.2px;
}

.nav-btn:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.nav-btn.active { color: var(--red); background: rgba(230,57,70,0.08); }

#user-display {
  color: var(--gray-light);
  font-size: 0.82rem;
}

/* ── Views ──────────────────────────────────────────────────────────────── */
.view {
  padding: 28px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.view-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.view-header h2 {
  flex: 1;
  font-size: 1.4rem;
  font-weight: 700;
  min-width: 0;
  letter-spacing: -0.3px;
}

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

.filter-select {
  padding: 5px 12px;
  font-size: 0.82rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ── Section management ─────────────────────────────────────────────────── */
.section-manage-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  max-height: 40vh;
  overflow-y: auto;
}

.section-manage-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.section-manage-item span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}

.section-manage-item .section-assignee-label {
  font-size: 0.75rem;
  color: var(--gray);
}

/* Assignee badge */
.assignee-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 0.7rem;
  background: rgba(230, 57, 70, 0.1);
  color: var(--red);
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--gray-light);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
  cursor: pointer;
}

.current-logo-preview {
  max-width: 200px;
  max-height: 80px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* ── Projects Grid ──────────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.project-card:hover {
  border-color: rgba(230,57,70,0.3);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.project-logo {
  width: 100%;
  max-height: 140px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 12px;
}

.project-card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.project-card .description {
  color: var(--gray);
  font-size: 0.82rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.progress-bar {
  height: 4px;
  background: var(--gray-dark);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--red);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.progress-fill.complete {
  background: var(--success);
}

.project-stats {
  font-size: 0.78rem;
  color: var(--gray);
}

/* ── Status Summary ─────────────────────────────────────────────────────── */
.status-summary {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  white-space: nowrap;
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.pending { background: var(--gray); }
.status-dot.in_progress { background: var(--warning); }
.status-dot.complete { background: var(--success); }

/* ══════════════════════════════════════════════════════════════════════════
   SECTIONS GRID — Clean card design
   ══════════════════════════════════════════════════════════════════════════ */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.section-card:hover {
  border-color: rgba(230,57,70,0.3);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.section-card-thumb {
  width: 100%;
  height: 130px;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.section-card-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.section-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-card-name {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-card-assignee {
  font-size: 0.72rem;
  color: var(--red);
  opacity: 0.8;
}

.section-card-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.section-card-progress .progress-bar {
  flex: 1;
  margin-bottom: 0;
}

.section-card-progress .pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-light);
  min-width: 30px;
  text-align: right;
}

.section-card-count {
  font-size: 0.75rem;
  color: var(--gray);
}

/* ══════════════════════════════════════════════════════════════════════════
   ASSETS GRID
   ══════════════════════════════════════════════════════════════════════════ */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.asset-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.asset-card:hover {
  border-color: rgba(230,57,70,0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* coloured left border based on status */
.asset-card.status-border-pending     { border-left: 3px solid var(--gray-dark); }
.asset-card.status-border-in_progress { border-left: 3px solid var(--warning); }
.asset-card.status-border-complete    { border-left: 3px solid var(--success); }

.asset-thumb-wrap {
  position: relative;
  width: 100%;
  background: #0a0a0a;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.asset-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.asset-status-overlay {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(6px);
}

.asset-status-overlay.pending     { background: rgba(0,0,0,.55); color: var(--gray-light); }
.asset-status-overlay.in_progress { background: rgba(243,156,18,.2); color: var(--warning); }
.asset-status-overlay.complete    { background: rgba(46,204,113,.2); color: var(--success); }

.asset-card-body {
  padding: 8px 10px 4px;
  flex: 1;
}

.asset-name {
  font-weight: 600;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.asset-dimensions {
  color: var(--gray);
  font-size: 0.7rem;
  margin-bottom: 4px;
}

.asset-meta {
  font-size: 0.7rem;
  color: var(--gray);
  margin-bottom: 2px;
}

.asset-actions {
  padding: 6px 8px 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
}

.asset-actions .btn {
  font-size: 0.72rem;
  padding: 4px 10px;
}

/* ── My Work ────────────────────────────────────────────────────────────── */
.my-work-project-group {
  margin-bottom: 32px;
}

.my-work-project-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--red-dim);
}

.my-work-project-header h3 {
  font-size: 1.05rem;
  color: var(--red);
}

.my-work-section-group {
  margin-bottom: 20px;
  margin-left: 12px;
}

.my-work-section-header {
  font-size: 0.85rem;
  color: var(--gray-light);
  margin-bottom: 10px;
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--border);
}

/* ── Users Table ────────────────────────────────────────────────────────── */
.users-table {
  overflow-x: auto;
}

.users-table table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.users-table th {
  color: var(--gray);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 600;
}

.users-table tr:hover td {
  background: var(--bg-card);
}

.role-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.role-badge.admin {
  background: rgba(230, 57, 70, 0.12);
  color: var(--red);
}

.role-badge.member {
  background: rgba(136, 136, 136, 0.12);
  color: var(--gray-light);
}

/* ── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal h3 {
  margin-bottom: 20px;
  font-size: 1.15rem;
}

.modal form {
  gap: 14px;
}

.modal label {
  font-size: 0.82rem;
  color: var(--gray-light);
  margin-bottom: -8px;
}

.modal .btn-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ── Drop zone ──────────────────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray);
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--red);
  color: var(--white);
  background: var(--red-glow);
}

.drop-zone input[type="file"] {
  display: none;
}

.drop-zone .file-name {
  color: var(--red);
  margin-top: 8px;
  font-size: 0.85rem;
}

/* ── Empty states ───────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}

.empty-state h3 {
  margin-bottom: 8px;
  color: var(--gray-light);
}

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  z-index: 2000;
  animation: slideIn 0.3s ease;
  max-width: calc(100vw - 48px);
}

.toast.error { border-color: var(--red); }
.toast.success { border-color: var(--success); }

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════════
   TOOLS
   ══════════════════════════════════════════════════════════════════════════ */

.tools-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s;
}

.tool-card:hover {
  border-color: rgba(230,57,70,0.25);
}

.tool-icon {
  width: 44px;
  height: 44px;
  background: var(--gray-dark);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  color: var(--gray-light);
}

.tool-info {
  flex: 1;
  min-width: 0;
}

.tool-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.tool-desc {
  color: var(--gray);
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 4px;
}

.tool-meta {
  font-size: 0.72rem;
  color: var(--gray);
}

.tool-meta span {
  margin-right: 12px;
}

.tool-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   TASKS
   ══════════════════════════════════════════════════════════════════════════ */

.tasks-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: border-color 0.2s;
}

.task-card:hover {
  border-color: rgba(230,57,70,0.2);
}

.task-card.task-complete {
  border-left: 3px solid var(--success);
  opacity: 0.7;
}

.task-card.task-pending {
  border-left: 3px solid var(--warning);
}

.task-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.task-name {
  font-weight: 700;
  font-size: 0.95rem;
  flex: 1;
}

.task-status-badge {
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-status-badge.pending {
  background: rgba(243,156,18,0.15);
  color: var(--warning);
}

.task-status-badge.complete {
  background: rgba(46,204,113,0.15);
  color: var(--success);
}

.task-desc {
  color: var(--gray-light);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.task-images-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.task-image-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s;
}

.task-image-thumb:hover {
  border-color: var(--red);
}

.task-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.task-meta {
  font-size: 0.72rem;
  color: var(--gray);
  flex: 1;
}

.task-meta span {
  margin-right: 12px;
}

/* Multi-file drop zone */
.multi-file-list {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--gray-light);
}

.multi-file-list div {
  padding: 2px 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   BULK ACTION BAR
   ══════════════════════════════════════════════════════════════════════════ */

.bulk-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--bg-surface);
  border-top: 2px solid var(--red);
  padding: 10px 16px;
  animation: slideUp 0.2s ease;
}

.bulk-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bulk-count {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--red);
  margin-right: 4px;
}

.bulk-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Asset card checkbox */
.asset-select-wrap {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 10;
}

.asset-select-wrap input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--red);
  cursor: pointer;
  border-radius: 4px;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.asset-card:hover .asset-select-wrap input[type="checkbox"],
.asset-select-wrap input[type="checkbox"]:checked {
  opacity: 1;
}

.asset-card.selected {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 1px var(--red), 0 4px 16px rgba(230,57,70,0.15);
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  header {
    padding: 0 12px;
    height: auto;
    min-height: 48px;
    flex-wrap: wrap;
    gap: 0;
  }

  .hamburger {
    display: flex;
  }

  .logo-header {
    height: 28px;
  }

  .header-left {
    flex: 1;
    min-width: 0;
    height: 48px;
    display: flex;
    align-items: center;
  }

  .header-left nav {
    display: none;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 6px 8px;
    z-index: 99;
    gap: 2px;
  }

  .header-left nav.open {
    display: flex;
  }

  .header-left nav .nav-btn {
    text-align: left;
    padding: 10px 14px;
    font-size: 0.92rem;
  }

  .header-right {
    display: none;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 4px;
    border-top: 1px solid var(--border);
  }

  .header-right.open {
    display: flex;
  }

  #user-display {
    width: 100%;
    text-align: center;
    padding: 2px 0;
    font-size: 0.8rem;
  }

  .header-right .btn {
    flex: 1;
    text-align: center;
    font-size: 0.78rem;
  }

  .view {
    padding: 16px 12px;
  }

  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .view-header h2 {
    font-size: 1.15rem;
  }

  .view-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .view-header-actions .btn {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.72rem;
    padding: 6px 8px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sections-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .section-card-thumb {
    height: 80px;
  }

  .section-card-body {
    padding: 10px 12px 12px;
    gap: 4px;
  }

  .section-card-name {
    font-size: 0.8rem;
  }

  .section-card-count {
    font-size: 0.68rem;
  }

  .assets-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .asset-thumb-wrap {
    aspect-ratio: 4 / 3;
  }

  .asset-card-body {
    padding: 6px 8px 4px;
  }

  .asset-name {
    font-size: 0.7rem;
  }

  .asset-dimensions {
    font-size: 0.62rem;
  }

  .asset-actions {
    padding: 4px 6px 6px;
    gap: 3px;
  }

  .asset-actions .btn {
    font-size: 0.65rem;
    padding: 3px 6px;
  }

  .status-summary {
    gap: 6px;
  }

  .status-badge {
    padding: 5px 10px;
    font-size: 0.72rem;
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

  .modal {
    padding: 20px;
    max-height: 90vh;
  }

  .modal-overlay {
    padding: 8px;
  }

  .drop-zone {
    padding: 20px;
  }

  .users-table th,
  .users-table td {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .section-manage-item {
    flex-wrap: wrap;
    gap: 6px;
  }

  .section-manage-item .btn {
    font-size: 0.68rem;
    padding: 3px 7px;
  }

  .empty-state {
    padding: 40px 16px;
  }

  .my-work-section-group {
    margin-left: 0;
  }

  .bulk-bar {
    padding: 8px 10px;
  }

  .bulk-bar-inner {
    gap: 6px;
  }

  .bulk-bar .btn {
    font-size: 0.68rem;
    padding: 4px 8px;
  }

  .bulk-count {
    font-size: 0.8rem;
    width: 100%;
    margin-bottom: 2px;
  }

  .bulk-divider {
    display: none;
  }

  .asset-select-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }

  .tool-card {
    flex-wrap: wrap;
    padding: 12px 14px;
    gap: 10px;
  }

  .tool-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .tool-name { font-size: 0.85rem; }
  .tool-desc { font-size: 0.78rem; }

  .tool-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .task-card {
    padding: 12px 14px;
  }

  .task-name { font-size: 0.88rem; }
  .task-desc { font-size: 0.8rem; }

  .task-image-thumb {
    width: 60px;
    height: 45px;
  }

  .task-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .sections-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .section-card-thumb {
    height: 60px;
  }

  .assets-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .view {
    padding: 24px 20px;
  }

  .sections-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .assets-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
}
