/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #01426a 0%, #0066b3 100%);
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    color: #01426a;
    font-size: 1.8rem;
    font-weight: 700;
}

.logo-img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border-radius: 6px;
}

/* Main Content */
.main-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding: 2rem;
}

/* Hero Section */
.hero-section {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.hero-content {
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-button {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #01426a;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

.tab-button.active {
    background: #01426a;
    color: white;
    box-shadow: 0 4px 12px rgba(1, 66, 106, 0.3);
}

.tab-button.active:hover {
    transform: none;
}

/* Panel Styles */
.connection-panel,
.disconnect-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
    width: 100%;
}

/* Disconnect Panel Specific */
.disconnect-panel {
    text-align: center;
}

.disconnect-form {
    max-width: 400px;
    margin: 0 auto;
}

.disconnect-form .form-group {
    margin-bottom: 2rem;
}

.disconnect-form .form-group label {
    display: block;
    text-align: left;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #01426a;
}

.disconnect-form .form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.disconnect-form .form-group input:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.disconnect-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.info-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #155724;
    font-weight: 600;
}

.info-message i {
    font-size: 1.25rem;
    color: #28a745;
}

/* Connection Panel */
.connection-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
    width: 100%;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.panel-header h2 {
    color: #01426a;
    font-size: 1.5rem;
    font-weight: 600;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.online {
    background: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
}

.status-indicator.offline {
    background: #dc3545;
}

/* Form Styles */
.connection-form {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #01426a;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0066b3;
    box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.1);
}

.va-code-group {
    display: flex;
    flex-direction: column;
}

.va-code-display {
    padding: 1rem;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #01426a;
    text-align: center;
    letter-spacing: 2px;
}

.field-note {
    color: #666;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    text-align: center;
}

/* Button Styles */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 200px;
}

.btn-primary {
    background: #01426a;
    color: white;
}

.btn-primary:hover {
    background: #013a5d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(1, 66, 106, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Connection Info */
.connection-info {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #28a745;
    margin-top: 1.5rem;
}

.connection-info h3 {
    color: #01426a;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

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

.info-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.info-item span {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #0066b3;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left-color: #28a745;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.warning {
    border-left-color: #ffc107;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .connection-panel {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .btn {
        min-width: 100%;
    }

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

    .nav-logo {
        font-size: 1.5rem;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .main-content {
        padding: 1rem;
        min-height: calc(100vh - 80px);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .connection-panel {
        padding: 1rem;
    }

    .panel-header h2 {
        font-size: 1.25rem;
    }
}