/* Volta Plugins Customer Portal - Dark Theme */

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #151515;
    --bg-input: #1a1a1a;
    --accent: #00d4ff;
    --accent-hover: #00b8dd;
    --accent-secondary: #00a8cc;
    --success: #00ff88;
    --warning: #ffaa00;
    --danger: #ff4444;
    --text-primary: #e0e8f0;
    --text-secondary: #c0d0e0;
    --text-muted: #808890;
    --border: #2a2a2a;
}

* {
    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-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Headings - lighter, cleaner weight than the browser-default bold */
h1 {
    font-weight: 600;
    font-size: 26px;
    letter-spacing: -0.2px;
    line-height: 1.3;
    color: var(--text-primary);
}

h2 {
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.1px;
    color: var(--text-primary);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.logo {
    display: inline-flex;
    align-items: center;
}

.logo img {
    height: 78px;
    width: auto;
    display: block;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 14px;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Views */
.view {
    flex: 1;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
}

.login-card {
    max-width: 400px;
    margin: 60px auto;
    text-align: center;
}

.login-card h1 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

input[type="email"],
input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--accent-secondary);
}

input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-secondary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-primary:disabled {
    background: var(--border);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: #4a5058;
}

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

.btn-danger:hover {
    background: #ff6666;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.help-text {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 20px;
}

/* Icon */
.icon-success {
    color: var(--accent);
    margin-bottom: 20px;
}

/* License Cards */
.license-card {
    border: 1px solid var(--border);
}

.license-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.license-product {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.license-date {
    color: var(--text-muted);
    font-size: 14px;
}

.serial-box {
    background: var(--bg-input);
    border: 2px solid var(--accent-secondary);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.serial-label {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.serial-number {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    color: var(--success);
    letter-spacing: 2px;
    word-break: break-all;
}

.activations-section {
    margin-top: 20px;
}

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

.activations-title {
    font-size: 16px;
    color: var(--text-secondary);
}

.activations-count {
    color: var(--text-muted);
    font-size: 14px;
}

.activation-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-input);
    padding: 12px 16px;
    border-radius: 8px;
}

.activation-info {
    display: flex;
    flex-direction: column;
}

.activation-machine {
    color: var(--text-primary);
    font-weight: 500;
}

.activation-date {
    color: var(--text-muted);
    font-size: 12px;
}

.no-activations {
    color: var(--text-muted);
    font-style: italic;
    padding: 15px;
    text-align: center;
    background: var(--bg-input);
    border-radius: 8px;
}

.license-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state h2 {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    margin-top: auto;
    color: var(--text-muted);
    font-size: 14px;
}

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

.footer a:hover {
    text-decoration: underline;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    z-index: 1001;
    border-left: 4px solid var(--accent);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

/* Documentation Grid */
.docs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.doc-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
}

.doc-link:hover {
    background: var(--border);
}

.doc-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.doc-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.doc-info strong {
    font-size: 14px;
    color: var(--text-primary);
}

.doc-info span {
    font-size: 12px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .license-header {
        flex-direction: column;
    }

    .license-actions {
        flex-direction: column;
    }

    .license-actions .btn {
        width: 100%;
        text-align: center;
    }

    .activation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .docs-grid {
        grid-template-columns: 1fr;
    }
}
