* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background: #f4f2ee; color: #1c1b1a; }
a { color: inherit; text-decoration: none; }

/* Layout */
.max-w { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }

/* Card */
.card { background: #fff; border: 1px solid #e0ddd8; border-radius: 8px; overflow: hidden; }
.card:hover { box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* Grid */
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Thumbnail */
.thumb-wrap { background: #f4f2ee; display: flex; align-items: center; justify-content: center; max-height: 320px; }
.thumb-wrap img { width: 100%; height: 100%; object-fit: contain; max-height: 320px; }
.thumb-placeholder { height: 200px; display: flex; align-items: center; justify-content: center; color: #b0ada8; font-size: 14px; background: #f4f2ee; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 6px; border: 1px solid transparent; font-size: 14px; font-weight: 500; cursor: pointer; transition: .15s background; }
.btn-primary { background: #c0392b; color: #fff; }
.btn-primary:hover { background: #a93226; }
.btn-outline { background: transparent; border-color: #e0ddd8; color: #1c1b1a; }
.btn-outline:hover { background: #f4f2ee; }
.btn-ghost { background: transparent; color: #1c1b1a; }
.btn-ghost:hover { background: #e8e6e1; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn-block { width: 100%; justify-content: center; }

/* Input */
.input { display: block; width: 100%; padding: 8px 12px; border: 1px solid #e0ddd8; border-radius: 6px; font-size: 14px; background: #fff; outline: none; }
.input:focus { border-color: #c0392b; }
.input::placeholder { color: #b0ada8; }
label { display: block; font-size: 13px; color: #6b6a68; margin-bottom: 4px; font-weight: 500; }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 12px 16px; font-weight: 500; font-size: 12px; color: #6b6a68; border-bottom: 1px solid #e0ddd8; }
td { padding: 12px 16px; border-bottom: 1px solid #e0ddd8; }
tr:hover { background: #faf9f7; }

/* Tag */
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: 12px; border: 1px solid #e0ddd8; background: #f4f2ee; color: #6b6a68; }

/* Category tabs */
.tabs { background: #fff; border-bottom: 1px solid #e0ddd8; padding: 12px 24px; display: flex; gap: 8px; overflow-x: auto; }
.tab { padding: 6px 12px; border-radius: 6px; font-size: 14px; font-weight: 500; white-space: nowrap; color: #6b6a68; transition: .15s; }
.tab:hover { color: #1c1b1a; background: #f4f2ee; }
.tab.active { background: #c0392b; color: #fff; }

/* Layout card info */
.card-info { padding: 12px 16px; }

/* Admin sidebar */
.sidebar { width: 224px; min-height: 100vh; background: #fff; border-right: 1px solid #e0ddd8; display: flex; flex-direction: column; }
.sidebar-header { padding: 20px; border-bottom: 1px solid #e0ddd8; }
.sidebar-nav { flex: 1; padding: 16px 12px; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 6px; font-size: 14px; color: #1c1b1a; }
.sidebar-nav a:hover { background: #f4f2ee; }
.sidebar-footer { padding: 16px 12px; border-top: 1px solid #e0ddd8; }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1c1b1a; color: #fff; padding: 8px 16px; border-radius: 6px; font-size: 13px; z-index: 999; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

/* Kefu */
.kefu { position: fixed; top: 50%; right: 24px; transform: translateY(-50%); width: 52px; height: 52px; background: #0088cc; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.15); z-index: 50; }
.kefu:hover { box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.kefu img { width: 28px; height: 28px; }

/* Account info */
.acct { border-top: 1px solid #e0ddd8; padding: 12px 16px; }
.acct-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.acct-row:last-child { margin-bottom: 0; }
.acct-label { color: #6b6a68; min-width: 56px; font-size: 12px; flex-shrink: 0; }
.acct-value { flex: 1; padding: 4px 8px; background: #f4f2ee; border-radius: 4px; font-family: monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-copy { color: #c0392b; font-size: 12px; cursor: pointer; background: none; border: none; flex-shrink: 0; }

/* Utils */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-muted { color: #6b6a68; }
.text-red { color: #c0392b; }
.text-blue { color: #2c6fbb; }
.text-orange { color: #d4873a; }

/* Responsive */
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-4 { grid-template-columns: 1fr; } }

/* Copy button */
.copy-btn { padding: 0; background: none; border: none; cursor: pointer; }
