/* ── Layout ───────────────────────────────────────────── */
.ct-page { margin: 0; padding: 0; min-height: 100vh; }

.ct-header {
  background-color: #8b6f47;
  width: 100%;
  padding: 80px 24px;
}
.ct-header--compact { padding: 48px 24px; }

.ct-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.ct-header__title {
  color: #f5f1e8;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 96px;
  font-weight: 700;
  margin: 0 0 24px 0;
  letter-spacing: -2px;
}

.ct-header__subtitle {
  color: #f5f1e8;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 28px;
  font-weight: 300;
  margin: 0;
}

.ct-content {
  background-color: #a8c5a0;
  width: 100%;
  padding: 48px 24px;
  min-height: 100vh;
}

.ct-content__inner { max-width: 900px; margin: 0 auto; }

/* ── Buttons & Links ─────────────────────────────────── */
.ct-btn {
  display: inline-block;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: #f5f1e8;
}

.ct-btn--dark-green { background-color: #2d4a3e; }
.ct-btn--medium-green { background-color: #5a7c69; }
.ct-btn--brown { background-color: #8b6f47; }

.ct-btn--lg {
  padding: 12px 24px;
  font-size: 16px;
}

.ct-btn--xl {
  padding: 12px 32px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ct-btn--pill {
  padding: 16px 32px;
  border-radius: 8px;
  flex: 1;
}

.ct-btn--full { width: 100%; text-align: center; display: block; }

/* ── Admin bar ───────────────────────────────────────── */
.ct-admin-bar {
  position: absolute;
  top: 16px;
  right: 16px;
}

/* ── Sort Dropdown ───────────────────────────────────── */
.ct-sort { text-align: right; margin-bottom: 32px; }
.ct-sort__wrap { position: relative; display: inline-block; }

.ct-sort__dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  background-color: #f5f1e8;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 1000;
  min-width: 180px;
}

.ct-sort__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ct-sort__link {
  display: block;
  color: #f5f1e8;
  font-family: Helvetica, Arial, sans-serif;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}
.ct-sort__link--active { background-color: #2d4a3e; }
.ct-sort__link--inactive { background-color: #8b6f47; }

/* ── Coffee Card (index) ─────────────────────────────── */
.ct-card {
  background-color: #f5f1e8;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 48px;
  position: relative;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.ct-card__edit {
  position: absolute;
  top: 16px;
  right: 16px;
}

.ct-card__image { text-align: center; margin-bottom: 24px; }

.ct-card__img {
  max-height: 400px;
  max-width: 100%;
  height: auto;
  width: auto;
  display: inline-block;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ct-card__img--show {
  max-height: 500px;
}

.ct-card__placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 400px;
  background: linear-gradient(135deg, #5a7c69 0%, #2d4a3e 100%);
  border-radius: 12px;
}
.ct-card__placeholder--show { width: 400px; height: 500px; }

.ct-card__placeholder-icon {
  font-size: 96px;
  color: #f5f1e8;
  opacity: 0.4;
}
.ct-card__placeholder-icon--show { font-size: 128px; }

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

.ct-card__name {
  color: #2d4a3e;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 36px;
  font-weight: 400;
  margin: 0 0 8px 0;
  text-decoration: none;
}
.ct-card__name--show {
  font-size: 48px;
  margin: 0 0 12px 0;
}

.ct-card__roaster {
  color: #5a7c69;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 24px;
  font-weight: 300;
  margin: 0 0 12px 0;
}
.ct-card__roaster--show {
  font-size: 28px;
  margin: 0 0 16px 0;
}

.ct-card__origin {
  color: #8b6f47;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  margin: 0 0 16px 0;
}
.ct-card__origin--show {
  font-size: 20px;
  margin: 0 0 20px 0;
}

.ct-card__notes {
  color: #5a7c69;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  margin: 0 0 16px 0;
  line-height: 1.5;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.ct-card__notes--show {
  font-size: 18px;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 0 20px 0;
}

/* ── Score badge ─────────────────────────────────────── */
.ct-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #2d4a3e;
  padding: 8px 24px;
  border-radius: 9999px;
}
.ct-score--lg { padding: 12px 32px; }

.ct-score__value {
  color: #f5f1e8;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 28px;
  font-weight: 300;
}
.ct-score__value--lg { font-size: 36px; }

.ct-score__denom { font-size: 18px; opacity: 0.7; }
.ct-score__denom--lg { font-size: 20px; }

/* ── Roast bar ───────────────────────────────────────── */
.ct-roast { margin: 0 auto 16px auto; max-width: 300px; }
.ct-roast--show { max-width: 500px; margin-bottom: 24px; }

.ct-roast__label {
  color: #8b6f47;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px 0;
  text-align: center;
}
.ct-roast__label--show { font-size: 12px; margin: 0 0 12px 0; }

.ct-roast__scale-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ct-roast__scale-label {
  color: #8b6f47;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 300;
}

.ct-roast__track {
  position: relative;
  height: 8px;
  background: linear-gradient(to right, #f5deb3 0%, #d2b48c 25%, #8b6f47 50%, #654321 75%, #3e2723 100%);
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}
.ct-roast__track--show {
  height: 12px;
  border-radius: 6px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.ct-roast__marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background-color: #2d4a3e;
  border: 2px solid #f5f1e8;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.ct-roast__marker--show {
  width: 20px;
  height: 20px;
  border: 3px solid #f5f1e8;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ct-roast__value {
  color: #5a7c69;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
  margin: 8px 0 0 0;
  text-align: center;
}

/* ── Show page ───────────────────────────────────────── */
.ct-show-card {
  background-color: #f5f1e8;
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.ct-show__header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #d4c4a8;
}

.ct-show__date-section {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #d4c4a8;
}

.ct-show__date-label {
  color: #8b6f47;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px 0;
}

.ct-show__date {
  color: #2d4a3e;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  margin: 0;
}

.ct-show__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid #d4c4a8;
}

/* ── Empty state ─────────────────────────────────────── */
.ct-empty {
  text-align: center;
  padding: 80px 24px;
  background-color: #f5f1e8;
  border-radius: 16px;
}

.ct-empty__icon { font-size: 96px; margin-bottom: 24px; opacity: 0.3; }

.ct-empty__title {
  color: #2d4a3e;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 36px;
  font-weight: 300;
  margin: 0 0 16px 0;
}

.ct-empty__subtitle {
  color: #5a7c69;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  margin: 0;
}

/* ── Form ────────────────────────────────────────────── */
.ct-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.ct-form__label {
  display: block;
  color: #5a7c69;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.ct-form__required { color: #c94b4b; }

.ct-form__input,
.ct-form__textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid #d4c4a8;
  background-color: #f5f1e8;
  color: #2d4a3e;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  box-sizing: border-box;
}

.ct-form__textarea { line-height: 1.5; }

.ct-form__slider-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ct-form__slider-label {
  color: #8b6f47;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
}

.ct-form__slider {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  appearance: none;
  outline: none;
}
.ct-form__slider--roast {
  background: linear-gradient(to right, #f5deb3, #8b6f47, #3e2723);
}
.ct-form__slider--rating {
  background: linear-gradient(to right, #e8dcc4, #5a7c69, #2d4a3e);
}

.ct-form__slider-value {
  color: #2d4a3e;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  min-width: 30px;
  text-align: center;
}
.ct-form__slider-value--rating {
  font-size: 20px;
  min-width: 60px;
}

.ct-form__image-preview {
  margin-top: 16px;
  text-align: center;
}

.ct-form__image-thumb {
  max-height: 200px;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ct-form__actions {
  display: flex;
  gap: 16px;
  padding-top: 24px;
}

.ct-form__error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  border-radius: 12px;
  padding: 24px;
}

.ct-form__error-title {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 18px;
  margin: 0 0 12px 0;
}

.ct-form__error-list {
  margin: 0;
  padding-left: 20px;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 300;
}

.ct-form__error-item { margin-bottom: 4px; }

/* ── Back link ───────────────────────────────────────── */
.ct-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f5f1e8;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 300;
  text-decoration: none;
  font-size: 18px;
}
