﻿@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --primary: #4d8dc6;
  --primary-soft: #d9e7f5;
  --accent: #5ac8b0;
  --danger: #d9534f;

  --text: #1f2a44;
  --muted: #5a6b8a;

  --border: #e3e8f0;
  --radius: 16px;
  --shadow: 0 18px 44px rgba(37, 64, 112, 0.16);
  --ring: 0 0 0 4px rgba(77, 141, 198, 0.18);
}

* { box-sizing: border-box; }

body{
  margin:0;
  min-height:100vh;
  font-family:"Manrope", system-ui, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 10% 10%, rgba(77,141,198,.14), transparent 60%),
    radial-gradient(900px 520px at 90% 20%, rgba(90,200,176,.12), transparent 60%),
    linear-gradient(180deg, #fbfdff, var(--bg));
}

a{
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
a:hover{ text-decoration: underline; }

button{
  padding: 12px 16px;
  border-radius: 14px;
  border: 0;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #5fa2d6);
  color:#fff;
  box-shadow: 0 16px 30px rgba(77,141,198,.26);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
button:hover{
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(77,141,198,.35);
  filter: brightness(1.03);
}
button:active{ transform: translateY(0); }

.btn-ghost{
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: none;
  border: 1px solid rgba(185,211,238,.9);
}
.btn-ghost:hover{ filter:none; }

.danger-button{
  background: linear-gradient(135deg, var(--danger), #e3706c);
  box-shadow: 0 16px 30px rgba(217, 83, 79, .22);
}
.danger-button:hover{
  box-shadow: 0 20px 40px rgba(217, 83, 79, .28);
}

input, select, textarea{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: inherit;
  color: var(--text);
}
textarea{
  min-height: 110px;
  resize: vertical;
}
input:focus, select:focus, textarea:focus{
  outline: none;
  border-color: rgba(77,141,198,.55);
  box-shadow: var(--ring);
}

ul{
  list-style: none;
  padding: 0;
  margin: 0;
}
li{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
li:last-child{ border-bottom: 0; }

li a{
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
li a:hover{
  background: #c6dbf3;
  transform: translateY(-1px);
  text-decoration: none;
}

.list-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap: 10px;
}
.list-actions a,
.list-actions button{
  min-width: 110px;
  text-align:center;
}
.list-actions button{
  padding: 8px 14px;
  box-shadow: none;
}

.page-actions{
  width: min(720px, 100%);
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
}
.page-actions > *{
  flex: 1 1 220px;
}
.page-actions button,
.page-actions a{
  width: 100%;
}

.content-list{
  width: min(720px, 100%);
  display:grid;
  gap: 10px;
}

.chart-card{
  width: min(100%, 280px);
  min-height: 240px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.factor-chart-card{
  width: min(100%, 360px);
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

img{
  max-width: 100%;
  height: auto;
}

canvas{
  display:block;
  max-width:100%;
}

@media (max-width: 768px){
  body{
    background:
      radial-gradient(640px 420px at 10% 10%, rgba(77,141,198,.12), transparent 60%),
      radial-gradient(640px 420px at 90% 20%, rgba(90,200,176,.10), transparent 60%),
      linear-gradient(180deg, #fbfdff, var(--bg));
  }

  li{
    flex-direction: column;
    align-items: flex-start;
  }

  .list-actions,
  .page-actions{
    width: 100%;
  }

  li a,
  .list-actions button,
  .list-actions a,
  .page-actions > *{
    width: 100%;
  }
}

@media (max-width: 480px){
  input,
  select,
  textarea,
  button{
    font-size: 16px;
  }
}

body.no-corner-logo .corner-logo{
  display: none;
}

.corner-logo{
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 10px;
  width: clamp(72px, 11vw, 120px);
  height: auto;
  z-index: 1000;
  opacity: .92;
  cursor: pointer;
}

@media (max-width: 600px){
  .corner-logo{
    width: 42px;
    top: 8px;
    right: 8px;
    opacity: .88;
  }
}
