:root {
  --primary: #1c1b1b;
  --primary-dark: #000000;
  --primary-light: #e8e8e8;
  --accent: #ff334b;
  --accent-light: #fff0f2;
  --success: #168342;
  --success-light: #e8f5e9;
  --danger: #e00000;
  --danger-light: #fde8e8;
  --warning: #f6a429;
  --warning-light: #fef7e6;
  --info: #1c1b1b;
  --info-light: #f3f3f3;
  --bg: #f7f8fd;
  --surface: #ffffff;
  --text: #1c1b1b;
  --text-secondary: #555;
  --text-muted: #999;
  --border: #ddd;
  --border-light: #f0f0f0;
  --radius: 4px;
  --radius-sm: 3px;
  --shadow: none;
  --shadow-md: none;
  --shadow-lg: 0 2px 8px rgba(0,0,0,0.08);
  --transition: 0.15s ease;
}

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

body {
  font-family: Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  font-size: 15px;
}

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

/* ============ LOGIN ============ */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1c1b1b;
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 2px;
  width: 100%;
  max-width: 380px;
  overflow: hidden;
}

.login-header {
  text-align: center;
  background: #1c1b1b;
  padding: 32px 36px 28px;
  margin-bottom: 0;
}

.login-logo {
  height: 40px;
  margin-bottom: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.login-header p {
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  margin-top: 0;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.login-card form {
  padding: 28px 36px 36px;
}

/* ============ FORMS ============ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: 14px;
  font-family: Helvetica, Arial, sans-serif;
  transition: border-color var(--transition);
  background: var(--surface);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.error-msg {
  color: var(--danger);
  font-size: 13px;
  margin: 8px 0;
  padding: 8px 12px;
  background: var(--danger-light);
  border-radius: var(--radius-sm);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 700;
  font-family: Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 0;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition);
}

.btn:hover { opacity: 0.85; }
.btn:active { opacity: 0.7; }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: transparent; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.85; }

.btn-success { background: var(--success); color: white; }

.btn-sm { padding: 5px 12px; font-size: 11px; }
.btn-xs { padding: 3px 8px; font-size: 10px; border-radius: 4px; }
.btn-block { width: 100%; }

.btn-group { display: flex; gap: 8px; }

/* ============ NAVBAR ============ */
.navbar {
  background: #1c1b1b;
  border-bottom: none;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 32px;
}

.nav-logo {
  height: 22px;
}

.nav-role {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.5);
}

.navbar-menu {
  display: flex;
  gap: 0;
  flex: 1;
}

.nav-link {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
  border-bottom: 2px solid transparent;
  letter-spacing: 0.2px;
}

.nav-link:hover { color: rgba(255,255,255,0.9); }
.nav-link.active { color: #fff; border-bottom-color: var(--accent); font-weight: 700; background: none; }

.navbar-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.navbar .btn-outline {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.7);
}
.navbar .btn-outline:hover {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
  background: transparent;
}

/* ============ MAIN ============ */
.main-content {
  padding: 28px;
  max-width: 1300px;
  margin: 0 auto;
}

/* ============ CARDS ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

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

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ============ TABLES ============ */
table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 10px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
}

tbody tr:hover { background: #fafafa; }
tbody tr:last-child td { border-bottom: none; }

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

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

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border);
}

.modal-lg { max-width: 800px; }

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

.modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

.modal-body {
  padding: 24px;
}

/* ============ PAGINATION ============ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 16px 0;
}

.pagination button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 0;
  cursor: pointer;
  font-size: 12px;
  font-family: Helvetica, Arial, sans-serif;
}

.pagination button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============ SEARCH ============ */
.search-bar { display: flex; gap: 8px; }

.input-search {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: 14px;
  font-family: Helvetica, Arial, sans-serif;
  width: 250px;
}

.input-search:focus {
  outline: none;
  border-color: var(--primary);
}

/* ============ EXPORT BAR ============ */
.export-bar {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ============ BADGE ============ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: #b47a00; }
.badge-info { background: var(--info-light); color: var(--text); }

/* ============ UTILITIES ============ */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.font-mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

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

.empty-state p { font-size: 14px; }

/* Form inline */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition);
}

.checkbox-item:hover {
  border-color: var(--primary);
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--primary);
}

/* ============ TOAST ============ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  font-size: 13px;
  font-family: Helvetica, Arial, sans-serif;
  color: white;
  background: var(--primary);
  min-width: 260px;
  max-width: 400px;
  opacity: 0;
  transform: translateY(10px);
  animation: toastIn 0.2s ease forwards;
}

.toast.toast-success { background: var(--success); }
.toast.toast-error { background: var(--danger); }
.toast.toast-warning { background: #b47a00; }

.toast.toast-out {
  animation: toastOut 0.2s ease forwards;
}

@keyframes toastIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(10px); }
}

/* ============ LOADING ============ */
.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 13px;
  gap: 10px;
}

.loading-overlay .spinner {
  width: 16px;
  height: 16px;
}

/* ============ ARTIST COMMISSION BANNER ============ */
.commission-banner {
  background: linear-gradient(-45deg, #1c1b1b, #2d2d2d, #1c1b1b, #333);
  background-size: 400% 400%;
  animation: bannerGradient 8s ease infinite;
  color: white;
  padding: 28px 28px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.commission-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(255,51,75,0.06) 0%, transparent 70%);
  animation: bannerGlow 6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes bannerGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes bannerGlow {
  0% { transform: translate(-10%, -10%); }
  100% { transform: translate(10%, 10%); }
}

.commission-banner-content {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.commission-banner-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  animation: bannerPulse 3s ease-in-out infinite;
}

@keyframes bannerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.commission-banner-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.5;
  margin-bottom: 2px;
}

.commission-banner-value {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* ============ SYNC INDICATOR ============ */
.sync-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.3px;
}
