/* minimalist nav */
.nav {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 1rem 2rem;
  border-bottom:1px solid var(--border);
  background:var(--surface);
}

.nav a {
  margin-left:1.2rem;
  text-decoration:none;
  color:var(--text);
  font-weight:500;
  transition:var(--transition);
}
.nav a:hover {
  color:var(--accent);
}

/* flash */
.flash-container { margin-bottom: 1rem; }
.flash-message {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  background: #eaf5ff;
  color: #084d8b;
  margin-bottom: .5rem;
}

/* cards */
.card {
  background:var(--surface);
  padding:2rem;
  border-radius:var(--radius);
  border:1px solid var(--border);
  box-shadow:0 1px 2px rgba(0,0,0,0.04);
}

/* minimalist link-button style */
.btn-text {
  background:none;
  border:none;
  padding:0;
  font-size:1rem;
  color:var(--accent);
  cursor:pointer;
  font-weight:500;
  transition:var(--transition);
}
.btn-text:hover {
  opacity:0.8;
}


.auth-container {
  display:flex;
  justify-content:center;
  align-items:center;
  height:70vh;
}

.auth-form input {
  width:100%;
  padding:.75rem 1rem;
  border:1px solid var(--border);
  border-radius:var(--radius);
  margin-bottom:.75rem;
}

.auth-form input:focus {
  border-color:var(--accent);
}

.muted {
  color:var(--text-light);
}
.small {
  font-size:.85rem;
}



.container.page-slim {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.case-title {
  margin-bottom: 0.25rem;
  font-size: 1.75rem;
  font-weight: 600;
}

.case-intention {
  margin-top: 0.25rem;
  color: var(--text-light);
}

.case-actions {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0 2.25rem;
}

.section-title {
  font-size: 1.25rem;
  margin-bottom: .75rem;
  font-weight: 500;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.file-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  background: var(--surface);
}

.file-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--layer);
}

.file-thumb.placeholder {
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--layer);
  border:1px dashed var(--border);
}

.file-name {
  font-weight: 500;
  font-size: .9rem;
}

.btn-text-bold {
  font-weight: 600;
}



.page-header {
  margin-bottom: 2rem;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.case-tile {
  display:block;
  padding:1.25rem;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface);
  text-decoration:none;
  transition: all .18s ease;
}

.case-tile:hover {
  border-color:var(--accent);
  background:var(--layer);
  transform: translateY(-2px);
}

.case-name {
  font-weight:600;
  font-size:1.05rem;
  color:var(--text);
}

.case-meta {
  margin-top: .5rem;
}

.dashboard-actions {
  margin-top:2.5rem;
  display:flex;
  gap:1.25rem;
}





/* Workspace container */
.workspace {
  max-width: 720px;
  padding: 2rem 1.25rem;
}

/* Form structure */
.ws-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-label {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.form-input:focus {
  border-color: var(--accent);
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  background: var(--layer);
  transition: border .2s ease;
}

.dropzone:hover {
  border-color: var(--accent);
}

.dropzone input[type="file"] {
  display: none;
}

/* File list preview */
.file-list {
  list-style:none;
  padding:0;
  margin-top:.5rem;
}

.file-list li {
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  font-size:.9rem;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(3px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  font-size:1rem;
  color: var(--text);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-bottom: .75rem;
}

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



.guided-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.guided-panel {
  display: none;
  animation: fadeIn .35s ease forwards;
}

.guided-panel.active {
  display: block;
}

.guided-input {
  width: 100%;
  padding: .85rem 1rem;
  margin-top: .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.guided-input:focus {
  border-color: var(--accent);
}

.preview-gallery {
  margin-top:1rem;
  display:none;
}

.preview-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(85px,1fr));
  gap:.5rem;
  margin-top:.5rem;
}

blockquote {
  padding:.5rem 0 0;
  border-left:2px solid var(--accent-faint);
  margin:0 0 1rem;
  padding-left:.75rem;
  font-style:italic;
}


.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.case-tile {
  background: white;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.case-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.placeholder-thumb {
  width: 100%;
  height: 140px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-tile-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.delete-btn.small {
  width: 100%;
  background: #fff;
  color: #b00020;
  border: none;
  font-size: 13px;
  padding: 8px;
  border-top: 1px solid #eee;
  cursor: pointer;
}

.delete-btn.small:hover {
  background: #f9eaea;
}

.case-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  background: #f3f3f3;
}
.case-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 12px;
}
.dropdown {
  position: relative;
}
.dropdown-toggle {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0 8px;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
  padding: 4px 0;
  display: none;
}
.dropdown:hover .dropdown-menu {
  display: block;
}
.dropdown-menu a {
  display: block;
  padding: 6px 14px;
  color: #333;
  text-decoration: none;
}
.dropdown-menu a:hover {
  background: #f8f8f8;
}
.nav a.muted {
  color: #888;
}
.nav a.muted:hover {
  color: #333;
}
.nav a.small {
  font-size: 0.85em;
  opacity: 0.7;
}

.nav a.small:hover {
  opacity: 1;
}


/* Navbar + Footer theme adaptation */
body.theme-dark nav,
body.theme-dark footer {
  background: #1a1a1a;
  border-color: #333;
  color: #eee;
}

body.theme-contrast nav,
body.theme-contrast footer {
  background: #000;
  border: 2px solid #fff;
  color: #fff;
}
