/* ============================================
   FABRIC - Modern Fabric Marketplace
   Design System v2.0
   ============================================ */

/* ========== CSS Variables ========== */
:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --bg-muted: #f1f5f9;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ========== Reset & Base ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

ul {
  list-style: none;
}

/* ========== Site Header ========== */
.site-header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow);
  background: rgba(255,255,255,0.95);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-header .logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

.site-header .logo::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 6px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-search {
  max-width: 360px;
  width: 280px;
}

.hs-form {
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-muted);
  transition: var(--transition);
}

.hs-form:focus-within {
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.hs-form input {
  flex: 1;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  background: transparent;
  color: var(--text);
}

.hs-form input::placeholder {
  color: var(--text-muted);
}

.hs-form button {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition);
}

.hs-form button:hover {
  color: var(--accent);
}

.site-header nav {
  display: flex;
  gap: 28px;
  white-space: nowrap;
}

.site-header nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.site-header nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.site-header nav a:hover {
  color: var(--primary);
}

.site-header nav a:hover::after {
  width: 100%;
}

/* ========== Hero ========== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 100%);
  color: #fff;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 18px;
  opacity: 0.75;
  margin-bottom: 40px;
  font-weight: 400;
}

.hero .search-form {
  display: flex;
  max-width: 640px;
  margin: 0 auto;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 6px;
  border: 1px solid rgba(255,255,255,0.15);
}

.hero .search-form input {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  outline: none;
  background: rgba(255,255,255,0.95);
  color: var(--text);
}

.hero .search-form input::placeholder {
  color: var(--text-muted);
}

.hero .search-form button {
  padding: 16px 36px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  margin-left: 6px;
  transition: var(--transition);
}

.hero .search-form button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.hero-tags {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero-tags a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  transition: var(--transition);
}

.hero-tags a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
}

/* ========== Sections ========== */
.section-heading {
  font-size: 24px;
  font-weight: 700;
  margin: 48px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: -0.02em;
}

.section-heading::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  border-radius: 2px;
  margin-right: 12px;
}

.section-heading span {
  display: flex;
  align-items: center;
  flex: 1;
}

.section-heading .more {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-heading .more:hover {
  color: var(--accent);
}

/* ========== Card System ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: block;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

.card-image {
  height: 240px;
  overflow: hidden;
  background: var(--bg-muted);
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-image img {
  transform: scale(1.08);
}

.card-body {
  padding: 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.card-shop {
  color: var(--text-secondary);
}

.card-code {
  color: var(--text-muted);
  font-family: 'SF Mono', monospace;
  font-size: 12px;
}

.card-tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.card-tag {
  font-size: 11px;
  padding: 3px 10px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  border-radius: 20px;
  font-weight: 500;
}

.no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-muted);
}

/* ========== Shop Cards ========== */
.shop-card-lg {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: block;
  color: var(--text);
  border: 1px solid var(--border-light);
  position: relative;
}

.shop-card-lg:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.shop-card-lg .shop-cover {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.shop-card-lg .shop-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.shop-card-lg:hover .shop-cover img {
  transform: scale(1.05);
}

.shop-card-lg .shop-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
}

.shop-card-lg .shop-overlay h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.shop-card-lg .shop-overlay p {
  font-size: 13px;
  opacity: 0.85;
}

/* ========== Category Tags ========== */
.category-cloud {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.category-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.category-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.category-tag .icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* ========== Banner Ad ========== */
.banner-ad {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: var(--radius);
  padding: 32px;
  margin: 32px 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.banner-ad::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.banner-ad h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.banner-ad p {
  opacity: 0.75;
  font-size: 14px;
}

/* ========== Ad Cards ========== */
.ad-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.content-with-ads {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.ad-sidebar {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 80px;
}

.ad-sidebar-left {
  order: 0;
}

.ad-sidebar-right {
  order: 2;
}

.main-content {
  flex: 1;
  min-width: 0;
  order: 1;
}

.ad-sidebar .ad-card {
  width: 100%;
}

.ad-sidebar .ad-card .card-image {
  height: 140px;
}

.ad-sidebar .ad-card .card-body {
  padding: 10px 12px;
}

.ad-sidebar .ad-card .card-title {
  font-size: 13px;
}

.ad-sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 1200px) {
  .content-with-ads {
    flex-direction: column;
  }
  .ad-sidebar {
    width: 100%;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .ad-sidebar .ad-card {
    width: 180px;
  }
}

.ad-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: block;
  color: var(--text);
  border: 1px solid var(--border-light);
  position: relative;
}

.ad-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--warning);
}

.ad-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, var(--warning), #f97316);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  z-index: 2;
}

