:root {
  --bg: #f4f7ff;
  --panel: #eef3ff;
  --card: #ffffff;
  --card-soft: #f7f9ff;
  --text: #1b2643;
  --muted: #63739a;
  --primary: #3a7bff;
  --secondary: #8758ff;
  --good: #10b981;
  --bad: #ef476f;
  --border: #d9e3ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, #f8faff 0%, #edf3ff 100%);
  color: var(--text);
}

body.soft-dark {
  --bg: #11172a;
  --panel: #1a2239;
  --card: #1e2845;
  --card-soft: #243051;
  --text: #e8eeff;
  --muted: #9ca9cc;
  --border: #33436d;
  background: linear-gradient(180deg, #151d33 0%, #0f1628 100%);
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #f1f5ff 0%, #e9f0ff 100%);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
}

body.soft-dark .sidebar {
  background: linear-gradient(180deg, #1b2542 0%, #16203a 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-weight: 700;
}

.company-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  border: 1px solid var(--border);
}

.brand h1 {
  margin: 0;
  font-size: 1.2rem;
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.nav {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.nav-btn {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(58, 123, 255, 0.18), rgba(135, 88, 255, 0.16));
  border-color: #b6c9ff;
}

.theme-box {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.theme-box label {
  font-size: 0.85rem;
  color: var(--muted);
}

.content {
  padding: 22px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 10px 24px rgba(41, 78, 164, 0.08);
}

.hero h2 {
  margin: 0 0 8px;
}

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

h3 {
  margin: 0 0 12px;
}

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

input,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  padding: 10px;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

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

.url-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  cursor: pointer;
}

button.secondary {
  background: #e8efff;
  border: 1px solid #c8d7ff;
  color: #2e4374;
}

button.danger {
  background: #ffe7ee;
  border: 1px solid #ffbfd0;
  color: #a62d4c;
}

body.soft-dark button.secondary {
  background: #2b3a61;
  border-color: #42598f;
  color: #dde7ff;
}

body.soft-dark button.danger {
  background: #5b2d3d;
  border-color: #7d3a52;
  color: #ffd7e3;
}

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

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 31px;
}

.checkbox-row input {
  width: auto;
}

.checkbox-row.inline {
  margin-top: 0;
  display: inline-flex;
  margin-right: 8px;
}

.status {
  min-height: 22px;
  margin-top: 8px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

th {
  color: #4a5f8f;
  font-weight: 700;
}

.pill {
  display: inline-block;
  border-radius: 20px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 0.8rem;
}

.pill.good {
  background: rgba(16, 185, 129, 0.15);
  color: #087752;
}

.pill.bad {
  background: rgba(239, 71, 111, 0.12);
  color: #a72b4a;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

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

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

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

.app-card {
  cursor: pointer;
}

.app-card:hover {
  border-color: var(--primary);
}

.mini-card h4 {
  margin: 0 0 8px;
}

.details-grid {
  display: grid;
  gap: 10px;
}

.detail-list {
  display: grid;
  gap: 8px;
}

.detail-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
}

.detail-item p {
  margin: 4px 0;
}

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

.shot-card {
  border: 1px solid var(--border);
  background: var(--card-soft);
  border-radius: 12px;
  padding: 10px;
}

.shot-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.shot-card p {
  margin: 5px 0;
}

.app-folder-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--card);
}

.app-folder-block h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.folder-card h4 {
  margin: 0 0 10px;
  color: var(--primary);
}

a {
  color: #2f67d8;
}

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

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .checkbox-row {
    margin-top: 6px;
  }

  .url-toolbar {
    flex-direction: column;
  }
}
