/**
 * Tema Panel de Colección — Tarumba's Farm.
 * Fuente: docs/collector/BRANDING_DASHBOARD.md
 * Variables con prefijo --tf-
 */

:root {
  --tf-color-primary: #D9048E;
  --tf-color-secondary: #7CFC00;
  --tf-color-tertiary: #E8D5F0;
  --tf-color-accent: #ff2fb3;
  --tf-color-bg-light: #F8F8F8;
  --tf-bg: #f7f4ef;
  --tf-ink: #111;
  --tf-color-card-light: #FFFFFF;
  --tf-color-text: #1a1a1a;
  --tf-color-border: #000000;

  --tf-radius-default: 0.75rem;
  --tf-radius-sticker: 1.5rem;
  --tf-border-width: 2px;
  --tf-shadow-sticker: 2px 2px 0 0 var(--tf-color-border);
  --tf-shadow-hover: 3px 3px 0 0 var(--tf-color-border);

  --tf-font-display: 'Bangers', cursive;
  --tf-font-handwriting: 'Permanent Marker', cursive;
  --tf-font-body: 'Roboto', sans-serif;

  --tf-space-xs: 0.25rem;
  --tf-space-sm: 0.5rem;
  --tf-space-md: 1rem;
  --tf-space-lg: 1.5rem;
  --tf-space-xl: 2rem;
  --tf-container-max: 720px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--tf-font-body);
  background-color: var(--tf-bg);
  color: var(--tf-ink);
  margin: 0;
  padding: var(--tf-space-md);
  line-height: 1.5;
  min-height: 100vh;
}

h1, .tf-title {
  font-family: var(--tf-font-display);
  letter-spacing: 0.02em;
}

.tf-card {
  background: var(--tf-color-card-light);
  border: var(--tf-border-width) solid var(--tf-color-border);
  border-radius: var(--tf-radius-default);
  box-shadow: var(--tf-shadow-sticker);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.tf-btn-primary {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-family: var(--tf-font-body);
  font-weight: 600;
  font-size: 1rem;
  color: white;
  background: var(--tf-color-primary);
  border: var(--tf-border-width) solid var(--tf-color-border);
  border-radius: var(--tf-radius-default);
  box-shadow: var(--tf-shadow-sticker);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.tf-btn-primary:hover {
  box-shadow: var(--tf-shadow-hover);
}

.tf-btn-secondary {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-family: var(--tf-font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--tf-color-text);
  background: var(--tf-color-secondary);
  border: var(--tf-border-width) solid var(--tf-color-border);
  border-radius: var(--tf-radius-default);
  box-shadow: var(--tf-shadow-sticker);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.tf-input {
  width: 100%;
  max-width: 20rem;
  padding: 0.6rem;
  font-size: 1rem;
  border: var(--tf-border-width) solid #ccc;
  border-radius: var(--tf-radius-default);
}

.tf-input:focus {
  outline: none;
  border-color: var(--tf-color-primary);
  box-shadow: 0 0 0 2px rgba(217, 4, 142, 0.2);
}

.tf-badge {
  font-family: var(--tf-font-handwriting);
  font-size: 0.9rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--tf-radius-sticker);
  border: 1px solid var(--tf-color-border);
}

.tf-item-thumb {
  max-width: 120px;
  max-height: 120px;
  border-radius: var(--tf-radius-default);
  border: var(--tf-border-width) solid var(--tf-color-border);
  box-shadow: var(--tf-shadow-sticker);
}

/* Layout */
.tf-container {
  max-width: var(--tf-container-max);
  margin-left: auto;
  margin-right: auto;
}

.tf-stack {
  display: flex;
  flex-direction: column;
  gap: var(--tf-space-md);
}

.tf-stack-sm { gap: var(--tf-space-sm); }
.tf-stack-lg { gap: var(--tf-space-lg); }

.tf-grid {
  display: grid;
  gap: var(--tf-space-lg);
}

@media (min-width: 640px) {
  .tf-grid-dashboard {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.tf-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: var(--tf-space-lg);
}

.tf-login-card {
  max-width: 24rem;
  width: 100%;
  text-align: center;
}

.tf-login-logo {
  height: 3rem;
  width: auto;
  margin-bottom: var(--tf-space-md);
}

.tf-login-copy {
  margin-bottom: var(--tf-space-md);
  font-size: 0.95rem;
}

.tf-login-card .tf-stack {
  align-items: stretch;
  text-align: left;
}

.tf-login-card form > div:first-of-type {
  margin-bottom: var(--tf-space-sm);
}

.tf-login-hint {
  margin-top: var(--tf-space-md);
  font-size: 0.9rem;
  opacity: 0.9;
}

.tf-login-form {
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--tf-space-md);
}

.tf-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--tf-color-text);
}

.tf-btn-image {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tf-btn-image img {
  width: 100%;
  height: auto;
  display: block;
}

.tf-btn-image:focus-visible {
  outline: 3px solid var(--tf-color-primary);
  outline-offset: 4px;
  border-radius: 12px;
}

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

.tf-btn-image:active img {
  transform: translateY(1px);
}

.tf-user-id {
  font-size: 0.75rem;
  color: var(--tf-color-text);
  opacity: 0.8;
  font-family: var(--tf-font-body);
  word-break: break-all;
  margin-top: var(--tf-space-xs);
}

.tf-message-success {
  color: var(--tf-color-primary);
  font-size: 0.95rem;
  margin-top: var(--tf-space-md);
}

.tf-login-result {
  margin-top: var(--tf-space-md);
  text-align: center;
}

.tf-login-result .tf-message-success,
.tf-login-result .tf-message-error {
  display: inline-block;
  margin: 0 auto;
}

/* Nav */
.tf-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--tf-space-md);
  margin-bottom: var(--tf-space-lg);
  padding-bottom: var(--tf-space-sm);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tf-nav-logo {
  display: block;
  height: 2.5rem;
  width: auto;
  margin-right: var(--tf-space-sm);
}

.tf-nav-brand {
  font-family: var(--tf-font-display);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--tf-ink);
  text-decoration: none;
  margin-right: auto;
}

.tf-nav-brand:hover {
  color: var(--tf-color-primary);
}

.tf-nav a:not(.tf-nav-brand) {
  color: var(--tf-color-primary);
  text-decoration: none;
  font-size: 0.95rem;
}

.tf-nav a:not(.tf-nav-brand):hover {
  text-decoration: underline;
}

.tf-claim-form {
  display: flex;
  gap: var(--tf-space-sm);
  align-items: center;
  flex-wrap: wrap;
}

.tf-claim-form .tf-input {
  flex: 1;
  min-width: 12rem;
}

.tf-items-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tf-items-list li {
  margin-bottom: var(--tf-space-sm);
}

.tf-dashboard .tf-card {
  margin-bottom: var(--tf-space-lg);
}

.tf-dashboard h1 {
  font-size: 1.75rem;
  margin-bottom: var(--tf-space-sm);
}

.tf-dashboard h2 {
  font-family: var(--tf-font-body);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 var(--tf-space-sm) 0;
  color: var(--tf-color-text);
}

.tf-dashboard p {
  margin: var(--tf-space-xs) 0;
}

.tf-claim-error {
  display: none;
  color: var(--tf-color-primary);
  margin-top: var(--tf-space-sm);
  font-size: 0.9rem;
}
