:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(145deg, #eef2ff, #f8fafc 50%, #ecfeff);
  color: var(--text);
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.hero {
  margin-bottom: 20px;
}

.hero.compact {
  margin-bottom: 14px;
}

.company {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

h2,
h3 {
  margin: 0;
}

input,
select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 0.97rem;
  margin-bottom: 12px;
  background: #fff;
}

input:focus,
select:focus {
  outline: 2px solid #bfdbfe;
  border-color: #93c5fd;
}

button {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.secondary-btn {
  background: #334155;
}

.secondary-btn:hover {
  background: #1e293b;
}

.danger-btn {
  background: #dc2626;
}

.danger-btn:hover {
  background: #b91c1c;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status {
  margin: 12px 0 0;
  color: var(--muted);
}

.error {
  color: #dc2626;
}

.hidden {
  display: none;
}

.batch-rows {
  display: grid;
  gap: 14px;
}

.batch-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.row-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.row-badge {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
}

.row-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.editor-highlight {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fffaf0, #ffffff);
}

.editor-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-highlight:focus {
  outline: 2px solid #fde68a;
  border-color: #fbbf24;
}

.share-panel {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.share-field {
  flex: 1;
}

.share-wrap {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.share-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  background: #0f766e;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.open-link:hover {
  background: #115e59;
}

.saved-links {
  margin-top: 16px;
}

.announcement-card {
  margin-top: 16px;
}

.announcement-preview {
  width: 100%;
  min-height: 260px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px;
  font: inherit;
  line-height: 1.55;
  resize: vertical;
  background: #f8fafc;
  color: var(--text);
}

.announcement-preview:focus {
  outline: 2px solid #bfdbfe;
  border-color: #93c5fd;
}

.saved-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.saved-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.saved-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saved-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  background: #f8fafc;
}

.saved-item-left {
  min-width: 0;
}

.saved-title {
  margin: 0;
  font-weight: 700;
}

.saved-meta {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.saved-editor {
  margin: 6px 0 0;
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #7c2d12;
  background: #ffedd5;
}

.saved-link {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: #0f172a;
  word-break: break-all;
}

.saved-source {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
}

.saved-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.row-status {
  margin: 10px 0 0;
  color: var(--muted);
  min-height: 20px;
}

.file-explorer {
  padding: 16px;
}

.folder-group + .folder-group {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.folder-group h2 {
  margin: 0 0 10px;
  font-size: 1.06rem;
}

.file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  background: #fafafa;
}

.file-meta {
  min-width: 0;
}

.file-name {
  margin: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-type {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #0f766e;
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}

.download-btn:hover {
  background: #115e59;
}

.download-btn.secondary {
  background: #334155;
}

.download-btn.secondary:hover {
  background: #1e293b;
}

.file-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 640px) {
  .container {
    padding: 20px 12px 30px;
  }

  .toolbar,
  .saved-header,
  .share-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .row-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    justify-content: stretch;
  }

  .file-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .saved-item {
    flex-direction: column;
  }
}