/* ========== Breadcrumb ========== */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  padding: 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  color: var(--text-muted);
}

/* ========== Search Page ========== */
.search-page {
  margin: 0 auto 40px;
}

/* Filter Bar */
.filter-bar-sticky {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
  position: sticky;
  top: 64px;
  z-index: 90;
  margin-bottom: 24px;
}

.filter-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-chip {
  position: relative;
}

.filter-chip select {
  appearance: none;
  padding: 8px 32px 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter-chip select:hover,
.filter-chip select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.filter-actions {
  display: flex;
  gap: 8px;
}

/* Results */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.results-count {
  font-size: 14px;
  color: var(--text-secondary);
}

.results-sort {
  display: flex;
  gap: 4px;
}

.sort-btn {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.sort-btn:hover,
.sort-btn.active {
  background: var(--bg-muted);
  color: var(--text);
}

.sort-btn.active {
  border-color: var(--border);
  font-weight: 500;
}

/* ========== Pagination ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 40px 0;
}

.page-btn {
  padding: 10px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.page-btn:hover {
  background: var(--bg-muted);
  color: var(--text);
  border-color: var(--border);
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========== Product Detail ========== */
.product-detail {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}

.product-gallery {
  position: sticky;
  top: 80px;
  align-self: start;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-muted);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
}

.gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-info h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.product-code {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-family: 'SF Mono', monospace;
}

.product-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.product-tag {
  padding: 6px 14px;
  background: var(--bg-muted);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.product-attrs {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}

.attr-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}

.attr-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.attr-label {
  color: var(--text-secondary);
  width: 80px;
  flex-shrink: 0;
  font-weight: 500;
}

.attr-value {
  color: var(--text);
  flex: 1;
}

.product-actions {
  display: flex;
  gap: 12px;
}

.btn-primary {
  padding: 14px 32px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  padding: 14px 32px;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  background: var(--bg-muted);
}

/* Shop Card in Product */
.shop-card-compact {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 16px;
}

.shop-card-compact img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
}

.shop-card-compact .shop-info {
  flex: 1;
}

.shop-card-compact .shop-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.shop-card-compact .shop-addr {
  font-size: 13px;
  color: var(--text-secondary);
}

.shop-card-compact .shop-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Detail Sections */
.detail-section {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}

.detail-section .card-grid {
  margin-bottom: 0;
}

.detail-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 300px));
  gap: 12px;
  justify-content: center;
}

.detail-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.detail-gallery img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow);
}

.detail-gallery-single {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.detail-gallery-single img {
  width: 100%;
  height: auto;
  aspect-ratio: unset;
  object-fit: contain;
}

/* ========== Shop Detail ========== */
.shop-hero {
  position: relative;
  height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.shop-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 32px 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.shop-hero-info h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.shop-hero-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.shop-hero-contacts span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shop-hero-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  opacity: 0.85;
}

.shop-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.shop-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shop-search-form input {
  width: 260px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg-elevated);
  color: var(--text);
  transition: var(--transition);
}

.shop-search-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.shop-search-form button {
  padding: 6px 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.shop-search-form button:hover {
  background: var(--primary-light);
}

.shop-search-clear {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.shop-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.shop-cat-tag {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  border-radius: 20px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid transparent;
}

.shop-cat-tag:hover {
  background: var(--border);
  color: var(--text);
}

.shop-cat-tag.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.shop-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

.info-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 14px;
}

.info-chip .icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.info-chip .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.info-chip .value {
  font-weight: 500;
  color: var(--text);
}

/* ========== Footer ========== */
.site-footer {
  background: var(--primary);
  color: #94a3b8;
  padding: 60px 0 0;
  margin-top: 80px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col p,
.footer-col a {
  display: block;
  margin-bottom: 10px;
  color: #94a3b8;
  line-height: 1.6;
  transition: var(--transition);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  color: #64748b;
  font-size: 13px;
}

/* ========== Right Sidebar ========== */
.right-sidebar {
  position: fixed;
  right: 0;
  bottom: 80px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 12px 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  border-right: none;
}

.sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 48px;
  height: 48px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 11px;
}

.sidebar-item:hover {
  background: var(--bg-muted);
  color: var(--accent);
}

.sidebar-item svg {
  width: 20px;
  height: 20px;
}

/* ========== Toast ========== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 24px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease;
  border: 1px solid var(--border-light);
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--danger);
}

@keyframes toastIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ========== Skeleton Loading ========== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border-light) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== Lightbox ========== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 36px;
  color: #fff;
  cursor: pointer;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ========== Admin & Utility ========== */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  font-weight: 500;
}

