/* Admin Page */
.admin-page {
    min-height: 100vh;
    background: #0a0a0a;
    color: #e5e5e5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.admin-header {
    padding: 24px 32px;
    border-bottom: 1px solid #222;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
}

.subtitle {
    font-size: 14px;
    color: #71717a;
    margin: 0;
}

.logout-btn {
    padding: 10px 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #e5e5e5;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #222;
    border-color: #444;
}

.admin-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.admin-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 24px;
}

.admin-card h2 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
}

.admin-card > p {
    font-size: 14px;
    color: #71717a;
    margin: 0 0 20px 0;
}

/* Token Input */
.token-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.token-input {
    flex: 1;
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #e5e5e5;
    font-size: 14px;
    font-family: 'Monaco', 'Courier New', monospace;
}

.token-input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-save {
    padding: 12px 24px;
    background: #667eea;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-save:hover {
    background: #5568d3;
}

/* Generate Controls */
.generate-controls {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    margin-bottom: 12px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 13px;
    color: #a1a1aa;
    font-weight: 500;
}

.control-group input,
.control-group select {
    padding: 10px 12px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #e5e5e5;
    font-size: 14px;
}

.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-generate {
    padding: 10px 24px;
    background: #10b981;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    align-self: end;
}

.btn-generate:hover {
    background: #059669;
}

.btn-view {
    padding: 12px 24px;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.btn-view:hover {
    background: #2563eb;
}

/* Status Messages */
.status-msg {
    font-size: 14px;
    padding: 8px 0;
    min-height: 30px;
}

.status-msg .success {
    color: #10b981;
}

.status-msg .error {
    color: #ef4444;
}

.status-msg .info {
    color: #3b82f6;
}

.status-msg .loading {
    color: #a1a1aa;
}

/* Keys Display */
.keys-display {
    margin-top: 16px;
}

.keys-list {
    background: #1a1a1a;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 16px;
}

.keys-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #222;
}

.keys-header strong {
    color: #fff;
    font-size: 14px;
}

.copy-all-btn {
    padding: 6px 12px;
    background: #667eea;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-all-btn:hover {
    background: #5568d3;
}

.key-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 6px;
    margin-bottom: 8px;
}

.key-item:last-child {
    margin-bottom: 0;
}

.key-code {
    flex: 1;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: #667eea;
    letter-spacing: 0.5px;
}

.key-type-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.key-type-badge.standard {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.key-type-badge.pro {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
}

.copy-key-btn {
    padding: 6px 12px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e5e5e5;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-key-btn:hover {
    background: #222;
    border-color: #444;
}

/* Light Theme */
[data-theme="light"] .admin-page {
    background: #f5f5f5;
    color: #1a1a1a;
}

[data-theme="light"] .admin-header {
    background: #fff;
    border-bottom-color: #e5e5e5;
}

[data-theme="light"] .admin-header h1 {
    color: #1a1a1a;
}

[data-theme="light"] .logout-btn {
    background: #f5f5f5;
    border-color: #d4d4d8;
    color: #1a1a1a;
}

[data-theme="light"] .logout-btn:hover {
    background: #e5e5e5;
}

[data-theme="light"] .admin-card {
    background: #fff;
    border-color: #e5e5e5;
}

[data-theme="light"] .admin-card h2 {
    color: #1a1a1a;
}

[data-theme="light"] .token-input,
[data-theme="light"] .control-group input,
[data-theme="light"] .control-group select {
    background: #f5f5f5;
    border-color: #d4d4d8;
    color: #1a1a1a;
}

[data-theme="light"] .keys-list {
    background: #f5f5f5;
    border-color: #e5e5e5;
}

[data-theme="light"] .keys-header {
    border-bottom-color: #e5e5e5;
}

[data-theme="light"] .key-item {
    background: #fff;
    border-color: #e5e5e5;
}

[data-theme="light"] .copy-key-btn {
    background: #f5f5f5;
    border-color: #d4d4d8;
    color: #1a1a1a;
}

[data-theme="light"] .copy-key-btn:hover {
    background: #e5e5e5;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header {
        padding: 20px 16px;
    }

    .header-left {
        gap: 12px;
    }

    .admin-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .admin-header h1 {
        font-size: 20px;
    }

    .admin-content {
        padding: 20px 16px;
    }

    .generate-controls {
        grid-template-columns: 1fr;
    }

    .btn-generate {
        align-self: stretch;
    }

    .token-input-group {
        flex-direction: column;
    }

    .key-item {
        flex-wrap: wrap;
    }
}
