/* Sistema de design Vanessa Rasfaski — compartilhado em todas as páginas */
:root {
  --navy: #0B2545;
  --navy-deep: #061634;
  --gold: #C9A961;
  --gold-light: #E0C886;
  --soft: #F5F1E8;
  --soft-deep: #EDE6D4;
  --ink: #1A1A1A;
  --gray: #6B7280;
  --gray-light: #9CA3AF;
  --rule: #E5E0D2;
  --green: #1B7A3E;
  --green-light: #D4EDDA;
  --red: #A4161A;
  --red-light: #F8D7DA;
  --white: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; height: auto; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--soft);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* HEADER */
.header {
  background: var(--navy);
  color: var(--soft);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--soft);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.logo .v { color: var(--gold); }
.logo .dot { color: var(--gold); margin: 0 6px; }
.logo .full { display: none; }
@media (min-width: 768px) {
  .logo .full { display: inline; }
  .logo { font-size: 1.25rem; }
}
.nav { display: none; gap: 32px; }
@media (min-width: 768px) { .nav { display: flex; } }
.nav a {
  color: var(--soft);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav a:hover { color: var(--gold); }
.nav a.active { color: var(--gold); }

/* USER MENU */
.user-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}
.user-name { display: none; }
@media (min-width: 768px) {
  .user-name {
    display: block;
    font-size: 0.85rem;
    color: var(--soft);
  }
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 6px;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--navy);
  color: var(--soft);
  border-color: var(--navy);
}
.btn-secondary:hover {
  background: var(--navy-deep);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--soft);
}
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--rule);
}
.btn-danger {
  background: var(--red);
  color: white;
  border-color: var(--red);
}
.btn-danger:hover {
  opacity: 0.9;
}
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg { padding: 18px 36px; font-size: 1rem; }

/* FORMS */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: 1rem;
  background: white;
  color: var(--ink);
  transition: border-color 0.2s;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-help {
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 4px;
}
.form-error {
  font-size: 0.8rem;
  color: var(--red);
  margin-top: 4px;
}
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--gray);
}
.form-check input[type="checkbox"] {
  margin-top: 4px;
  cursor: pointer;
  accent-color: var(--gold);
}
.form-check a {
  color: var(--navy);
  font-weight: 600;
  border-bottom: 1px dotted var(--navy);
}

/* AUTH LAYOUT */
.auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}
.auth-card {
  background: white;
  border-radius: 12px;
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(11, 37, 69, 0.08);
  border: 1px solid var(--rule);
}
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}
.auth-eyebrow {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.auth-title {
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.auth-subtitle {
  color: var(--gray);
  font-size: 0.95rem;
}
.auth-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--gray);
}
.auth-footer a {
  color: var(--navy);
  font-weight: 600;
  border-bottom: 1px dotted var(--navy);
}

/* DASHBOARD LAYOUT */
.dashboard {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 1024px) {
  .dashboard {
    grid-template-columns: 260px 1fr;
  }
}
.sidebar {
  background: white;
  border-right: 1px solid var(--rule);
  padding: 32px 0;
  display: none;
}
@media (min-width: 1024px) {
  .sidebar { display: block; }
}
.sidebar-section {
  margin-bottom: 32px;
}
.sidebar-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0 24px;
  margin-bottom: 8px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  background: var(--soft);
  color: var(--navy);
}
.sidebar-link.active {
  background: var(--soft);
  color: var(--navy);
  border-left-color: var(--gold);
  font-weight: 600;
}
.sidebar-icon {
  font-family: 'Fraunces', serif;
  color: var(--gold);
  font-weight: 700;
  font-size: 1.1rem;
}
.main-content {
  padding: 32px 24px;
}
@media (min-width: 768px) {
  .main-content { padding: 48px 40px; }
}

/* PAGE HEADER */
.page-header {
  margin-bottom: 36px;
}
.page-eyebrow {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.page-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--navy);
  margin-bottom: 8px;
}
.page-subtitle {
  color: var(--gray);
  font-size: 1rem;
}

/* CARDS */
.card {
  background: white;
  border-radius: 8px;
  border: 1px solid var(--rule);
  padding: 24px;
  transition: all 0.2s;
}
.card:hover {
  border-color: var(--gold);
}
.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

/* STAT CARD */
.stat-card {
  background: white;
  border-radius: 8px;
  border: 1px solid var(--rule);
  padding: 24px;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--gray);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.stat-value {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-change {
  font-size: 0.85rem;
  color: var(--green);
  font-weight: 500;
}
.stat-change.negative { color: var(--red); }
.stats-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 32px;
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* PRODUCT CARD */
.product-card {
  background: white;
  border-radius: 8px;
  border: 1px solid var(--rule);
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(11, 37, 69, 0.08);
}
.product-cover {
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  position: relative;
  overflow: hidden;
}
.product-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}
.product-cover::before {
  content: '';
  position: absolute;
  top: 30%;
  right: -80px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.15) 0%, transparent 60%);
}
.product-cover-roman {
  font-family: 'Fraunces', serif;
  font-size: 3rem;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  margin-bottom: 8px;
}
.product-cover-title {
  font-family: 'Fraunces', serif;
  color: var(--soft);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  z-index: 2;
  position: relative;
}
.product-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-cat {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}
.product-title {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}
.product-desc {
  color: var(--gray);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.product-price {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
}
.product-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
}
.product-status.active {
  background: var(--green-light);
  color: var(--green);
}
.product-status.expired {
  background: var(--red-light);
  color: var(--red);
}

/* TABLES */
.table-wrap {
  background: white;
  border-radius: 8px;
  border: 1px solid var(--rule);
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  text-align: left;
  padding: 14px 16px;
  background: var(--soft-deep);
  color: var(--navy);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
  color: var(--ink);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--soft); }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.badge-success { background: var(--green-light); color: var(--green); }
.badge-pending { background: #FEF3C7; color: #B45309; }
.badge-danger { background: var(--red-light); color: var(--red); }
.badge-info { background: #DBEAFE; color: #1E40AF; }

/* ALERTS */
.alert {
  padding: 16px 20px;
  border-radius: 6px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.alert-icon {
  font-weight: 700;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.alert-success {
  background: var(--green-light);
  border-left: 4px solid var(--green);
  color: var(--green);
}
.alert-success .alert-icon { background: var(--green); color: white; }
.alert-warning {
  background: #FEF3C7;
  border-left: 4px solid #D97706;
  color: #B45309;
}
.alert-warning .alert-icon { background: #D97706; color: white; }
.alert-info {
  background: #DBEAFE;
  border-left: 4px solid #2563EB;
  color: #1E40AF;
}
.alert-info .alert-icon { background: #2563EB; color: white; }
.alert-body { flex: 1; font-size: 0.92rem; }
.alert-title { font-weight: 700; margin-bottom: 4px; }

/* MOBILE NAV (bottom bar) */
.mobile-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--rule);
  padding: 8px 0;
  z-index: 50;
}
@media (min-width: 1024px) {
  .mobile-nav { display: none; }
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  color: var(--gray);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.mobile-nav-item.active { color: var(--navy); }
.mobile-nav-item .icon {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  margin-bottom: 4px;
  color: var(--gold);
}

/* FOOTER */
footer {
  background: var(--navy-deep);
  color: rgba(245, 241, 232, 0.7);
  padding: 32px 0;
  text-align: center;
  font-size: 0.82rem;
  margin-top: auto;
}
footer .heart { color: var(--gold); }

/* PADDING bottom no body para não cobrir mobile nav */
@media (max-width: 1023px) {
  body.has-mobile-nav { padding-bottom: 70px; }
}
