:root {
  --bg: #f3ede3;
  --panel: #fffdf9;
  --ink: #243036;
  --muted: #66767c;
  --line: #dacdbf;
  --accent: #13736c;
  --accent-soft: #e2f0ee;
  --danger: #b84d34;
  --danger-soft: #f8e7e2;
  --warning: #cc8b2d;
  --warning-soft: #f7edd9;
  --shadow: 0 18px 40px rgba(36, 48, 54, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(0deg, rgba(175, 238, 238, 0.6) 0%, transparent 100%),
    linear-gradient(180deg, #f8f3ea 0%, var(--bg) 100%);
  background-attachment: fixed;
}

.container {
  width: min(960px, calc(100% - 2rem));
  margin-inline: auto;
}

.hero {
  padding: 3rem 0 1.75rem;
}

.hero__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.hero__content {
  flex: 1;
}

.hero__logo {
  max-width: 100px;
  height: auto;
  border-radius: var(--radius);
  transform: translateX(-1rem);
  margin-right: auto;
}

@media (max-width: 600px) {
  .hero__container {
    flex-direction: column;
    text-align: center;
  }
  
  .hero__logo {
    max-width: 120px;
    order: -1;
    margin-right: 0;
    transform: translateX(0);
  }

  input::placeholder {
    font-size: 0.85rem;
  }

  .panel h2 {
    font-size: 1.25rem;
  }

  .btn {
    font-size: 0.9rem;
    padding: 0.75rem 0.9rem;
  }
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2ab7b0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  color: #0d5c5a !important;
}

.hero__text {
  max-width: 48rem;
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.layout {
  display: grid;
  gap: 1rem;
  padding-bottom: 2rem;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(218, 205, 191, 0.75);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.panel h2 {
  margin: 0 0 0.4rem;
  color: #0d5c5a;
}

.panel__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.panel__subtitle {
  margin: 0.35rem 0 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.study-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: end;
}

.study-item__content{
  display: grid;
  gap: 0.5rem;
}

.study-item__meta{
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge--api{
  background-color: var(--warning-soft);
  color: var(--warning);
}

.badge--manual{
  background-color: var(--accent-soft);
  color: var(--accent);
}



.field span,
.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2ab7b0;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #fff inset;
  transition: background-color 5000s ease-in-out 0s;
}

input:focus,
select:focus {
  outline: 3px solid rgba(19, 115, 108, 0.15);
  border-color: var(--accent);
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
  transition:
    transform 120ms ease,
    opacity 120ms ease,
    background-color 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--ghost {
  background: var(--accent-soft);
  color: var(--accent);
}

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

.feedback {
  min-height: 1.5rem;
  margin: 0.2rem 0 0;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.85rem;
}

.feedback--fade-out {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.feedback--success {
  color: var(--accent);
}

.feedback--error {
  color: var(--danger);
}

.empty-state {
  margin: 0.1rem 0 0;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
}

.empty-state[hidden] {
  display: none;
}

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

.study-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--warning);
  border-radius: 16px;
  background: #fff;
}

.study-item__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.study-item__actions {
  display: flex;
  gap: 0.5rem;
}

.study-item__top{
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.study-item--completed {
  border-left-color: var(--accent);
  opacity: 0.85;
}

.study-item--completed .study-item__title {
  text-decoration: line-through;
  color: var(--muted);
}

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

  .panel__header,
  .study-item {
    grid-template-columns: 1fr;
  }

  .panel__header {
    display: grid;
    gap: 0.5rem;
  }

  .panel__actions {
    margin-top: -0.5rem;
  }
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease-in-out;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(36, 48, 54, 0.4);
  backdrop-filter: blur(2px);
}

.modal__dialog {
  position: relative;
  width: min(450px, calc(100% - 2rem));
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  padding: 2rem;
  transform: translateY(20px);
  transition: transform 0.25s ease-in-out;
}

.modal.is-open .modal__dialog {
  transform: translateY(0);
}

.modal__dialog h2 {
  margin: 0 0 1rem;
  color: #0d5c5a;
}

.modal__dialog p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  line-height: 1.5;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
