.cs-port-container {
   
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
}
.cs-port-container h3 {
    color: #0073aa;
    margin-top: 0;
    margin-bottom: 8px;
}
.cs-port-container > p {
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: 15px;
}

.cs-port-form {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.cs-port-field {
    margin-bottom: 0;
    flex: 1;
}
.cs-port-field-port {
    max-width: 140px;
}
.cs-port-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}
.cs-port-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cs-port-field input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

/* Пресеты */
.cs-port-presets {
    margin-bottom: 16px;
}
.cs-port-preset-label {
    font-size: 13px;
    color: #777;
    margin-right: 8px;
}
.cs-port-preset {
    background: #f0f0f1;
    border: 1px solid #ddd;
    color: #0073aa;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    margin-right: 6px;
    margin-bottom: 4px;
    transition: background 0.15s;
    font-family: monospace;
}
.cs-port-preset:hover {
    background: #e0e0e0;
}

.cs-port-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.cs-port-button:hover:not(:disabled) { background: #005a87; }
.cs-port-button:active:not(:disabled) { transform: scale(0.98); }
.cs-port-button:disabled { opacity: 0.6; cursor: not-allowed; }

/* Кэш */
.cs-port-cache {
    background: #e7f4ff;
    color: #0073aa;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 12px;
    border-left: 4px solid #0073aa;
}

/* Статус */
.cs-port-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
}
.cs-port-loading { background: #f0f0f0; color: #555; }
.cs-port-ok { background: #d4edda; color: #155724; }
.cs-port-closed { background: #f8d7da; color: #721c24; }
.cs-port-error {
    background: #f8d7da; color: #721c24;
    padding: 12px 16px; border-radius: 4px;
    border-left: 4px solid #dc3545;
    font-size: 14px;
}
.cs-port-icon { font-size: 24px; }

/* Детали */
.cs-port-details {
    margin-top: 16px;
}
.cs-port-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}
.cs-port-table th {
    text-align: left;
    padding: 8px 12px;
    background: #f5f5f5;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #ddd;
    width: 35%;
}
.cs-port-table td {
    padding: 8px 12px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}
.cs-port-table code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
    color: #d63384;
}
.cs-port-desc {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
    margin: 8px 0 0;
}

/* Адаптив */
@media (max-width: 500px) {
    .cs-port-form { flex-direction: column; }
    .cs-port-field-port { max-width: 100%; }
}
