/* Shared workspace components. Page-specific styling lives in css/pages/. */
.app-shell .page-header { margin-bottom: 26px; }
.app-shell .page-header h1, .app-shell .client-header h1, .app-shell .gallery-header h1 { font-size: 28px; font-weight: 650; letter-spacing: -.8px; line-height: 1.2; overflow-wrap: anywhere; }
.app-shell .page-header > .muted { max-width: 760px; line-height: 1.65; }
.app-shell .page-eyebrow { color: var(--muted); font-size:12px; font-weight: 650; letter-spacing: 1.6px; margin-bottom: 10px; }
.app-shell .section-title { font-size: 15px; font-weight: 650; letter-spacing: -.3px; margin-bottom: 16px; }
.app-shell .section-title svg, .app-shell .summary-title svg { width: 19px; height: 19px; stroke-width: 1.8; flex-shrink: 0; }
.app-shell .form-field { min-width: 0; gap: 8px; margin-bottom: 18px; }
.app-shell .form-field label { color: var(--text-secondary); font-size: 12px; font-weight: 550; letter-spacing: 0; text-transform: none; line-height: 1.45; }
.app-shell .form-row > *, .app-shell .filter-grid > *, .app-shell .layout-grid > * { min-width: 0; }
.app-shell .form-field input[type="file"] { line-height: 1.7; }
.app-shell .form-field input[type="file"]::file-selector-button { background: var(--panel-strong); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; margin-right: 9px; cursor: pointer; font: inherit; font-size: 12px; }
.app-shell details.admin-panel, .app-shell details.create-panel { box-shadow: none; border-color: var(--line); border-radius:10px; overflow: hidden; }
.app-shell details.admin-panel:hover, .app-shell details.create-panel:hover { box-shadow: none; }
.app-shell details.admin-panel summary, .app-shell details.create-panel summary { background: var(--panel); padding: 18px 20px; border-radius: 0; font-size: 13px; font-weight: 600; min-height: 60px; gap: 16px; }
.app-shell details.admin-panel summary:hover, .app-shell details.create-panel summary:hover { background: var(--panel-strong); }
.app-shell details.admin-panel summary:focus-visible, .app-shell details.create-panel summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.app-shell .summary-chevron { width: 17px; height: 17px; flex-shrink: 0; }
.app-shell .summary-title { min-width: 0; line-height: 1.5; }
.app-shell .admin-panel-content, .app-shell .create-panel-content { padding: 24px; }
.app-shell .status-badge, .app-shell .role-badge { padding: 4px 8px; font-size:12px; line-height: 1.35; font-weight: 500; text-transform: none; letter-spacing: .1px; white-space: nowrap; border-radius: 5px; }
.app-shell .alert, .app-shell .alert-error { box-shadow: none; border-radius: 7px; font-size: 13px; line-height: 1.6; align-items: flex-start; overflow-wrap: anywhere; }
.app-shell .alert svg, .app-shell .alert-error svg { flex-shrink: 0; }
.app-shell .btn-danger { color: var(--danger); background: transparent; border-color: var(--danger-line); }
.app-shell .btn-danger:hover { color: var(--danger); background: var(--danger-soft); transform: none; }
.app-shell .table-scroll { max-width: 100%; overscroll-behavior-x: contain; }
.app-shell table tbody tr[hidden] { display: none !important; }
.app-shell table th { padding: 12px 18px; font-size:12px; font-weight: 550; text-transform: none; letter-spacing: .1px; color: var(--muted); background: var(--panel-strong); }
.app-shell table td { padding: 15px 18px; color: var(--text-secondary); font-size: 13px; line-height: 1.55; }
.app-shell td .toolbar { flex-wrap: nowrap; }
.app-shell td .btn { white-space: nowrap; }
.app-shell td .btn--small { min-height: 34px; font-size:12px; padding: 6px 11px; }
.app-shell .list-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 16px; }
.app-shell .list-heading h2 { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 650; letter-spacing: -.3px; margin: 0; }
.app-shell .list-heading p { font-size: 12px; margin: 7px 0 0; }
.app-shell .count-badge { display: inline-flex; align-items: center; justify-content: center; font-size:12px; font-weight: 600; padding: 3px 7px; border: 1px solid var(--line); background: var(--panel); border-radius: 5px; color: var(--muted); }
.app-shell .list-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.app-shell .table-search { width: 330px; max-width: 100%; }
.app-shell .list-count, .app-shell .selection-caption { color: var(--muted); font-size:12px; line-height: 1.5; }
.app-shell .selection-caption { padding-top: 16px; }
.app-shell .bulk-toolbar { margin-top: 12px !important; }
.app-shell .meta-tags { gap: 10px 20px; }
.app-shell .meta-item { font-size: 12px; }
.app-shell .layout-grid { gap: 22px; }
.app-shell .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.app-shell .g-item { box-shadow: none; }
.app-shell .g-item:hover { box-shadow: none; border-color: var(--line); }
.app-shell .g-item:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-shell .g-item:focus-within .g-img-overlay { opacity: 1; }
.app-shell .g-meta-size { color: var(--muted); }
.app-shell .profile-header { box-shadow: none; }
.app-shell .profile-avatar-lg { box-shadow: none; }
.app-shell .profile-info h1 { font-size: 28px; font-weight: 650; letter-spacing: -.8px; }
.app-shell .stat-pill { background: var(--panel-strong); border-color: var(--line); border-radius: 10px; }
.app-shell .status-dot { box-shadow: none; width: 7px; height: 7px; }
.app-shell .empty-state, .app-shell .empty-gallery { min-height: 250px; gap: 18px; }
.app-shell .empty-state svg, .app-shell .empty-gallery svg { opacity: .7; stroke: var(--accent); }
.app-shell .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .app-shell .page-header { margin-bottom: 22px; }
  .app-shell .page-header h1, .app-shell .client-header h1, .app-shell .gallery-header h1 { font-size: 25px; letter-spacing: -.7px; }
  .app-shell .admin-panel-content, .app-shell .create-panel-content { padding: 18px; }
  .app-shell .form-row { grid-template-columns: minmax(0,1fr); }
  .app-shell .filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .app-shell .filter-grid .form-field:last-child { grid-column: 1/-1; flex-wrap: wrap; }
  .app-shell .list-heading { align-items: flex-start; flex-wrap: wrap; }
  .app-shell .list-tools { flex-wrap: wrap; gap: 9px; }
  .app-shell .table-search { width: 100%; }
  .app-shell .list-heading .btn { width: auto; }
  .app-shell .layout-grid { grid-template-columns: minmax(0,1fr); }
  .app-shell .profile-header { flex-wrap: wrap; align-items: flex-start; gap: 20px; }
  .app-shell .profile-info { width: 100%; min-width: 0; }
  .app-shell .profile-meta { flex-wrap: wrap; gap: 10px; }
  .app-shell .stats-row { flex-wrap: wrap; }
  .app-shell .bulk-toolbar > div[style="flex:1;"] { display: none; }
  .app-shell td .btn--small { min-height: 44px; }
  .app-shell[data-page="projects"] .alert > div:last-child { flex-wrap: wrap; }
  .app-shell[data-page="projects"] .alert > div:last-child input { min-width: 0; flex-basis: 180px !important; }
}
@media (max-width: 420px) {
  .app-shell .filter-grid { grid-template-columns: minmax(0,1fr); }
  .app-shell .gallery-grid { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell .g-item, .app-shell .g-img-wrap img, .app-shell .g-img-overlay svg { transition: none; transform: none !important; }
}

/* Flow-style compact lists keep primary records and actions in view on phones. */
.mobile-filter-toggle,.mobile-cell-meta{display:none}
@media(max-width:760px){
 .mobile-filters{margin-bottom:24px;border:1px solid var(--line);border-radius:10px;background:var(--panel);overflow:hidden}
 .mobile-filters>.mobile-filter-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:14px 18px;font-size:13px;font-weight:600;list-style:none;color:var(--text-secondary)}
 .mobile-filter-toggle::-webkit-details-marker{display:none}
 .mobile-filter-toggle svg{width:16px;height:16px;transition:transform .15s}
 .mobile-filters[open]>.mobile-filter-toggle{border-bottom:1px solid var(--line)}
 .mobile-filters[open]>.mobile-filter-toggle svg{transform:rotate(90deg)}
 .app-shell .mobile-filters>.card{border:0;box-shadow:none;margin-bottom:0!important;border-radius:0}
 .mobile-filters .section-title{display:none}
 .app-shell .project-directory-table{width:100%;min-width:0;table-layout:fixed}
 .project-directory-table .col-secondary{display:none}
 .app-shell .project-directory-table .cell-select{width:44px!important;padding:13px 6px 13px 16px!important}
 .app-shell .project-directory-table .cell-primary{white-space:normal;overflow-wrap:anywhere;padding:15px 16px}
 .project-directory-table .cell-primary>a{display:inline-flex;align-items:center;min-height:30px}
 .mobile-cell-meta{display:block;margin-top:3px;font-size:12px;font-weight:400;color:var(--muted);line-height:1.5}
 .app-shell .client-directory-table{display:block;min-width:0;width:100%}
 .client-directory-table thead{display:none}
 .client-directory-table tbody{display:block}
 .client-directory-table tr[data-client-name]{display:grid;grid-template-columns:28px minmax(0,1fr) 76px;align-items:center;gap:8px;padding:16px;border-bottom:1px solid var(--line)}
 .client-directory-table tr[data-client-name]:last-child{border-bottom:0}
 .app-shell .client-directory-table tr[data-client-name]>td{padding:0!important;border:0;white-space:normal;min-width:0;overflow-wrap:anywhere}
 .client-directory-table tr[data-client-name]>td:nth-child(2),.client-directory-table tr[data-client-name]>td:nth-child(5){display:none}
 .client-directory-table tr[data-client-name]>td:nth-child(3) a{display:flex;align-items:center;min-height:32px}
 .client-directory-table tr[data-client-name]>td:last-child{grid-column:2/-1}
 .app-shell .client-directory-table td .toolbar{flex-wrap:wrap;justify-content:flex-start!important}
 .app-shell .client-directory-table td .btn--small{min-width:44px;min-height:44px;padding:9px 12px;font-size:12px}
}
