:root {
    --primary: #FF4A04;
    --primary-dark: #BD0000;
    --bg: #f5f5f7;
    --card: #ffffff;
    --text: #1d1d1f;
    --text-secondary: #86868b;
    --border: #d2d2d7;
    --success: #34c759;
    --error: #ff3b30;
    --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; transition: opacity .2s; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: #e8e8ed; color: var(--text); }
.btn-danger { background: var(--error); color: #fff; }
.btn-block { width: 100%; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; }
input:focus { border-color: var(--primary); }
.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.login-wrap { max-width: 400px; margin: 80px auto; }
.login-wrap h1 { text-align: center; margin-bottom: 8px; }
.login-wrap p { text-align: center; color: var(--text-secondary); margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-secondary); }
.tabs { display: flex; gap: 4px; margin-bottom: 20px; background: #e8e8ed; border-radius: 8px; padding: 4px; }
.tabs button { flex: 1; padding: 8px; border: none; background: transparent; border-radius: 6px; cursor: pointer; font-size: 14px; }
.tabs button.active { background: #fff; font-weight: 600; }
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); padding: 12px 24px; border-radius: 8px; color: #fff; font-size: 14px; z-index: 9999; opacity: 0; transition: opacity .3s; }
.toast.show { opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #1d1d1f; color: #fff; padding: 20px 0; flex-shrink: 0; }
.sidebar h2 { padding: 0 20px; margin-bottom: 20px; font-size: 18px; }
.sidebar a { display: block; padding: 12px 20px; color: #a0a0a5; text-decoration: none; font-size: 14px; transition: all .2s; }
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,.1); color: #fff; }
.main { flex: 1; padding: 24px; overflow-y: auto; }
.main h1 { margin-bottom: 20px; font-size: 24px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-card .label { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.stat-card .value { font-size: 28px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
th, td { padding: 12px 16px; text-align: left; font-size: 13px; border-bottom: 1px solid #f0f0f5; }
th { background: #fafafa; font-weight: 600; color: var(--text-secondary); }
tr:last-child td { border-bottom: none; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.badge-unused { background: #e8f5e9; color: #2e7d32; }
.badge-used { background: #fce4ec; color: #c62828; }
.badge-expired { background: #fff3e0; color: #e65100; }
.badge-available { background: #e3f2fd; color: #1565c0; }
.badge-banned { background: #fce4ec; color: #c62828; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.pagination button { padding: 6px 12px; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay.show { display: flex; }
.modal { background: #fff; border-radius: var(--radius); padding: 24px; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; }
.modal h3 { margin-bottom: 16px; }
.modal .form-group { margin-bottom: 12px; }
.row { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.row > * { flex: 1; }
.customer-page { background: linear-gradient(135deg, #fff5f0 0%, #fff 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.customer-card { background: #fff; border-radius: 16px; padding: 32px; max-width: 420px; width: 100%; box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.customer-logo { display: block; margin: 0 auto 16px; }
.customer-title { text-align: center; font-size: 22px; margin-bottom: 4px; }
.customer-subtitle { text-align: center; color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }
.card-key-box { text-align: center; padding: 12px; background: #f5f5f7; border-radius: 8px; margin-bottom: 24px; font-size: 14px; }
.steps { display: flex; align-items: center; justify-content: center; margin-bottom: 24px; gap: 8px; }
.step { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.step.active { color: var(--primary); font-weight: 600; }
.step.done { color: var(--success); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #e8e8ed; font-size: 12px; }
.step.active .step-num { background: var(--primary); color: #fff; }
.step.done .step-num { background: var(--success); color: #fff; }
.step-line { width: 24px; height: 2px; background: #e8e8ed; }
.step-line.done { background: var(--success); }
.step-panel { display: none; }
.step-panel.active { display: block; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.result-panel { text-align: center; padding: 24px; }
.result-icon { font-size: 48px; margin-bottom: 12px; }
.result-panel.success .result-icon { color: var(--success); }
.result-panel.error .result-icon { color: var(--error); }
.result-panel.loading .result-icon { color: var(--primary); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.result-desc { font-size: 14px; color: var(--text-secondary); }