* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cream: #f9f3e8;
  --sand: #ede0c8;
  --terracotta: #c97d4e;
  --burnt: #a05a30;
  --umber: #6b3f22;
  --sage: #8a9e7a;
  --gold: #c9a84c;
  --warm-white: #fffcf6;

  --text-dark: #3c2a1a;
  --text-mid: #7a5a3c;
  --text-light: #b0896a;

  --danger: #d32f2f;

  --font-body: "Jost", sans-serif;
  --font-serif: "Cormorant Garamond", serif;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 100px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.16);

  --border-soft: 1px solid rgba(201, 125, 78, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-weight: 300;
  min-height: 100vh;
  line-height: 1.45;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--burnt);
  line-height: 1.15;
}

.container {
  width: min(1400px, 100% - 40px);
  margin-inline: auto;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--terracotta);
  color: var(--warm-white);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.btn:hover {
  background: var(--burnt);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(160, 90, 48, 0.22);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--primary {
  background: var(--terracotta);
  color: var(--warm-white);
}

.btn--outline {
  background: transparent;
  border-color: rgba(201, 125, 78, 0.35);
  color: var(--text-mid);
}

.btn--outline:hover {
  background: rgba(201, 125, 78, 0.08);
  border-color: var(--terracotta);
  color: var(--burnt);
}

.btn--danger {
  background: rgba(211, 47, 47, 0.08);
  border-color: rgba(211, 47, 47, 0.25);
  color: var(--danger);
}

.btn--danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn--success {
  background: rgba(46, 125, 50, 0.08);
  border-color: rgba(46, 125, 50, 0.25);
  color: #2e7d32;
}

.btn--success:hover {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}

.btn--block {
  width: 100%;
}

.btn--small {
  min-height: 36px;
  padding: 6px 16px;
  font-size: 12px;
}

/* FORMS */
.form-card {
  background: rgba(255, 252, 246, 0.92);
  backdrop-filter: blur(4px);
  border: var(--border-soft);
  border-radius: 4px var(--radius-lg) 4px var(--radius-lg);
  padding: 32px;
  margin-bottom: 40px;
}

.form-card h2 {
  font-size: 28px;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-mid);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.required {
  color: var(--terracotta);
  margin-left: 4px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 20px;
  background: var(--warm-white);
  color: var(--text-dark);
  border: 1px solid rgba(201, 125, 78, 0.25);
  border-radius: var(--radius-pill);
  outline: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.textarea {
  min-height: 120px;
  border-radius: 24px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(201, 125, 78, 0.1);
}

.hint {
  margin: -8px 0 14px;
  font-size: 12px;
  color: var(--text-light);
}

.file-field {
  padding: 20px;
  margin-top: 18px;
  border: 1px dashed rgba(201, 125, 78, 0.3);
  border-radius: var(--radius-md);
  background: rgba(201, 125, 78, 0.05);
}

.file-field label {
  margin-top: 0;
}

.file-field small {
  display: block;
  margin-top: 6px;
  color: var(--text-light);
  font-size: 12px;
}

/* TABS */
.tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(201, 125, 78, 0.2);
  padding-bottom: 12px;
}

.tabs__btn {
  padding: 12px 32px;
  border: 1px solid rgba(201, 125, 78, 0.3);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-mid);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}

.tabs__btn:hover {
  border-color: var(--terracotta);
  color: var(--burnt);
  background: rgba(201, 125, 78, 0.05);
}

.tabs__btn.is-active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--warm-white);
}

/* NOTIFICATION */
.notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  background: var(--warm-white);
  border: 1px solid var(--terracotta);
  color: var(--burnt);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.notification.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(60, 42, 26, 0.5);
  backdrop-filter: blur(6px);
}

.modal {
  width: min(560px, 100%);
  max-height: 85vh;
  overflow: auto;
  padding: 28px;
  background: var(--warm-white);
  border: 1px solid rgba(201, 125, 78, 0.2);
  border-radius: 4px var(--radius-md) 4px var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(201, 125, 78, 0.12);
}

.modal__title {
  font-size: 24px;
}

.modal__close {
  border: none;
  background: none;
  font-size: 22px;
  color: var(--text-light);
  cursor: pointer;
}

.modal__close:hover {
  color: var(--burnt);
}

/* LISTS / CARDS */

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 24px;
  margin-bottom: 12px;
  background: rgba(255, 252, 246, 0.9);
  border: 1px solid rgba(201, 125, 78, 0.15);
  border-radius: 16px;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.list-item:hover {
  border-color: var(--terracotta);
  background: rgba(255, 252, 246, 0.98);
}

.list-item__info {
  flex: 1;
  min-width: 220px;
}

.list-item__title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--burnt);
}

.list-item__subtitle {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-light);
}

.list-item__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .container {
    width: calc(100% - 24px);
  }

  .form-card {
    padding: 20px;
  }

  .tabs {
    gap: 8px;
  }

  .tabs__btn {
    padding: 8px 18px;
    font-size: 11px;
  }

  .list-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-item__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .notification {
    right: 16px;
    left: 16px;
    bottom: 16px;
    max-width: none;
    text-align: center;
  }
}

/* File input */
input[type="file"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px dashed rgba(201, 125, 78, 0.35);
  border-radius: 16px;
  background: rgba(255, 252, 246, 0.6);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-mid);
  cursor: pointer;
  transition:
    border-color 0.3s ease,
    background 0.3s ease;
}

input[type="file"]:hover {
  border-color: var(--terracotta);
  background: rgba(201, 125, 78, 0.06);
}

input[type="file"]::file-selector-button {
  margin-right: 14px;
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--terracotta);
  color: var(--warm-white);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
  background: var(--burnt);
}

/* Кнопка "На главную" */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: 1px solid rgba(201, 125, 78, 0.3);
  border-radius: var(--radius-pill);
  color: var(--text-mid);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.back-link:hover {
  border-color: var(--terracotta);
  color: var(--burnt);
  background: rgba(201, 125, 78, 0.05);
}