.btn:hover {
  background: var(--bg-muted);
}

.btn-primary-solid {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary-solid:hover {
  background: var(--primary-light);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* Form Elements */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: var(--bg-elevated);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* Data Table */
.data-table {
  width: 100%;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  border-collapse: collapse;
  border: 1px solid var(--border-light);
}

.data-table th {
  background: var(--bg-muted);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}

.data-table tr:hover {
  background: var(--bg-muted);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  border-left: 3px solid;
}

.alert-error { background: #fef2f2; color: #991b1b; border-color: var(--danger); }
.alert-warning { background: #fffbeb; color: #92400e; border-color: var(--warning); }
.alert-success { background: #f0fdf4; color: #166534; border-color: var(--success); }
.alert-info { background: #eff6ff; color: #1e40af; border-color: var(--accent); }

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .product-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .product-gallery {
    position: static;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .hero h1 {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  .site-header .container {
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .header-search {
    max-width: 100%;
    flex: 1;
  }
  
  .hero {
    padding: 60px 0 50px;
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .hero .search-form {
    flex-direction: column;
    background: transparent;
    border: none;
    padding: 0;
  }
  
  .hero .search-form button {
    margin-left: 0;
    margin-top: 8px;
  }
  
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .card-image {
    height: 180px;
  }
  
  .section-heading {
    font-size: 20px;
  }
  
  .shop-hero {
    height: 240px;
  }
  
  .shop-hero-overlay {
    padding: 30px 20px 16px;
  }
  
  .shop-hero-info h1 {
    font-size: 22px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .filter-bar-inner {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  
  .filter-chip select {
    white-space: nowrap;
  }
  
  .right-sidebar {
    bottom: 16px;
    padding: 8px 6px;
  }
  
  .sidebar-item {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .card-image {
    height: 160px;
  }
  
  .card-body {
    padding: 12px;
  }
  
  .hero h1 {
    font-size: 24px;
  }
  
  .detail-section {
    padding: 20px;
  }
}

/* ========== Admin Layout ========== */
.shop-name-header {
  background: var(--text);
  color: #fff;
  padding: 0 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.shop-name-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}

.shop-label {
  font-size: 14px;
  font-weight: 600;
}

.shop-label .name {
  color: var(--primary);
}

.admin-layout {
  display: flex;
  min-height: calc(100vh - 48px);
  max-width: 100%;
}

.admin-sidebar {
  width: 200px;
  min-width: 200px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-light);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 48px;
  height: calc(100vh - 48px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 8px 20px 12px;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.admin-sidebar a:hover {
  background: var(--bg-muted);
}

.admin-sidebar a.active {
  background: var(--bg-muted);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.admin-sidebar a .icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.admin-main {
  flex: 1;
  padding: 24px 32px;
  background: var(--bg);
  min-width: 0;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.user-info {
  font-size: 14px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.panel-header {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-muted);
}

.panel-body {
  padding: 20px;
}

/* Form Inline (for cloth form) */
.form-inline-full {
  margin-bottom: 16px;
}

.form-inline-full label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-inline-full input,
.form-inline-full textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
}

.form-inline-full input:focus,
.form-inline-full textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.form-inline-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.form-inline-group {
  flex: 1;
  min-width: 0;
}

.form-inline-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-inline-group input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
}

.form-inline-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.input-short {
  max-width: 160px;
}

.cat-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-inline select,
.cat-inline input {
  flex: 1;
  min-width: 0;
}

.form-inline-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
  appearance: auto;
  cursor: pointer;
}

.form-inline-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* Image Upload Grid */
.img-row-layout {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.img-col-layout {
  flex: 1;
  min-width: 0;
}

.img-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.img-cell {
  width: 120px;
  height: 120px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.img-cell:hover {
  border-color: var(--accent);
  background: rgba(59,130,246,0.03);
}

.img-cell.has-img {
  border-style: solid;
  border-color: var(--border-light);
  cursor: default;
}

.cell-plus {
  font-size: 28px;
  color: var(--text-muted);
  line-height: 1;
}

.cell-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.cell-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cell-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
}

.img-cell.has-img:hover .cell-del {
  opacity: 1;
}

.trigger-hidden {
  display: none !important;
}

.img-cell input[type="file"] {
  display: none;
}

.form-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.inline-add-form {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.inline-add-form input {
  flex: 1;
  max-width: 360px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}

.inline-add-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.form-section h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.image-upload-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.image-upload-section:hover {
  border-color: var(--accent);
  background: rgba(59,130,246,0.03);
}

.image-upload-section .upload-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.image-upload-section p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.image-upload-section input[type="file"] {
  display: none;
}

.current-cover {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid var(--border-light);
}

/* Filter Bar */
.filter-bar {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 16px;
}

.filter-bar form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar input,
.filter-bar select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg);
  color: var(--text);
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--accent);
}

.batch-actions {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.btn-danger:hover {
  background: #dc2626;
}

/* Attr Tabs */
.attr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.attr-tab {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.attr-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.attr-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.attr-add {
  margin-bottom: 16px;
}

.attr-add form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.attr-add input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  flex: 1;
  max-width: 300px;
  background: var(--bg);
  color: var(--text);
}

/* Expired Page */
.expired-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.expired-box {
  text-align: center;
  padding: 48px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  max-width: 460px;
}

.expired-box .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.expired-box h2 {
  font-size: 22px;
  margin-bottom: 12px;
}

.expired-box p {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 14px;
}

.expired-box .btn {
  margin-top: 20px;
}

/* Admin Table Rows */
.table-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.no-img-text {
  color: var(--text-muted);
  font-size: 12px;
}

.data-table .status-badge {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.data-table .actions {
  display: flex;
  gap: 8px;
}

.data-table .actions a {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.data-table .actions a:hover {
  text-decoration: underline;
}

.data-table .actions .btn-danger-text {
  color: #ef4444;
}

/* Page Info */
.page-info {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .admin-sidebar {
    width: 56px;
    min-width: 56px;
    padding: 12px 0;
  }

  .sidebar-title {
    display: none;
  }

  .admin-sidebar a {
    padding: 12px;
    justify-content: center;
    border-left: none;
    font-size: 0;
  }

  .admin-sidebar a .icon {
    font-size: 20px;
  }

  .admin-main {
    padding: 16px;
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .attr-tabs {
    gap: 4px;
  }

  .attr-tab {
    font-size: 12px;
    padding: 4px 10px;
  }
}

/* Dashboard Stats */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-card h3 {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 8px;
  font-weight: 500;
}

.stat-num {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.stat-blue .stat-num { color: var(--primary); }
.stat-green .stat-num { color: #16a34a; }
.stat-red .stat-num { color: #dc2626; }
.stat-orange .stat-num { color: #ea580c; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.dashboard-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
}

.dashboard-panel.full {
  grid-column: 1 / -1;
}

.dashboard-panel h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.dashboard-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}

.dashboard-list-item:last-child {
  border-bottom: none;
}

.panel-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-success {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}

.btn-success:hover {
  background: #15803d;
}

.btn-warning {
  background: #d97706;
  color: #fff;
  border-color: #d97706;
}

.btn-warning:hover {
  background: #b45309;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

.mt-16 {
  margin-top: 16px;
}

.table-panel {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-panel .data-table {
  border: none;
  border-radius: 0;
}

.empty-cell {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 16px;
  font-size: 14px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.modal-body {
  padding: 20px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn-secondary {
  background: var(--bg-muted);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.settings-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
}

.settings-panel h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logs-page {
  margin-bottom: 16px;
}

.log-action {
  font-weight: 500;
  color: var(--primary);
}

/* Login Pages */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  padding: 20px;
}

.login-box {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.login-box h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  text-align: center;
}

.login-box .login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin: 0 0 24px;
}

.required {
  color: var(--danger);
}

.login-box .login-link {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
}

.btn-block {
  width: 100%;
  padding: 12px 20px;
}

.login-link {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
}

.login-link a {
  color: var(--text-muted);
  text-decoration: none;
}

.login-link a:hover {
  color: var(--accent);
}
