/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --success-bg: #ecfdf3;
  --success-text: #166534;
  --alert-bg: #fef2f2;
  --alert-text: #991b1b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 960px;
  margin: 32px auto;
  padding: 0 20px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
}

.brand {
  font-weight: 700;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.stack > * + * {
  margin-top: 12px;
}

.flash {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}

.flash.notice {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: #bbf7d0;
}

.flash.alert {
  background: var(--alert-bg);
  color: var(--alert-text);
  border-color: #fecaca;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
}

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

.btn-danger {
  background: var(--danger);
}

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

.meta {
  color: var(--muted);
  font-size: 14px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.list li {
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.list li:last-child {
  border-bottom: 0;
}

.file-input {
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.upload-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.upload-card {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.upload-card__remove-form {
  margin: 0;
  padding: 0 10px 10px;
}

.upload-card__remove {
  width: 100%;
  font-size: 13px;
  padding: 6px 10px;
}

.upload-card__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  color: inherit;
  text-decoration: none;
}

.upload-card__link:hover {
  text-decoration: none;
  background: #fafbff;
}

.upload-card__thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg);
}

.upload-card__placeholder {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.upload-card__name {
  font-weight: 600;
  font-size: 14px;
  word-break: break-word;
}

.upload-card__meta {
  font-size: 13px;
  color: var(--muted);
}

.upload-preview {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--bg);
  text-align: center;
}

.upload-preview__img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  vertical-align: middle;
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
