/* PACRP License Server - Modern Dark Theme */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 1rem;
}

.logo { display: flex; align-items: center; gap: 1rem; }
.logo h1 { font-size: 1.75rem; font-weight: 700; }

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.online { background: var(--success); box-shadow: 0 0 8px var(--success); }

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.card.wide { grid-column: 1 / -1; }

.card h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat { text-align: center; }
.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}
.stat-label { font-size: 0.875rem; color: var(--text-muted); }

/* Products */
.product-list { list-style: none; }
.product-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: var(--bg);
    transition: transform 0.2s;
}
.product-list li:hover { transform: translateX(4px); }
.product-icon { font-size: 1.25rem; width: 1.5rem; text-align: center; }

/* Forms */
.test-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.25rem; }
.form-group label { font-size: 0.875rem; font-weight: 500; color: var(--text-muted); }

input, select {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s;
    width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--primary); }

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    align-self: end;
    width: 100%;
}
.btn-primary:hover { background: var(--primary-dark); }

/* Result Box */
.result-box { min-height: 60px; }
.result-box .success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 1rem;
    border-radius: 8px;
}
.result-box .error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 1rem;
    border-radius: 8px;
}
.result-box .loading { color: var(--text-muted); }

/* API Docs */
.endpoint {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 8px;
    flex-wrap: wrap;
}
.method {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.api-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}
.api-table th, .api-table td {
    text-align: left;
    padding: 0.625rem;
    border-bottom: 1px solid var(--border);
}
.api-table th { color: var(--text-muted); font-weight: 500; }

.code-block {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #c9d1d9;
    margin: 0.75rem 0;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    background: var(--bg);
    padding: 0.25rem;
    border-radius: 8px;
    flex-wrap: wrap;
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 0.875rem;
}
.tab-btn.active { background: var(--surface-light); color: var(--text); }
.tab-btn:hover:not(.active) { color: var(--text); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* License Cards */
.license-examples { display: flex; flex-direction: column; gap: 0.75rem; }
.license-card {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border);
}
.license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.license-key {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
    word-break: break-all;
}
.badge {
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-active { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.status-inactive { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.status-expired { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.license-details { font-size: 0.875rem; color: var(--text-muted); }
.license-details p { margin: 0.25rem 0; }

/* Steps */
.steps { padding-left: 1.25rem; }
.steps li { margin-bottom: 0.75rem; color: var(--text-muted); }
.steps li::marker { color: var(--primary); }

.note {
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--primary);
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Footer */
.footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

code {
    background: var(--bg);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.875em;
    color: var(--primary);
}

@media (max-width: 768px) {
    .container { padding: 1rem; }
    .header { flex-direction: column; align-items: flex-start; }
    .stats-grid { grid-template-columns: 1fr; }
    .test-form { grid-template-columns: 1fr; }
    .tabs { flex-direction: column; }
}
