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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a2a3a 0%, #0f1a24 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
    pointer-events: none;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    background: rgba(30, 45, 60, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(66, 153, 225, 0.2);
    overflow: hidden;
}

.login-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #0d2130 0%, #0a1824 100%);
    border-bottom: 1px solid #2a4c6e;
    text-align: center;
}

.product-badge {
    display: inline-block;
    background: rgba(0, 120, 215, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #5bc0ff;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.9rem;
    color: #8ba3b8;
}

.login-body {
    padding: 2rem;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    background: #1e2f3c;
    padding: 0.3rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #8ba3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: #2a4c6e;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #bdd4e8;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-icon {
    position: relative;
}

.input-icon-img {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

input, select {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: #1a2b36;
    border: 1px solid #2a4c6e;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #e2e8f0;
    transition: all 0.2s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #5bc0ff;
    box-shadow: 0 0 0 3px rgba(91, 192, 255, 0.2);
}

input::placeholder {
    color: #5a7a94;
}

.push-card {
    background: #1e2f3c;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1rem;
    border: 1px solid #2a4c6e;
    cursor: pointer;
    transition: all 0.2s ease;
}

.push-card:hover {
    background: #2a4c6e;
}

.push-icon-img {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.push-status {
    font-size: 0.85rem;
    color: #8ba3b8;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #0078d7 0%, #005a9e 100%);
    color: white;
}

.btn-primary:hover {
    background: #005a9e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 120, 215, 0.3);
}

.login-footer {
    padding: 1rem 2rem;
    background: #0d1820;
    text-align: center;
    border-top: 1px solid #1a2b36;
    font-size: 0.75rem;
    color: #5a7a94;
}

.links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.links a {
    color: #5bc0ff;
    text-decoration: none;
    font-size: 0.75rem;
    cursor: pointer;
}

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

.error-message {
    background: rgba(220, 53, 69, 0.15);
    border-left: 4px solid #dc3545;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #ff8a92;
    display: none;
}

.success-message {
    background: rgba(40, 167, 69, 0.15);
    border-left: 4px solid #28a745;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #6fcf97;
    display: none;
}

.info-message {
    background: rgba(91, 192, 255, 0.15);
    border-left: 4px solid #5bc0ff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #5bc0ff;
    display: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    display: none;
}

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

#metricsPanel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.75);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 12px;
    color: #5bc0ff;
    z-index: 10;
    font-family: monospace;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(91,192,255,0.3);
}

#systemMetricsPanel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0,0,0,0.75);
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 12px;
    color: #5bc0ff;
    z-index: 10;
    font-family: monospace;
    backdrop-filter: blur(4px);
    min-width: 220px;
    border: 1px solid rgba(91,192,255,0.3);
}

.metric-row {
    display: flex;
    align-items: center;
    margin: 4px 0;
    gap: 8px;
}

.metric-label {
    width: 50px;
    font-weight: bold;
    color: #a0c4e8;
}

.metric-value {
    width: 45px;
    text-align: right;
    color: #fff;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #1a2b36;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #5bc0ff);
    border-radius: 3px;
    transition: width 0.5s ease;
}

@media (max-width: 500px) {
    .login-body {
        padding: 1.5rem;
    }
    .login-header {
        padding: 1rem 1.5rem;
    }
    h1 {
        font-size: 1.4rem;
    }
    #systemMetricsPanel, #metricsPanel {
        display: none;
    }
}
