/* CraftTags - Main Stylesheet */

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

:root {
  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;
  --blue-light:  #eff6ff;
  --green:       #16a34a;
  --green-light: #f0fdf4;
  --red:         #dc2626;
  --red-light:   #fef2f2;
  --yellow:      #d97706;
  --yellow-light:#fffbeb;
  --gray-50:     #f9fafb;
  --gray-100:    #f3f4f6;
  --gray-200:    #e5e7eb;
  --gray-400:    #9ca3af;
  --gray-600:    #4b5563;
  --gray-700:    #374151;
  --gray-900:    #111827;
  --radius:      8px;
  --shadow:      0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 6px -1px rgba(0,0,0,.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-50);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.main-nav a { color: var(--gray-600); font-size: .95rem; }
.main-nav a.active { color: var(--blue); font-weight: 600; }

.main-content { min-height: calc(100vh - 60px - 56px); padding: 2rem 0; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 620px; }

.site-footer {
  background: #fff;
  border-top: 1px solid var(--gray-200);
  padding: .75rem 1.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  color: var(--gray-400);
}

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem 1.25rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.btn-primary  { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); text-decoration: none; color: #fff; }
.btn-outline  { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn-outline:hover { background: var(--blue-light); text-decoration: none; }
.btn-link     { background: none; color: var(--blue); padding: .5rem 0; }
.btn-sm       { padding: .35rem .9rem; font-size: .85rem; }
.btn-full     { width: 100%; }

/* ── Cards ──────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.card-stat { text-align: center; }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--blue); }
.stat-label  { font-weight: 600; color: var(--gray-700); margin-top: .25rem; }
.stat-sub    { font-size: .8rem; color: var(--gray-400); }
.card-label  { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-400); margin-bottom: .5rem; }
.card-value  { font-size: 1rem; font-weight: 600; }
.card-sub    { font-size: .85rem; color: var(--gray-600); margin-top: .25rem; }
.card-empty  { color: var(--gray-600); text-align: center; padding: 2rem; }

/* ── Alerts ─────────────────────────────────────── */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .95rem;
}
.alert-success { background: var(--green-light); color: var(--green); border: 1px solid #bbf7d0; }
.alert-error   { background: var(--red-light);   color: var(--red);   border: 1px solid #fecaca; }
.alert-warning { background: var(--yellow-light); color: var(--yellow); border: 1px solid #fde68a; }

/* ── Badges ─────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-green  { background: var(--green-light); color: var(--green); }
.badge-red    { background: var(--red-light); color: var(--red); }
.badge-blue   { background: var(--blue-light); color: var(--blue); }
.badge-yellow { background: var(--yellow-light); color: var(--yellow); }
.badge-gray   { background: var(--gray-100); color: var(--gray-600); }

/* ── Forms ──────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: .35rem;
  font-size: .95rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .6rem .85rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .95rem;
  color: var(--gray-900);
  background: #fff;
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-hint { font-size: .8rem; color: var(--gray-400); margin-top: .25rem; }
.form-row  { display: grid; grid-template-columns: 1fr auto auto; gap: .75rem; }
.form-group-sm input { width: 100%; }
.required { color: var(--red); }
.form-section-title {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-400);
  margin: 1.5rem 0 .75rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--gray-200);
}

/* ── Auth ───────────────────────────────────────── */
.auth-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-md);
}
.auth-card h1 { margin-bottom: .5rem; }
.auth-sub     { color: var(--gray-600); margin-bottom: 1.5rem; }
.auth-footer  { text-align: center; margin-top: 1rem; font-size: .9rem; color: var(--gray-600); }
.text-center  { text-align: center; }
.icon-lg      { font-size: 3rem; margin-bottom: 1rem; }

/* ── Page Headers ───────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.page-header h1 { font-size: 1.5rem; }
.page-sub { color: var(--gray-600); margin-bottom: 1.5rem; }
.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  margin: 1.5rem 0 .75rem;
}

/* ── Orders ─────────────────────────────────────── */
.order-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}
.order-id   { font-weight: 700; font-size: 1rem; }
.order-meta { font-size: .85rem; color: var(--gray-600); margin-top: .15rem; }
.order-actions { display: flex; align-items: center; gap: .5rem; }
.dashboard-links { display: flex; gap: 1rem; margin-top: 1.5rem; }

/* ── Pricing ────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.pricing-card {
  background: #fff;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.pricing-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); }
.pricing-card-contact { opacity: .85; }
.pricing-label    { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-400); margin-bottom: .5rem; }
.pricing-quantity { font-size: 2rem; font-weight: 700; color: var(--gray-900); }
.pricing-quantity span { font-size: 1rem; font-weight: 400; color: var(--gray-600); }
.pricing-price    { font-size: 1.5rem; font-weight: 700; color: var(--blue); margin: .5rem 0 .25rem; }
.pricing-unit     { font-size: .8rem; color: var(--gray-400); margin-bottom: 1rem; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .card-row { grid-template-columns: 1fr 1fr; }
  .order-summary { flex-direction: column; align-items: flex-start; }
  .dashboard-links { flex-direction: column; }
}
