﻿:root {
    --bg-main: #0c0e14;
    --card-bg: #151822;
    --card-border: #232738;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --text: #f3f4f6;
    --text-muted: #9ca3af;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px 16px;
}

.container {
    width: 100%;
    max-width: 680px;
}

.hidden {
    display: none !important;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.auth-card {
    max-width: 440px;
    margin: 40px auto;
}

.card-header {
    text-align: center;
    margin-bottom: 24px;
}

.logo-badge {
    font-size: 40px;
    margin-bottom: 12px;
}

h2, h3, h4 {
    font-weight: 600;
}

.subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 6px;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    background: #1c202d;
    border: 1px solid var(--card-border);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--primary);
}

.btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-block {
    width: 100%;
    padding: 12px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: #252b3d;
    color: var(--text);
}
.btn-secondary:hover {
    background: #31384e;
}

.btn-warning {
    background: #d97706;
    color: #fff;
}
.btn-warning:hover {
    background: #b45309;
}

.btn-danger {
    background: #b91c1c;
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text);
}
.btn-outline:hover {
    background: #1e2433;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid #7f1d1d;
    color: #f87171;
}
.btn-outline-danger:hover {
    background: #450a0a;
}

.btn-outline-success {
    background: transparent;
    border: 1px solid #065f46;
    color: #34d399;
}
.btn-outline-success:hover {
    background: #022c22;
}

.btn-link {
    background: transparent;
    color: #818cf8;
}

.alert-error {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
    font-size: 13px;
    text-align: center;
}

.qr-wrapper {
    text-align: center;
    margin: 15px 0;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    display: inline-block;
}

.qr-wrapper img {
    width: 190px;
    height: 190px;
    display: block;
}

.qr-tip {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 20px;
}

/* Top Nav */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    font-size: 24px;
}

.nav-actions {
    display: flex;
    gap: 10px;
}

/* PC Status Banner */
.pc-banner {
    padding: 14px 18px;
    background: #11141e;
    border-color: #2b3044;
}

.pc-status-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Master Bar */
.master-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1e1b4b 0%, #151822 100%);
    border-color: #3730a3;
}

/* Service Cards */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.service-card {
    margin-bottom: 0;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.port-badge {
    font-size: 11px;
    color: var(--text-muted);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    background: #6b7280;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-dot.offline {
    background: var(--danger);
}

.status-text {
    font-size: 13px;
    font-weight: 500;
}

.service-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

/* Import Card & Progress */
.import-icon {
    font-size: 24px;
}

.import-box {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--card-border);
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #1f2434;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--success);
    transition: width 0.3s ease;
}

.import-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.import-log {
    font-family: monospace;
    font-size: 11px;
    color: #a5b4fc;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Webhooks */
.webhooks-card h3 {
    margin-bottom: 6px;
}

.webhook-item {
    margin-top: 14px;
}

.webhook-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.copy-input-group {
    display: flex;
    gap: 8px;
}

.copy-input-group input {
    font-family: monospace;
    font-size: 12px;
    color: #a5b4fc;
}

/* Modal */
.modal-overlay {
    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;
    padding: 16px;
    z-index: 100;
}

.modal-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 24px;
    max-width: 440px;
    width: 100%;
}

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