﻿@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatAura {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -12px, 0) scale(1.04); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

:root {
  color-scheme: light;
  --font-ui: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-code: "Cascadia Mono", "Consolas", monospace;

  --primary: #0f766e;
  --primary-hover: #115e59;
  --secondary: #f97316;
  --accent: #c2410c;

  --bg: #f7f5ef;
  --bg-soft: #efeadd;
  --bg-secondary: #f3eee3;
  --card-bg: #fffdf8;

  --fg: #1f2937;
  --muted: #5a6470;

  --border: #d9cfba;
  --border-color: #d9cfba;
  --primary-light: #ccfbf1;

  --shadow-sm: 0 1px 2px rgb(20 23 28 / 0.06);
  --shadow: 0 12px 30px rgb(20 23 28 / 0.08);
  --shadow-lg: 0 18px 45px rgb(20 23 28 / 0.14);

  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  filter: blur(10px);
}

body::before {
  width: 45vw;
  height: 45vw;
  left: -8vw;
  top: -10vw;
  border-radius: 48% 52% 61% 39% / 42% 40% 60% 58%;
  background: radial-gradient(circle at 35% 35%, rgb(15 118 110 / 0.25), rgb(15 118 110 / 0.02));
  animation: floatAura 8s ease-in-out infinite;
}

body::after {
  width: 36vw;
  height: 36vw;
  right: -6vw;
  bottom: -8vw;
  border-radius: 60% 40% 50% 50% / 55% 45% 55% 45%;
  background: radial-gradient(circle at 50% 50%, rgb(249 115 22 / 0.2), rgb(249 115 22 / 0.02));
  animation: floatAura 9s ease-in-out infinite reverse;
}

.animate-fade-in,
.animate-slide-up {
  animation: riseIn 0.7s ease-out both;
}

.container,
.app-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  margin: 1rem auto 2rem;
  padding: 1.25rem 0;
}

.site-header .container {
  background:
    linear-gradient(145deg, rgb(255 255 255 / 0.95), rgb(255 253 248 / 0.82)),
    linear-gradient(120deg, rgb(15 118 110 / 0.14), rgb(249 115 22 / 0.16));
  border: 1px solid rgb(255 255 255 / 0.8);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.5rem 1.75rem;
  position: relative;
  overflow: hidden;
}

.site-header .container::after {
  content: "";
  position: absolute;
  inset: auto -18% -55% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(15 118 110 / 0.24), transparent 70%);
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #083344;
  position: relative;
  z-index: 1;
}

.site-header p {
  margin: 0.35rem 0 0;
  color: #334155;
  position: relative;
  z-index: 1;
}

main.container,
main.app-container {
  margin-bottom: 2rem;
}

.site-footer {
  margin-top: 2.5rem;
  padding: 1.2rem 0 2rem;
}

.site-footer .container {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  padding-top: 1.2rem;
}

.app-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.app-card-list > li:nth-child(1) {
  grid-column: span 5;
}

.app-card-list > li:nth-child(2) {
  grid-column: span 4;
}

.app-card-list > li:nth-child(3) {
  grid-column: span 3;
}

.app-card {
  min-height: 100%;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.98), rgb(255 252 245 / 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.app-card h3 {
  margin: 0 0 0.9rem;
  font-size: 1.06rem;
  color: #0b3f3b;
}

.app-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.app-card li {
  margin: 0;
}

.app-card a {
  display: block;
  text-decoration: none;
  color: #1f2937;
  background: var(--bg-secondary);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.54rem 0.65rem;
}

.app-card a:hover {
  border-color: rgb(15 118 110 / 0.45);
  background: #e6f4f1;
}

.panel {
  background: linear-gradient(180deg, rgb(255 255 255 / 0.98), rgb(255 252 247 / 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
}

.button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--primary), #0f766e);
  color: #fff;
  padding: 0.6rem 1rem;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  box-shadow: 0 8px 18px rgb(15 118 110 / 0.22);
}

.button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.button:active,
.button.active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgb(15 118 110 / 0.2);
}

.button:disabled,
.dropdown-item:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.button.secondary {
  background: #fff;
  color: #0f172a;
  border-color: var(--border);
  box-shadow: none;
}

.dropdown-item.active,
.badge.primary {
  background: var(--primary);
  color: #fff;
}

input[type="number"],
input[type="text"],
input[type="date"],
input[type="datetime-local"],
select,
textarea,
.form-control,
.form-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: var(--fg);
  padding: 0.62rem 0.78rem;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(15 118 110 / 0.16);
}

.dnd {
  border: 2px dashed #b9ae97;
  border-radius: var(--radius);
  min-height: 220px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: #4b5563;
  background: repeating-linear-gradient(
    45deg,
    rgb(255 252 245),
    rgb(255 252 245) 9px,
    rgb(247 240 228) 9px,
    rgb(247 240 228) 18px
  );
}

.dnd.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef9f7;
}

img.preview {
  max-width: 100%;
  height: auto;
  display: block;
}

img.preview:not([src]),
img.preview[src=""] {
  display: none;
}

small.hint,
.muted,
.text-muted {
  color: var(--muted);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  background: #fff;
}

.item .info {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.item .thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  flex-shrink: 0;
}

.item .meta,
.item .status {
  font-size: 0.86rem;
  color: var(--muted);
}

.item.error {
  background: #fff1f2;
  border-color: #fda4af;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 0.79rem;
}

.badge.success {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.badge.error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.code {
  font-family: var(--font-code);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.08rem 0.4rem;
}

.form-control.code {
  padding: 0.72rem;
  line-height: 1.45;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.toolbar,
.header-actions,
.item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.header-actions {
  justify-content: space-between;
}

.diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.diff pre {
  min-height: 220px;
  margin: 0;
  border: 1px solid var(--border);
  background: #fffcf5;
  border-radius: 10px;
  padding: 0.7rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.line-add {
  background: #e8faf1;
}

.line-del {
  background: #fff1f2;
}

.line-mod {
  background: #fff7d9;
}

.preview-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  min-height: 60px;
  max-height: 400px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem;
  align-items: center;
}

.claims {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.file-input-wrapper {
  margin: 1rem 0;
}

.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #f2e7d3;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.22s ease;
}

.mt-xs {
  margin-top: 0.4rem;
}

.mt-sm {
  margin-top: 0.75rem;
}

.w-100 {
  width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  margin: 0.35rem 0 0.7rem;
}

@media (max-width: 980px) {
  .app-card-list > li:nth-child(1),
  .app-card-list > li:nth-child(2),
  .app-card-list > li:nth-child(3) {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  body::before,
  body::after {
    display: none;
  }

  .site-header {
    margin-top: 0.7rem;
  }

  .site-header .container {
    border-radius: 18px;
    padding: 1rem 1rem;
  }

  .app-card-list {
    grid-template-columns: 1fr;
  }

  .app-card-list > li:nth-child(1),
  .app-card-list > li:nth-child(2),
  .app-card-list > li:nth-child(3) {
    grid-column: auto;
  }

  .grid-2,
  .grid-3,
  .diff,
  .claims {
    grid-template-columns: 1fr;
  }

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

  .dnd {
    min-height: 160px;
  }
}

