:root {
    --bg-dark: #0f1115;
    --bg-card: #181b21;
    --bg-input: #22262d;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border: #2e333d;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-25 { margin-top: 25px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.p-15 { padding: 15px; }
.w-100 { width: 100%; }
.bg-light { background-color: var(--bg-input); }
.radius-8 { border-radius: 8px; }
.flex { display: flex; }
.gap-10 { gap: 10px; }
.flex-1 { flex: 1; }
.text-sm { font-size: 12px; color: var(--text-muted); }
.text-warning { color: var(--warning); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    user-select: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-primary { background-color: var(--accent); color: white; }
.btn-primary:hover:not(:disabled) { background-color: var(--accent-hover); }
.btn-success { background-color: var(--success); color: white; }
.btn-danger { background-color: var(--danger); color: white; }
.btn-warning { background-color: var(--warning); color: #000; }
.btn-outline { background-color: transparent; border: 1px solid var(--border); color: var(--text-main); }
.btn-outline:hover:not(:disabled) { background-color: var(--bg-input); border-color: var(--text-muted); }

/* Button States */
.btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.btn.is-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}
.btn.is-success { background-color: var(--success) !important; color: white !important; }
.btn.is-error { background-color: var(--danger) !important; color: white !important; }

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

/* Inputs */
.form-group { margin-bottom: 15px; }
.form-row { display: flex; gap: 15px; align-items: flex-end; }
.form-col { flex: 1; }
.label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.input-field {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 14px;
    transition: border-color 0.2s;
}
.input-field:focus { outline: none; border-color: var(--accent); }
.input-file {
    width: 100%;
    padding: 8px;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 13px;
}
.input-file::file-selector-button {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.2s;
}
.input-file::file-selector-button:hover { background-color: var(--border); }
textarea.input-field { resize: vertical; min-height: 60px; }

/* Progress Bar */
.progress-wrap { width: 100%; }
.progress-track {
    width: 100%;
    height: 6px;
    background-color: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}
.progress-fill {
    height: 100%;
    background-color: var(--accent);
    width: 0%;
    transition: width 0.1s linear;
}
.progress-text {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    font-weight: 600;
}

/* Layout */
.auth-panel { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-box { width: 100%; max-width: 360px; padding: 30px; }
.auth-title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 25px; }

.header { background-color: var(--bg-card); border-bottom: 1px solid var(--border); padding: 15px 0; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 18px; font-weight: 700; color: white; letter-spacing: -0.5px; }

.main-content { padding-top: 30px; padding-bottom: 50px; }
.grid-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; align-items: start; }
@media (max-width: 900px) { .grid-layout { grid-template-columns: 1fr; } }

.card { background-color: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 25px; }
.card-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
.subtitle { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: #fff; }

.release-section { padding-bottom: 20px; border-bottom: 1px dashed var(--border); }
.release-section:last-child { border-bottom: none; padding-bottom: 0; }
.highlight-section { background-color: rgba(245, 158, 11, 0.03); border: 1px solid rgba(245, 158, 11, 0.2); padding: 15px; border-radius: var(--radius-md); }

/* Data Display */
.code-block {
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-all;
}

.table-responsive { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { background-color: var(--bg-input); padding: 12px 15px; font-size: 12px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 12px 15px; border-bottom: 1px solid var(--border); font-size: 13px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background-color: rgba(255,255,255,0.02); }

.muted-id { color: var(--text-muted); font-family: monospace; }
.strong { font-weight: 600; color: #fff; }
.actions-cell { display: flex; gap: 8px; }

/* Badges */
.status-badge { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.status-active { background-color: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.status-lifetime { background-color: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.status-expired { background-color: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }

.hwid-bound { color: var(--text-main); background: var(--bg-input); padding: 3px 6px; border-radius: 4px; font-family: monospace; font-size: 11px; }
.hwid-free { color: var(--text-muted); font-style: italic; font-size: 12px; }

/* Messages & Toasts */
.message-error { color: var(--danger); font-size: 13px; text-align: center; min-height: 20px; }
.message-success { color: var(--success); font-size: 13px; text-align: center; min-height: 20px; }
.message-info { color: var(--accent-hover); font-size: 13px; text-align: center; min-height: 20px; }

.toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; pointer-events: none; }
.toast { padding: 12px 20px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; color: white; box-shadow: 0 10px 25px rgba(0,0,0,0.5); animation: toast-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; max-width: 300px; line-height: 1.4; pointer-events: auto; }
.toast-info { background-color: var(--bg-input); border-left: 4px solid var(--accent); border: 1px solid var(--border); }
.toast-success { background-color: rgba(16, 185, 129, 0.9); border: 1px solid var(--success); }
.toast-error { background-color: rgba(239, 68, 68, 0.9); border: 1px solid var(--danger); }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(50px) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(50px) scale(0.9); }
}

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

/* Small action buttons for table rows */
.actions-cell button {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.actions-cell button.warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.actions-cell button.warning:hover {
    background-color: rgba(245, 158, 11, 0.3);
}

.actions-cell button.danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.actions-cell button.danger:hover {
    background-color: rgba(239, 68, 68, 0.3);
}